comaniac commented on a change in pull request #6686:
URL: https://github.com/apache/incubator-tvm/pull/6686#discussion_r505784167



##########
File path: src/te/schedule/schedule_dataflow_rewrite.cc
##########
@@ -138,6 +138,15 @@ Tensor Schedule::cache_read(const Tensor& tensor, const 
std::string& scope,
   }
   os << "." << scope;
 
+  // when a schedule has multiple cache_read on the same tensor,
+  // we make sure their op names are unique. e.g., w.shared, w.shared.d, 
w.shared.d.d
+  for (auto pair : (*this)->stage_map) {
+    auto stage = pair.second;
+    if (stage->op->name == os.str()) {
+      os << ".d";

Review comment:
       I changed the naming to `w.shared`, `w.d.shared`, because we use 
`StrEndsWith(op->name, ".shared")` in thread binding.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to