MCPcopy Create free account
hub / github.com/apache/tvm / test_ex_8_7_deep_nested

Function test_ex_8_7_deep_nested

tests/python/tirx/test_exec_context.py:250–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248
249
250def test_ex_8_7_deep_nested():
251 ctx = ExecContext.at_kernel_entry(warp_ext=16).with_scope_switch(CTA)
252 ctx = ctx.with_filter(WARP_FLAT, 0, 8).with_scope_switch(WARPGROUP)
253 assert ctx.inter == {"wgid": AxisRange(2, 0), "cta_id": AxisRange(1, 0)}
254 ctx = ctx.with_filter(WARP_FLAT, 0, 2)
255 # recompute at warpgroup: factor(2, 0) -> case 2
256 assert ctx.inter == {"wgid": AxisRange(1, 0), "cta_id": AxisRange(1, 0)}
257 assert ctx.intra == {"laneid": AxisRange(32, 0), "wid_in_wg": AxisRange(2, 0)}
258 ctx = ctx.with_scope_switch(WARP)
259 assert ctx.inter == {"warpid": AxisRange(2, 0), "cta_id": AxisRange(1, 0)}
260 assert ctx.intra == {"laneid": AxisRange(32, 0)}
261 ctx = ctx.with_filter(LANE_BIND, 0, 8)
262 assert ctx.intra == {"laneid": AxisRange(8, 0)}
263 assert ctx.inter == {"warpid": AxisRange(2, 0), "cta_id": AxisRange(1, 0)}
264
265
266# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

AxisRangeClass · 0.90
with_scope_switchMethod · 0.80
at_kernel_entryMethod · 0.80
with_filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…