Lunderberg commented on a change in pull request #9727:
URL: https://github.com/apache/tvm/pull/9727#discussion_r818717609



##########
File path: src/tir/ir/buffer.cc
##########
@@ -407,22 +515,31 @@ PrimExpr Buffer::access_ptr(int access_mask, DataType 
ptr_type, int content_lane
 
 Buffer::Buffer(Var data, DataType dtype, Array<PrimExpr> shape, 
Array<PrimExpr> strides,
                PrimExpr elem_offset, String name, int data_alignment, int 
offset_factor,
-               BufferType buffer_type, Span span) {
+               BufferType buffer_type, Array<IntImm> axis_separators, Span 
span) {
   DataType storage_dtype = dtype;
   // specially handle bool
   if (storage_dtype == DataType::Bool()) {
     storage_dtype = DataType::Int(8);
   }
-  ICHECK(IsPointerType(data->type_annotation, storage_dtype))
-      << "Buffer data field expect to have the right pointer type annotation"
-      << " annotation=" << data->type_annotation << ", storage_dtype=" << 
storage_dtype;
+  // The buffer dtype may differ from the dtype of the underlying

Review comment:
       Agreed, explicit casts will be better, and should be included in later 
updates.  (Maybe also handling bool with explicit casts as well, to minimize 
the special case code for it.)  Added a TODO to make sure that it gets 
revisited.




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