tqchen commented on a change in pull request #5743:
URL: https://github.com/apache/incubator-tvm/pull/5743#discussion_r436378200
##########
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:
you are right, it is mainly used to prevent some false positive compiler
warnings. Also it is not as wasteful since we are already adding a global
vtable anyway in this case
----------------------------------------------------------------
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]