Will it work with NVIDIA GeForce RTX 3090?

I’m trying to try SYCL on my GeForceRTX3090. sycl-ls recognizes the device.

[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2 [2024.17.3.0.08_160000]
[opencl:cpu:1] Intel(R) OpenCL, Intel(R) Xeon(R) W-2223 CPU @ 3.60GHz OpenCL 3.0 (Build 0) [2024.17.3.0.08_160000]
[ext_oneapi_cuda:gpu:0] NVIDIA CUDA BACKEND, NVIDIA GeForce RTX 3090 8.6 [CUDA 12.0]

I have confirmed that a program that does nothing can be compiled.
(In Run a Sample Application, create a file simple-sycl-app.cpp with the following C++/SYCL code, comment out Accessor[WIid] = static_cast(WIid.get(0)))

ONEAPI_DEVICE_SELECTOR="ext_oneapi_cuda:*" SYCL_PI_TRACE=1 ./simple-sycl-app
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_cuda.so [ PluginVersion: 14.39.1 ]
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_unified_runtime.so [ PluginVersion: 14.39.1 ]
SYCL_PI_TRACE[all]: Requested device_type: info::device_type::automatic
SYCL_PI_TRACE[all]: Selected device: -> final score = 1500
SYCL_PI_TRACE[all]:   platform: NVIDIA CUDA BACKEND
SYCL_PI_TRACE[all]:   device: NVIDIA GeForce RTX 3090

If Accessor[WIid] = static_cast(WIid.get(0));, the following error will occur.

icpx  -fsycl -fsycl-targets=nvptx64-nvidia-cuda-sm_86 -Xsycl-target-backend=nvptx64-nvidia-cuda --offload-arch=sm_86  simple-sycl-app.cpp -o simple-sycl-app
fatal error: error in backend: Cannot select: intrinsic %llvm.nvvm.implicit.offset
llvm-foreach:
icpx: error: clang frontend command failed with exit code 70 (use -v to see invocation)

Can’t it work with RTX 3090?

Hi @k_matsu,

We would expect this to work, yes. I can think of a few things to try: firstly, you could try changing the SYCL target in your command line to be nvptx64-nvidia-cuda (i.e. remove the -sm_86). That is already specified later by the --offload-arch flag. Secondly you can try adding -mllvm -enable-global-offset=false to your command line, which might also fix the issue, though it’s a bit of a guess as I don’t fully understand why you are seeing the error you’re seeing.

I hope this helps,
Duncan.

Thank you for your advice.

I was able to do this by changing the compilation SYCL target from nvptx64-nvidia-cuda-sm_86 to nvptx64-nvidia-cuda.

I appreciate it very much.

icpx  -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend=nvptx64-nvidia-cuda --offload-arch=sm_86  simple-sycl-app.cpp -o simple-sycl-app

ONEAPI_DEVICE_SELECTOR="ext_oneapi_cuda:*" SYCL_PI_TRACE=1 ./simple-sycl-app

SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_cuda.so [ PluginVersion: 14.39.1 ]
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_unified_runtime.so [ PluginVersion: 14.39.1 ]
SYCL_PI_TRACE[all]: Requested device_type: info::device_type::automatic
SYCL_PI_TRACE[all]: Selected device: -> final score = 1500
SYCL_PI_TRACE[all]:   platform: NVIDIA CUDA BACKEND
SYCL_PI_TRACE[all]:   device: NVIDIA GeForce RTX 3090
The results are correct!
1 Like