[SYCL][CUDA][WIP] Lower OpenCL image type to CUDA image descriptors #1978
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expands upon functionality introduced in #1945 and provides testing. Should be merged after #1945.
In CUDA images are descriptors represented as an 64 bits integer. The PR lowers the OpenCL image type to this descriptor so it can be processed properly by the NVPTX backend and allow image builtins implementation for this target.
Independent image/sampler are not supported by CUDA, they will be emulated in the libclc. To allow this emulation we need to lower the sampler type to i32. The sampled image type (return type of __spirv_SampledImage) is lowered into a struct containing the image descriptor (i64) and the sampler (i32).