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


##########
src/tir/schedule/primitive/layout_transformation.cc:
##########
@@ -1079,7 +1079,12 @@ 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()) {
+      opt_inverse_index_map = 
LegalizeIndexMapDType(opt_inverse_index_map.value(), final_indices);

Review Comment:
   Can we guarantee that this recursive call would always bottom out?



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