tqchen commented on a change in pull request #9727:
URL: https://github.com/apache/tvm/pull/9727#discussion_r817935868
##########
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:
The storage type consistency is an assumption that was being made
before. Not sure if such generalization is OK.
Ideally the common type sharing should be done with an explicit cast of
pointer type, rather than implicit cast here.
Would be great to leave a TODO to revisit here, cc @Lunderberg @vinx13
@junrushao1994
--
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]