junrushao1994 commented on a change in pull request #5743:
URL: https://github.com/apache/incubator-tvm/pull/5743#discussion_r436341934



##########
File path: include/tvm/tir/buffer.h
##########
@@ -203,6 +203,61 @@ inline const BufferNode* Buffer::operator->() const {
  */
 TVM_DLL Buffer decl_buffer(Array<PrimExpr> shape, DataType dtype = 
DataType::Float(32),
                            std::string name = "buffer");
+
+/*!
+ * \brief Base node for data producers.
+ *
+ *  A DataProducer stores necessary information(e.g. a tensor expression) to 
produce
+ *  a multi-dimensional array. The stored information is opaque to the TIR.
+ *  DataProducer can appear in high-level DSLs that are built on top of the 
TIR.
+ *
+ *  A valid TIR PrimFunc should not contain any DataProducer, high level DSLs 
should lower
+ *  all DataProducers to Buffers before TIR transformations.
+ *
+ * \sa tvm::te::Tensor
+ */
+class DataProducerNode : public Object {
+ public:
+  /*! \brief destructor. */
+  virtual ~DataProducerNode() {}

Review comment:
       Why we need this virtual destructor? My understanding is that if a TVM 
object is created via `runtime::make_object`, then the destructor will be set 
properly in the object system




----------------------------------------------------------------
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:
[email protected]


Reply via email to