| 304 | # loops are always excluded from instrumentation unless overwritten using |
| 305 | # 'lwp_min_height' (ex: test5) |
| 306 | def test3(): |
| 307 | test3_config = default_lwp_test_config.copy() |
| 308 | test3_config.update({"s_tir.lwp_max_depth": 3, "s_tir.instr_siblings": False}) |
| 309 | with tvm.transform.PassContext(config=test3_config): |
| 310 | mod = tvm.IRModule.from_expr(input1.with_attr("global_symbol", "main")) |
| 311 | mod = tvm.s_tir.transform.InstrumentProfileIntrinsics()(mod) |
| 312 | tvm.ir.assert_structural_equal( |
| 313 | mod["main"], test3_expected_output.with_attr("global_symbol", "main") |
| 314 | ) |
| 315 | |
| 316 | |
| 317 | # test4: Use 'lwp_min_height' to exclude inner loops upto a certain height from |