Skip to content

[SYCL][CUDA][WIP] Lower OpenCL image type to CUDA image descriptors #1978

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
Jul 6, 2020

Conversation

nyalloc
Copy link
Contributor

@nyalloc nyalloc commented Jun 24, 2020

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).

@bader bader added the cuda CUDA back-end label Jun 24, 2020
@nyalloc nyalloc changed the title [SYCL][CUDA][WIP] Updated CGOpenCLRuntime.cpp [SYCL][CUDA] Updated CGOpenCLRuntime.cpp Jun 24, 2020
@nyalloc nyalloc changed the title [SYCL][CUDA] Updated CGOpenCLRuntime.cpp [SYCL][CUDA][WIP] Updated CGOpenCLRuntime.cpp Jun 25, 2020
@nyalloc nyalloc changed the title [SYCL][CUDA][WIP] Updated CGOpenCLRuntime.cpp [SYCL][CUDA][WIP] Updated CGOpenCLRuntime Jun 25, 2020
@Fznamznon Fznamznon requested a review from bader June 25, 2020 15:53
@bader
Copy link
Contributor

bader commented Jun 25, 2020

@StuartDAdams, @Naghasan, do you want to commit #1945 and #1978 separately or we can commit them in a single PR?

@Naghasan
Copy link
Contributor

@StuartDAdams, @Naghasan, do you want to commit #1945 and #1978 separately or we can commit them in a single PR?

Either is fine for us. I split the 2 PR so that keep the generic compiler addition and the CUDA specific handling separate, this can help with history.

So that's up to you.

@bader
Copy link
Contributor

bader commented Jun 25, 2020

I split the 2 PR so that keep the generic compiler addition and the CUDA specific handling separate, this can help with history.

Ah... I didn't get this part. Separate PRs make sense to me now. :-)

@nyalloc nyalloc changed the title [SYCL][CUDA][WIP] Updated CGOpenCLRuntime [SYCL][CUDA][WIP] Lower OpenCL image type to CUDA image descriptors Jun 25, 2020
Implemented sampled_image_cuda.cl
@nyalloc nyalloc force-pushed the stuart/CGOpenCLRuntime branch from 24d862a to 5258552 Compare June 26, 2020 14:19
@bader bader merged commit 7ca1729 into intel:sycl Jul 6, 2020
againull pushed a commit to againull/llvm that referenced this pull request May 4, 2023
In NonSemantic.Shader.DebugInfo.200 DebugLexicalBlock has Inline
namespace parameter, which specifies if C/C++ namespace is inline or not.
It allows us to save `exportSymbols` field of `DINamespace` metadata.

Spec:
KhronosGroup/SPIRV-Registry#186

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@9729086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants