m4rs-mt / ILGPU

ILGPU JIT Compiler for high-performance .Net GPU programs
http://www.ilgpu.net
Other
1.35k stars 116 forks source link

Updated NVVM to support Cuda SDK v8. #1187

Closed MoFtZ closed 5 months ago

MoFtZ commented 5 months ago

Extracted from #1148.

When LibDevice support was added in #707, it was targeting Cuda SDK v11.

In Cuda SDK v8, there is a conflict in searching for nvvm*.dll because the folder contains nvvm64_31_0.dll and nvvm32_31_0.dll. Updated to use nvvm64*.dll, since we only support 64-bit Cuda in ILGPU.

In addition, Cuda SDK v8 does not have an implementation of nvvmLazyAddModuleToProgram - this was added in v9. Added a fallback to use the older, non-lazy nvvmAddModuleToProgram.