intel / intel/llvm

Unable to run CUDA backend compiled sample (Windows 10)

Open
#11,058 2 comments 0 reactions 0 assignees View on GitHub
bug cuda
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

**Bug Description**
Unable to run compiled CUDA backend target sample code. Running with SYCL_PI_TRACE=-1 shows the following load fail
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: pi_cuda.dll

**NOTE** : Compiling to target CPU works ( clang++ -fsycl simple-sycl-app.cpp -o simple-sycl-app.exe and the ONEAPI_DEVICE_SELECTOR is not set )

**To Reproduce**
The simple-sycl-app.cpp described in the getting started document is used.

Compile and run command:
1) set PATH=%DPCPP_HOME%\llvm\build_cuda\install\bin;%PATH%
2) set LIB=%DPCPP_HOME%\llvm\build_cuda\install\lib;%LIB%
3) clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -o simple-sycl-app.exe
4) set ONEAPI_DEVICE_SELECTOR=cuda:*
5) set SYCL_PI_TRACE=-1
6) simple-sycl-app.exe

Result:
---> DLL_PROCESS_ATTACH pi_win_proxy_loader.dll
---> DLL_PROCESS_ATTACH pi_opencl.dll
---> DLL_PROCESS_ATTACH syclx.dll
SYCL_PI_TRACE[all]: Check if plugin is present. **Failed to load plugin: pi_cuda.dll**
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: pi_unified_runtime.dll [ PluginVersion: 14.38.1 ]

**Environment:**
*Hardware*
OS : Windows 10 Pro , 22H2
OS build : 19045.3324
CPU: Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz 3.40 GHz
GPU: NVIDIA GeForce GTX 1080 Ti

*Driver*
Version: 536.67
CUDA : NVIDIA CUDA 12.2.128 driver

*Windows SDK*
-Version 10.0.19041.0

*Tools*
-Git (2.42.0) 64-bit latest Windows 64 bit version installed. Default options
-Cmake, cmake-3.27.4-windows-x86_64.msi
-Python, python-3.11.5-amd64.exe
-Ninja, v1.11.1 (latest)
-cuda_12.2.1_536.67_windows.exe
-Visual Studio : 2019 Community Version, Version 16.11.29
-Command Prompt : x64 Native Tools Command Prompt for VS 2019
-nvcc --version
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Jul_11_03:10:21_Pacific_Daylight_Time_2023
Cuda compilation tools, release 12.2, V12.2.128
Build cuda_12.2.r12.2/compiler.33053471_0
--clang++ --version
clang version 18.0.0 (https://github.com/intel/llvm 7897517c3a5ebbe4e05977d9b8cc0dd28a192d98)
Target: x86_64-pc-windows-msvc
Thread model: posix

**Additional context**
clang configure and compile command
python %DPCPP_HOME%\llvm\buildbot\configure.py -o %DPCPP_HOME%\llvm\build_cuda --cuda
python %DPCPP_HOME%\llvm\buildbot\compile.py -o %DPCPP_HOME%\llvm\build_cuda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.