-
Notifications
You must be signed in to change notification settings - Fork 645
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
Check isIntOrFloat
before querying bitwidth
#19172
Conversation
Signed-off-by: Ian Wood <[email protected]>
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 you have a test that would be useful to add to https://github.com/iree-org/iree/blob/main/compiler/src/iree/compiler/Codegen/LLVMCPU/test/select_x86_64_lowering_strategy.mlir or any other select_*.mlir
file there
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'm not aware that there are types other than int/float being the inputs of codegen. Can you elaborate how you discover the case and how does it get to the CPU codegen inputs? Or can you give me an example that can reproduce it at iree-opt/iree-compile level?
I left a similar comment on #19185 (review)
We can have complex types for inputs. LLaMa has complex types. |
This was popping up with complex types in https://github.com/nod-ai/shark-ai, but there were recent changes to that repo so I don't know where the llama server integration test has been moved. I think https://gist.github.com/IanWood1/ccbcc62dca7a77d00a4ceaecb8fe38a2 will repro with Edit: you have to checkout #19187 since the other error is hit befor this one |
I think 3e40798 is a better fix, which adds the computation for complex types. In this case, can you copy below test with CPU variants to one of |
This reverts commit 2d3bd37. Signed-off-by: Ian Wood <[email protected]>
…omplex numbers Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
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.
Thanks, just a couple nits!
compiler/src/iree/compiler/Codegen/LLVMCPU/test/select_x86_64_lowering_strategy.mlir
Outdated
Show resolved
Hide resolved
@hanhanW I used @giacs-epic's commit instead and added a test. I just copied the test you mentioned and adjusted the tile sizes. Would you be able to check if it makes sense? Also, @giacs-epic are you ok with hanhan's suggestion in #19185 (comment) to commit this with you as coauthor? |
Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
compiler/src/iree/compiler/Codegen/LLVMCPU/test/select_x86_64_lowering_strategy.mlir
Outdated
Show resolved
Hide resolved
@IanWood1 @hanhanW A few other places that computes size (mostly in emulating narrow types) do not assume the type is a I will see if |
We can skip complex types in the emulation for now. My guess is that it is not needed by the emulation. If we need it, then we implement it. |
Signed-off-by: Ian Wood <[email protected]>
The element type must be an int or float before using `getIntOrFloatBitWidth`. This adds a check if the element type is an int or float, otherwise don't adjust innermost tile size. Introduced by commit iree-org@c80fa3b 1/2 fix for iree-org#19167. --------- Signed-off-by: Ian Wood <[email protected]> Co-authored-by: giacs-epic <[email protected]>
The element type must be an int or float before using `getIntOrFloatBitWidth`. This adds a check if the element type is an int or float, otherwise don't adjust innermost tile size. Introduced by commit iree-org@c80fa3b 1/2 fix for iree-org#19167. --------- Signed-off-by: Ian Wood <[email protected]> Co-authored-by: giacs-epic <[email protected]> Signed-off-by: Giacomo Serafini <[email protected]>
The element type must be an int or float before using
getIntOrFloatBitWidth
. This adds a check if the element type is an int or float, otherwise don't adjust innermost tile size. Introduced by commit c80fa3b1/2 fix for #19167.