vinx13 commented on code in PR #13565:
URL: https://github.com/apache/tvm/pull/13565#discussion_r1041368715


##########
src/tir/schedule/primitive/layout_transformation.cc:
##########
@@ -1079,7 +1079,13 @@ IndexMap LegalizeIndexMapDType(const IndexMap& 
index_map, const Buffer& buf) {
       return SubstituteWithDataTypeLegalization(index,
                                                 [&](const Var& var) { return 
var_map.Get(var); });
     });
-    return IndexMap(initial_indices, final_indices);
+    Optional<IndexMap> opt_inverse_index_map =
+        Downcast<Optional<IndexMap>>(index_map->inverse_index_map);
+    if (opt_inverse_index_map.defined()) {
+      IndexMap inverse_index_map = 
Downcast<IndexMap>(opt_inverse_index_map.value());
+      opt_inverse_index_map = LegalizeIndexMapDType(inverse_index_map, 
final_indices);

Review Comment:
   updated, I'm keeping L1083 as `inverse_index_map` is defined as 
`Optional<ObjectRef>` 



-- 
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