tvm_tirx.tirx.op.gpu_thread_filter

tvm_tirx.tirx.op.gpu_thread_filter#

tvm_tirx.tirx.op.gpu_thread_filter(var, pred, *, loc=UNKNOWN_LOC, ty=None)#

Thread-set filter escape hatch.

Use this wrapper only when the predicate is not in the canonical thread-filter grammar (see src/tirx/analysis/filter_canonical.h). Canonical predicates – pure conjunctions of scopeid_var <op> const comparisons plus bare T.cuda.elect_sync() calls – are recognized by the lowering pass directly from if cond:, so the wrapper is redundant for them.

When wrapped: var (a CUDA-index-bound scope identifier) tells the compiler which active-set axis to collapse to a singleton when the opaque predicate evaluates true; pred is preserved verbatim and evaluated at runtime.

Parameters:

loc (Location)