| 328 | # test5: Use both 'lwp_min_height' and 'lwp_max_depth'. |
| 329 | # instrumentation. |
| 330 | def test5(): |
| 331 | test5_config = default_lwp_test_config.copy() |
| 332 | test5_config.update( |
| 333 | {"s_tir.lwp_max_depth": 3, "s_tir.instr_siblings": False, "s_tir.lwp_min_height": 2} |
| 334 | ) |
| 335 | with tvm.transform.PassContext(config=test5_config): |
| 336 | mod = tvm.IRModule.from_expr(input1.with_attr("global_symbol", "main")) |
| 337 | mod = tvm.s_tir.transform.InstrumentProfileIntrinsics()(mod) |
| 338 | tvm.ir.assert_structural_equal( |
| 339 | mod["main"], test5_expected_output.with_attr("global_symbol", "main") |
| 340 | ) |
| 341 | |
| 342 | |
| 343 | # test6: Tests instrumentation for the parallel loops |