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

Function test2

tests/python/s_tir/transform/test_s_tir_transform_profiling_instr.py:291–299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289# By default, only loops with siblings are instrumented. Here, 'lwp_max_depth'
290# doesn't have any effect unless 'instr_siblings' is set to False (ex: test3).
291def test2():
292 test2_config = default_lwp_test_config.copy()
293 test2_config.update({"s_tir.lwp_max_depth": 3})
294 with tvm.transform.PassContext(config=test2_config):
295 mod = tvm.IRModule.from_expr(input1.with_attr("global_symbol", "main"))
296 mod = tvm.s_tir.transform.InstrumentProfileIntrinsics()(mod)
297 tvm.ir.assert_structural_equal(
298 mod["main"], test1_expected_output.with_attr("global_symbol", "main")
299 )
300
301
302# test3: Use 'lwp_max_depth' to instrument loops upto a certain depth. This flag

Callers

nothing calls this directly

Calls 4

from_exprMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45
with_attrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…