-
Notifications
You must be signed in to change notification settings - Fork 263
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
Fix codegen bug when targeting PTX with new API #6506
Fix codegen bug when targeting PTX with new API #6506
Conversation
8d27bf0
to
e3c1454
Compare
8a360de
to
216c894
Compare
This just compiles tests/compute/simlpe.slang for PTX with the new compilation API, in order to reproduce a code generation bug.
…wring For shaders like tests/compute/simple.slang, which have a 'numthreads' attribute but no 'shader' attribute, the old compile request API would add an EntryPointAttribute to the AST node of the entry point. However, the new API doesn't, and so a certain ConstRef hack doesn't get applied when using the new API, leading to subsequent code generation issues. This patch also checks for a 'numthreads' attribute when deciding whether to apply the ConstRef hack. This closes issue shader-slang#6507 and helps to resolve issue shader-slang#4760.
Our GitHub runners don't have the CUDA toolkits installed, so they can't run all tests.
216c894
to
fb67a82
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.
I'm curious. What is the "runner" test list meant for, and why couldn't expected-failure-github.txt be used?
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.
Our GitHub runners don't have the CUDA toolkits installed, so they can't run all tests.
The unit test I add targets PTX and so needs the CUDA toolkit.
Ideally this should be detected at runtime, but I don't think we can readily do that.
The test should be short-lived, so I just added the runner list as a means to filter.
See issue #6507 for debugging notes.
This closes issue #6507.