Closed orion160 closed 8 months ago
Reproduced with the fresh intel/llvm build. I'm not sure if it's intended or just a small bug in assert. I guess @steffenlarsen can provide more info as he implemented this.
Hi @orion160 ! The assertion you see is in relation to the following statement from the SYCL 2020 specification:
[...] Both unsampled image accessor classes support the access_mode::read and access_mode::write access modes. In addition, the host_unsampled_image_accessor class supports access_mode::read_write.
The accessor you are trying to create is a device accessor, given the default image_target::device
. That said, it is a little confusing that the default for non-const DataT is invalid.
Also what is image pitch, and why can I set it on a constructor?
The pitch lets you specify how many bytes wide rows and columns are in the image. This isn't necessarily the same as the corresponding dimension in the image range, as images may have padding at the end of each row and column.
As a side note, all devices in DPCPP will report false
for info::device::image_support
so using unsampled_image
and the corresponding unsamped_image_accessor
on them is not supported. You can still use SYCL 1.2.1 images on devices that report support for aspect::ext_intel_legacy_image
, though note that they are likely not going to stay around forever. Alternatively, you could have a go at sycl_ext_oneapi_bindless_images.
Definetively the default ctor triggered the issue.
On SYCL 2020 reference get_access<DataT, Mode, Targ>. Mode needs to be read, or read_write. But on Intel 2024.0.2 I get a compilation error by an static assert.
https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_unsampled_image_interface
Also what is image pitch, and why can I set it on a constructor?
Originally posted by @orion160 in https://github.com/intel/llvm/discussions/12720