| 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). |
| 291 | def 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 |