Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
713 Discussions

Settings of DPC++ toolchain within MS VisualStudio 2022 Pro on Windows 11 for NVIDIA cards

YKolesnikov
Beginner
260 Views

Hi there!

I have laptop with integrated Intel(R) UHD Graphics 770 and dedicated NVIDIA RTX A3000 12GB.
It is running Windows 11 with Visual Studio Pro 2022 and CUDA v12.3.

One top I've installed oneAPI HPC toolkit 2025 and plugin from Codeplay (oneapi-for-nvidia-gpus-2025.0.0-cuda-12.0-windows.msi). Integration went well. New template projects appeared within MSVS2022 environment. 

Then I have a test command-line project within MSVS2022 using sycl in order to multiplying two matrices (attached).
 
For Intel card whole test working no problem with default settings in Release configuration, I can executed and receive expected results.

Then I've clone the configuration into new one ReleaseNVIDIA, and selected NVIDIA device programmatically, so to create a Queue.
Build went ok, yet sycl code was not executed, giving me "SYCL ERROR: Native API failed. Native API returns: 7 (UR_RESULT_ERROR_INVALID_BINARY)"

I've realized it was not generated for the target platform, so I've put in dpcpp command line options

-fsycl -fno-bundle-offload-arch -fsycl-targets=nvptx64-nvidia-cuda

and it was accepted but still getting warning during the build

1>icx-cl: : warning : linked binaries do not contain expected 'spir64-unknown-unknown' target; found targets: 'nvptx64-nvidia-cuda' [-Wsycl-target]

and error 

"SYCL ERROR: No kernel named _ZTS15mmult_naive_bufIfE was found" during run-time

What other settings I have to specify for DPC++ and Linker within VisualStudio 2022 to target NVIDIA card?

Many thanks!
Best regards
Yuli

0 Kudos
1 Reply
wdx04
Beginner
103 Views

I'm getting the same error with Visual Studio 2022, CUDA 12.6 and oneAPI compiler 2025.0.

The linker always expects the spir64-unkown-unknown target, regardless of the compiler's -fsycl-targets parameters.

 

0 Kudos
Reply