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

spirv OpExtension SPV_KHR_non_semantic_info is not supported #614

Open
gglin001 opened this issue Dec 19, 2024 · 2 comments
Open

spirv OpExtension SPV_KHR_non_semantic_info is not supported #614

gglin001 opened this issue Dec 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gglin001
Copy link

Version

4.0.0

What behaviour are you expecting?

running a debug version sycl app with OCK, using https://github.com/intel/llvm

What actual behaviour are you seeing?

...

What steps are required to reproduce the bug?

https://github.com/intel/llvm/blob/sycl/sycl/test/native_cpu/vector-add.cpp

clang++ -g -fsycl -fsycl-targets=spir64 -fuse-ld=lld \
 vector-add.cpp -o main

./main

report

terminate called after throwing an instance of 'sycl::_V1::exception'
  what():  The program was built for 1 devices
Build program log for 'device':
error: OpExtension SPV_KHR_non_semantic_info not supported by device

Aborted

need supporting spirv SPV_KHR_non_semantic_info in OCK

Minimal test case

No response

Anything else we should know?

No response

@gglin001 gglin001 added the bug Something isn't working label Dec 19, 2024
@hvdijk
Copy link
Collaborator

hvdijk commented Dec 19, 2024

Hi, thanks for the report.

SPV_KHR_non_semantic_info is a SPIR-V extension, and SPIR-V extensions are not necessarily accepted by all implementations. Strictly speaking, it is not a bug for any OpenCL implementation to not support it, and ideally, DPC++ would have a way to stop this extension from being used when not supported. However, at the same time, I realise that is not possible since DPC++ has no knowledge at compilation time which OpenCL implementation will be used at runtime, and the cost is minimal to add support for an extension that only adds instructions that have no effect. So I agree that we should add support for this extension, which will then allow the code to run.

However, this will likely not be enough to also allow the device code to be debugged. Could you clarify whether you are merely looking to have the code run, or also to be able to debug it?

@gglin001
Copy link
Author

hi, thanks for your reply

Could you clarify whether you are merely looking to have the code run, or also to be able to debug it?

I think may be OCK could just support the code run and convert SPV_KHR_non_semantic_info related debug-info/instructions into other supported debug infos(eg ocl-100) ? I am not a SPIRV expert

extra info:

just tried

clang -fsycl ... \
  -g \
  -Xspirv-translator --spirv-debug-info-version=ocl-100 \
...

seems works on vector-add.cpp demo, but fails on other more complex projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants