junrushao1994 commented on a change in pull request #8863:
URL: https://github.com/apache/tvm/pull/8863#discussion_r698136293



##########
File path: src/tir/schedule/transform.cc
##########
@@ -31,5 +31,44 @@ Block WithAnnotation(const BlockNode* block, const String& 
attr_key, const Objec
   return Block(new_block);
 }
 
+/******** Buffer Related ********/
+Buffer WithScope(const Buffer& buffer, const String& scope) {
+  auto n = make_object<BufferNode>(*buffer.get());
+  auto new_ptr = make_object<VarNode>(*n->data.get());
+  const auto* ptr_type = new_ptr->type_annotation.as<PointerTypeNode>();
+  ICHECK(ptr_type);

Review comment:
       ```suggestion
     ObjectPtr<BufferNode> n = make_object<BufferNode>(*buffer.get());
     ObjectPtr<VarNode> new_ptr = make_object<VarNode>(*n->data.get());
     const auto* ptr_type = TVM_TYPE_AS(ptr_type, 
buffer->data->type_annotation, PointerTypeNode);
   ```




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