-
Notifications
You must be signed in to change notification settings - Fork 668
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
Adding e2e tests for i1 mask attentions #19312
Conversation
35f7356
to
9985827
Compare
9985827
to
6983fa5
Compare
@raikonenfnu @ScottTodd comments are addressed. Can you review again? |
%mask = util.unfoldable_constant dense<[[[true, true, true, true], | ||
[true, true, true, true], | ||
[true, true, true, true], | ||
[true, true, true, true]]]> : tensor<1x4x4xi1> |
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.
For unit testing, would it be useful to set some of these mask values to false
?
Maybe add a new test case attention1x4x4_i1_mask_some_ones
?
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.
There is already a test which has some mask values set to false
in the same file, so I am not testing it for general cases. This all ones test has a copy in attention_i1_mask.mlir
, the purpose is to test that the results are exactly the same under both memory layout configurations.
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.
If we intend to set all values to true, why not just write something like dense<true>
?
372984a
to
f2587f5
Compare
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.
LGTM, thanks!
To test actual i1 handling with attention op. Signed-off-by: Alan Li <me@alanli.org>
f2587f5
to
b26f268
Compare
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.
It is better to name it to attention_i1_packed_mask.mlir
, which clearly make a distinction between this and the test in the other file.
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.
--iree-experimental-packed-i1-storage
turned on, which allows real packed i1 datatype in memory.