Open Cookiee235 opened 1 month ago
For the dead code (i.e., def scatter_elements()...
), if we keep it and the call mod = tvm.tir.transform.DefaultGPUSchedule()(mod)
, to execute the relax IR, the test case will crash unexpectedly. However, if we remove the dead function, the test case can run well.
@Lunderberg Can you help me review this issue? Thanks!
Hmm. The PrimFunc definition is a bit odd. The present of the with T.block
means that it is schedulable TIR, but there aren't any with T.block
annotations inside the loops themselves. So the body looks like it is after the ConvertBlocksToOpaque
transform, but DefaultGPUSchedule
requires the annotations from before that.
The reason why it works when the dead function is removed is because DefaultGPUSchedule
attempts to schedule all TIR functions, regardless of whether they are actually used.
Actual behavior
Steps to reproduce
cc @Lunderberg @junrushao