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

clang version 18.0.0 gives runtime error while creating sycl::queue with sycl::image support #11135

Closed
ghost opened this issue Sep 11, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 11, 2023

sycl::queue created with aspect_selector(sycl::aspect::image) throws runtime error on clang version 18.0.0

To Reproduce

  1. Reproducer code snippet - test.txt
  2. Command to compile and run - clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda test.cpp && ./a.out
  3. Run time error thrown-

terminate called after throwing an instance of 'sycl::_V1::runtime_error' what(): No device of requested type available. -1 (PI_ERROR_DEVICE_NOT_FOUND) Aborted (core dumped)

Expected Output -

Starting...
Creating queue with sycl image support...

Running on NVIDIA H100 PCIe

Environment (please complete the following information):

Additional context

Code gives expected output with clang 17.0.0

clang version 17.0.0 (https://github.com/intel/llvm a7a6de2)
Target: x86_64-unknown-linux-gnu
Thread model: posix

@ghost ghost added the bug Something isn't working label Sep 11, 2023
@AlexeySachkov
Copy link
Contributor

Hi @Shwetha-Selma,

Tagging @steffenlarsen here to comment, but I think that the result is expected: sycl::aspect::image stands for SYCL 2020 images support and there are no devices which would support them. We have added an extension to query support for legacy 1.2.1 images.

See #9217 and #9368 for more details.

@ghost
Copy link
Author

ghost commented Sep 13, 2023

Hi @Shwetha-Selma,

Tagging @steffenlarsen here to comment, but I think that the result is expected: sycl::aspect::image stands for SYCL 2020 images support and there are no devices which would support them. We have added an extension to query support for legacy 1.2.1 images.

See #9217 and #9368 for more details.

Hi @AlexeySachkov Thanks for the reply, changing sycl::aspect::image to sycl::aspect::ext_intel_legacy_image resolved my issue.
But I have a couple of queries,

  1. Is legacy 1.2.1 images part of SYCL bindless images?
  2. SYCL images do not support single-channel image format hence we had to manually adjust it to 4-channel image format, Is this the same for SYCL bindless images as well? or do bindless images provide support for single-channel image format?

@steffenlarsen
Copy link
Contributor

Tag @ProGTX to help answer the bindless image questions above.

@ghost
Copy link
Author

ghost commented Sep 25, 2023

Tag @ProGTX to help answer the bindless image questions above.

@ProGTX @steffenlarsen @przemektmalon @Seanst98 Any answers/update for my question?

@steffenlarsen
Copy link
Contributor

Alternatively, tag @przemektmalon | @Seanst98 .

@przemektmalon
Copy link
Contributor

Hi @Shwetha-Selma, to answer your queries regarding bindless images

1. Is legacy 1.2.1 images part of **SYCL bindless images**?

I'm not 100% how to interpret this, so please let me know if this answers your query.

The sycl::aspect::ext_intel_legacy_image is not the aspect that enables bindless images. The aspect for our extension is sycl::aspect::ext_oneapi_bindless_images. Legacy 1.2.1 images are not part of Bindless Images.

Our Bindless Image extension does, however, introduce some aspects of images that were originally in SYCL 1.2.1. E.g., we re-introduce sycl::image_channel_order and sycl::image_channel_type.

2. SYCL images do not support single-channel image format hence we had to manually adjust it to 4-channel image format, Is this the same for SYCL bindless images as well? or do bindless images provide support for single-channel image format?

Bindless images provide support for 1-, 2-, and 4-channel images.

@isaacault
Copy link
Contributor

But I have a couple of queries,

Hi @Shwetha-Selma, I believe I may be able to help.

1. Is legacy 1.2.1 images part of **SYCL bindless images**?

SYCL Bindless Images, as outlined in the Experimental Extension Doc, are part of neither legacy 1.2.1 images nor 2020 images. As well, neither of 1.2.1 images nor 2020 images are part of bindless images.

As stated in the doc, bindless images are "meant as building blocks for implementing SYCL 2020 images on top of", making bindless images their own type but with there being an influence from 2020 images.

If you would like to query for support of SYCL Bindless images, please use sycl::aspect::ext_oneapi_bindless_images.

2. SYCL images do not support single-channel image format hence we had to manually adjust it to 4-channel image format, Is this the same for SYCL bindless images as well? or do bindless images provide support for single-channel image format?

Bindless images support 1, 2, or 4 channel image formats. The specifics can be found in the here, where you'll see that Bindless images have reverted from the SYCL 2020 image_format way back to the legacy image_channel_order and image_channel_type, allowing for more flexibility from the user.

@ghost
Copy link
Author

ghost commented Sep 25, 2023

@przemektmalon @isaacault Thanks so much for the detailed answer, it does clear my doubts.

@AlexeySachkov
Copy link
Contributor

@przemektmalon @isaacault Thanks so much for the detailed answer, it does clear my doubts.

@Shwetha-Selma, does it mean that we can close the issue? Are there any other questions left unanswered?

@ghost
Copy link
Author

ghost commented Sep 25, 2023

@przemektmalon @isaacault Thanks so much for the detailed answer, it does clear my doubts.

@Shwetha-Selma, does it mean that we can close the issue? Are there any other questions left unanswered?

My doubts are clarified. you can close this issue.

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

4 participants