Skip to content
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 SPIR-V validation #354

Merged
merged 6 commits into from
May 18, 2021
Merged

Fix SPIR-V validation #354

merged 6 commits into from
May 18, 2021

Conversation

akharche
Copy link
Contributor

@akharche akharche commented May 12, 2021

This PR only affects spirv validation (NUMBA_DPPY_SPIRV_VAL=1). It resolves the problem with not appropriate debug instruction name for offloading with ocl.
If we don't add --spirv-debug-info-version=ocl-100 flag to spirv generating, we get the following error:
error: line 9: Invalid extended instruction import 'SPIRV.debug'

Add OpenCL.DebugInfo.100 as flag to SPIRV generator according to specification: https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.DebugInfo.100.html

@PokhodenkoSA
Copy link
Contributor

Consider to add the flag only in debug mode.

@diptorupd
Copy link
Contributor

@akharche please add some comments/documentation about what the flag does and why it is needed. The link to the manual is good, but a summary needs to be provided in the PR. Very hard to make out the motivation for the PR from the link to the spec.

@akharche
Copy link
Contributor Author

@akharche please add some comments/documentation about what the flag does and why it is needed. The link to the manual is good, but a summary needs to be provided in the PR. Very hard to make out the motivation for the PR from the link to the spec.

@diptorupd the PR description was updated

@PokhodenkoSA
Copy link
Contributor

PokhodenkoSA commented May 18, 2021

@akharche we have no user docs about NUMBA_DPPY_SPIRV_VAL. Could you add it please?
Also it would be better to enable validation in CI.

@akharche akharche changed the title Generate spirv with right debug name Fix SPIR-V validation May 18, 2021
@akharche
Copy link
Contributor Author

@PokhodenkoSA It's a good idea to add validation to CI, but firstly we need to fix it fully

@PokhodenkoSA PokhodenkoSA merged commit ba0d507 into main May 18, 2021
@akharche akharche deleted the akharche/add_llvm_spirv_flag branch May 18, 2021 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants