cyx-6 commented on code in PR #13801:
URL: https://github.com/apache/tvm/pull/13801#discussion_r1073120538


##########
src/script/printer/tir/buffer.cc:
##########
@@ -126,6 +126,18 @@ ExprDoc BufferDecl(const tir::Buffer& buffer, const 
String& method, const Array<
                     /*args=*/args);
 }
 
+ExprDoc BufferAttn(const tir::Buffer& buffer, const ObjectPath& p, const 
Frame& frame,
+                   const IRDocsifier& d) {
+  Map<String, ExprDoc> attrs = BufferAttrs(buffer, p, frame, d);
+  Array<Doc> indices_doc;
+  for (String s : {"shape", "dtype"}) {
+    if (Optional<ExprDoc> doc = attrs.Get(s)) {
+      indices_doc.push_back(doc.value());
+    }
+  }
+  return TIR("Buffer")[indices_doc];

Review Comment:
   but `->Call` may generate `T.Buffer()` instead of `T.Buffer[]`?



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