Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[i1] Remove command line option to enable packed storage #19528
base: main
Are you sure you want to change the base?
[i1] Remove command line option to enable packed storage #19528
Changes from all commits
3d5d0bb
6e9fa41
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want this dependency. I think you want to reuse
dropEncoding
method. Let's move it toEncoding/EncodingTypes.h
andEncodingAttr.cpp
.(Ideally we should move the implementation to
EncodingTypes.cpp
. I haven't started the work because we have few people touching the dialect at this moment. I'll send a cleanup after you finish the i1 work.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed all those deps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a general rule there are to be no codegen deps in non-codegen directories - dropPackedStorageEncodingIfAny should be moved to EncodingTypes.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directly reference this when required - it hurts readability to have aliases like this (as a user will just see getEncodingAttr and not know if it's on their type, in the dialect they are in, etc) - I'm not sure we want this function anywhere, though, as commented below (the flow/stream dialects should support all encodings, not just those in the encoding dialect)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required by
flow.tensor.bitcast
lowering? I.e., the op is lowered to flow.tensor.clone and you need to bypass the check?I'm not convinced that the change is correct. Because the
getEncodingAttr
checks if the tensor type hasIREE::Encoding::EncodingAttr
attribute. There could be other encodings and it is a bug if we introduce new encodings. E.g.,tensor<3x4xi32, #whatever_other_encoding_with_padding_semantic>
can not be cloned totensor<3x4xi32>
. I think we need to have a stronger restriction. Perhaps just relax the check for packed_storage encoding?iree/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.cpp
Lines 278 to 280 in 27e7a90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little tricky. And yes this is required by
flow.tensor.bitcast
, and we would sometimes cast from a tensor without attribute to another tensor with packed attribute. In such case, we shouldn't check if both the source and result matches packed attribute.I have slightly updated it to exclude packed attribute comparison. Suggestions are welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with hanhan - I'm not sure why this changed - if it is indeed tricky it's too tricky to be as opaque as this. The op behavior and the comment both state the existing code was the check that was desired, and not that we should allow non-encoding-dialect encodings to be ignored.
This file was deleted.