-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
The generation of spirv array type is wrong #7855
Comments
ouch... How did it compile and work on all these GPUs tho |
Oh... right we don't declare arrays but rather runtime arrays |
bobcao3
pushed a commit
that referenced
this issue
Apr 21, 2023
Issue: fixes #7855 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 8f35995</samp> Fix array size encoding bug in SPIR-V backend. Use `int_immediate_number` to create SPIR-V constants for array types in `spirv_types.cpp`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 8f35995</samp> * Fix a bug where array size was not encoded as a SPIR-V constant ([link](https://github.com/taichi-dev/taichi/pull/7863/files?diff=unified&w=0#diff-259a89b8645aab6065eac94864cd4930be7ae91da5cb2e15307ae5fa41015962L456-R459)) * Use `int_immediate_number` to create a constant operand for `OpTypeArray` ([link](https://github.com/taichi-dev/taichi/pull/7863/files?diff=unified&w=0#diff-259a89b8645aab6065eac94864cd4930be7ae91da5cb2e15307ae5fa41015962L456-R459))
quadpixels
pushed a commit
to quadpixels/taichi
that referenced
this issue
May 13, 2023
Issue: fixes taichi-dev#7855 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 8f35995</samp> Fix array size encoding bug in SPIR-V backend. Use `int_immediate_number` to create SPIR-V constants for array types in `spirv_types.cpp`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 8f35995</samp> * Fix a bug where array size was not encoded as a SPIR-V constant ([link](https://github.com/taichi-dev/taichi/pull/7863/files?diff=unified&w=0#diff-259a89b8645aab6065eac94864cd4930be7ae91da5cb2e15307ae5fa41015962L456-R459)) * Use `int_immediate_number` to create a constant operand for `OpTypeArray` ([link](https://github.com/taichi-dev/taichi/pull/7863/files?diff=unified&w=0#diff-259a89b8645aab6065eac94864cd4930be7ae91da5cb2e15307ae5fa41015962L456-R459))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
taichi/taichi/codegen/spirv/spirv_types.cpp
Lines 456 to 458 in db13138
We should pass the shape as a spirv value of int immediate number instead of an int literal.
The text was updated successfully, but these errors were encountered: