Skip to content

[SYCL][CUDA][libclc] Fix out-of-bound behavior for none addressing mode. #5204

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

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

pgorlani
Copy link
Contributor

This fix makes the addressing_mode::none behavior in CUDA devices consistent with the host one avoiding CUDA_ERROR_ILLEGAL_ADDRESS errors in case of out-of-bound accesses.

@pgorlani pgorlani requested a review from bader as a code owner December 22, 2021 17:57
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it covered by existing tests?
If not, please, add a regression test.

@pgorlani
Copy link
Contributor Author

There are tests for image samplers in https://github.com/intel/llvm-test-suite/blob/intel/SYCL/Basic/image/image_accessor_readsampler.cpp, but they are not supported by the CUDA backend, due to the fact that many features regarding image channel datatypes/value conversions are missing. Unfortunately, the image support in the CUDA backend is very limited. The only tests supported in https://github.com/intel/llvm-test-suite/blob/intel/SYCL/Basic/image/ by the CUDA backend are in image.cpp, image_read.cpp, image_read_fp16.cpp and image_write_fp16.cpp, but they do not deal with samplers.

@bader
Copy link
Contributor

bader commented Dec 23, 2021

There are tests for image samplers in https://github.com/intel/llvm-test-suite/blob/intel/SYCL/Basic/image/image_accessor_readsampler.cpp, but they are not supported by the CUDA backend, due to the fact that many features regarding image channel datatypes/value conversions are missing. Unfortunately, the image support in the CUDA backend is very limited. The only tests supported in https://github.com/intel/llvm-test-suite/blob/intel/SYCL/Basic/image/ by the CUDA backend are in image.cpp, image_read.cpp, image_read_fp16.cpp and image_write_fp16.cpp, but they do not deal with samplers.

Okay, it sounds like we can use a separate test for this fix.

@bader bader merged commit fceb10e into intel:sycl Dec 23, 2021
@pgorlani pgorlani deleted the fix-none-addr-mode branch December 28, 2021 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants