tilelang.ascend.language.random¶
Ascend dialect RNG ops.
Same tl.rng_* emission as the common implementation, but rng_init’s default sequence id derives from the thread context — and on Ascend the thread domain lives in the enclosing T.SimtVF scope, so the derivation must go through this dialect’s thread accessors rather than the launch-frame ones the CUDA module consults.
Functions¶
|
Initialize the random number generator state. |
Module Contents¶
- tilelang.ascend.language.random.rng_init(seed, seq=None, off=0, generator='curandStatePhilox4_32_10_t')¶
Initialize the random number generator state.
See
tilelang.cuda.language.random.rng_init(); the only difference is that the defaultseq(one stream per lane) is derived from the Ascend thread scope: the SimtVF lane id plus the AI-core index times the lane count.- Return type:
tvm.tirx.PrimExpr