Hello,
I was going through relax AlterOpLayout pass by running the tests in tests/python/relax/test_transform_alter_op_impl.py
.
When I try to use an index_map with AXIS_SEPARATOR, I’m not seeing any change in the IR. For example, I modified test_single_output
function
diff --git a/tests/python/relax/test_transform_alter_op_impl.py b/tests/python/relax/test_transform_alter_op_impl.py
index 77e2d4e35..426c080f8 100644
--- a/tests/python/relax/test_transform_alter_op_impl.py
+++ b/tests/python/relax/test_transform_alter_op_impl.py
@@ -85,7 +85,9 @@ def test_single_output():
T.writes(output[v_ax0, v_ax1])
output[v_ax0, v_ax1] = arg0[v_ax0, v_ax1] + arg1[v_ax0, v_ax1]
# fmt: on
- index_map = lambda i: (i // 4, i % 4)
+ # index_map = lambda i: (i // 4, i % 4)
+ from tvm.tir import IndexMap
+ index_map, axis_sep = IndexMap.from_func_with_separators((lambda i: (i // 4, IndexMap.AXIS_SEPARATOR, i % 4)))
_check(
Could you please suggest if support for AXIS_SEPARATOR is present in AlterOpLayout ? If yes, could you please suggest an example on how it can be used ?
Thanks.