Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

CMake and LLVM SYCL CUDA

usernameplusplus
Beginner
316 Views

Hi Everyone!

I'm looking for some help with the Intel LLVM compiler built with CUDA support on Windows.  I can't seem to use it with CMake.

I've followed the directions here (https://intel.github.io/llvm-docs/GetStartedGuide.html) To build the compiler with CUDA support, and I'm able to follow along with using the resulting clang++ to compile a sample program that I've verified is running on my Nvidia GPU.

However, when I try to use CMake passing clang/clang++ as the compilers, my configure step always fails at the compiler check step during the link. It appears that it's trying to use lld-link.exe for the linker instead of the MS Link.exe that I see when running clang++ on it's own to compile the sample program. However, lld-link.exe isn't built as part of the standard buildbot scripts.

I've tried everything I can think of.

I've tried adding the lld project when I build the compiler. The configure.py script shows that I've added the project, but when I run compile.py it doesn't generate lld-link.exe anywhere.

I've tried various tricks with CMake like using CXXFLAGS or LDFLAGS env vars to trick the compiler check to use Link.exe. I've even tried to manually merge my build of LLVM into the OneAPI folder at "C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.3" and use the instructions for using dpcpp with CMake here (https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-an...), but that just leads to all sorts of linking issues that are probably due to me having no idea how to properly merge the CUDA support build into OneAPI.

I can get it to build if I manually change lines 76 and 79 of "C:\Program Files\CMake\share\cmake-3.23\Modules\Platform\Windows-Clang.cmake" from "-fuse-ld=lld-link" to "-fuse-ld=link", but the resulting executable just crashes.

I'm sure it has something to do with how CMake separates the compile/link steps but I can't figure out where it's falling apart.  I can provide detailed logs for any step if needed.

Any help would be appreciated!

0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
270 Views

Hi,

 

Thanks for reaching out to us.

 

We offer support for hardware platforms that the Intel® oneAPI product supports. These platforms include those that are part of the Intel® Core™ processor family or higher, the Intel® Xeon® processor family, the Intel® Xeon® Scalable processor family, and others which can be found here –

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-base-too...

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-hpc-tool...

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-iot-tool...

 

As you are using opensource oneAPI, we suggest you raise this issue in Github for better assistance as we do not provide support for opensource oneAPI in this forum.

 

Please refer to the below GitHub link to raise this issue:

https://github.com/intel/llvm/issues

 

Thanks & Regards,

Noorjahan.

 

NoorjahanSk_Intel
Moderator
254 Views

Hi,


Has the information provided above helped? If yes, Could you please confirm whether we can close this thread from our end?


Thanks & Regards,

Noorjahan.


usernameplusplus
Beginner
243 Views
NoorjahanSk_Intel
Moderator
235 Views

Hi,


>>You can close the issue here.


Thanks for the confirmation!

As this issue has been resolved, we will no longer respond to this thread.

If you require any additional assistance from Intel, please start a new thread.


Thanks & Regards,

Noorjahan.


Reply