vinx13 commented on a change in pull request #10538:
URL: https://github.com/apache/tvm/pull/10538#discussion_r826469735



##########
File path: python/tvm/tir/function.py
##########
@@ -239,3 +240,40 @@ def get(name: str):
             The TensorIntrin with the specified name.
         """
         return _ffi_api.TensorIntrinGet(name)  # pylint: type: ignore
+
+
+@tvm._ffi.register_object("tir.IndexMap")
+class IndexMap(Object):
+    """A mapping from multi-dimensional indices to another set of 
multi-dimensional indices
+
+    Parameters
+    ----------
+    initial_indices : List[Var]
+        Variables representing the indices prior to remapping.
+    final_indices : List[PrimExpr]
+        Expressions defining the indices after remapping.
+    """
+
+    initial_indices: List[Var]
+    final_indices: List[PrimExpr]
+
+    @staticmethod
+    def from_func(func: Callable) -> "IndexMap":

Review comment:
       updated, for (1), I changed this to call constructor in python side, 
because even if we propagate the names, there are still naming issues of using 
`IndexMap::FromFunc` in C++ side




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to