Skip to content

fix(build): update CUDA linking strategy for Windows. #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DAIMENGEN
Copy link

This build script is modified to properly handle platform-specific CUDA linking:

On Windows:

NVIDIA’s CUDA SDK does not ship culibos.lib, and static libraries like cublas_static.lib are typically unavailable.

Attempting to statically link cudart_static on Windows will fail due to missing symbols provided by culibos.

Therefore, on Windows, dynamic linking is preferred. The .lib files (like cudart.lib) act as import libraries for corresponding .dll files (e.g., cudart64_*.dll).

This build script is modified to properly handle platform-specific CUDA linking:

On Windows:

NVIDIA’s CUDA SDK does not ship culibos.lib, and static libraries like cublas_static.lib are typically unavailable.

Attempting to statically link cudart_static on Windows will fail due to missing symbols provided by culibos.

Therefore, on Windows, dynamic linking is preferred. The .lib files (like cudart.lib) act as import libraries for corresponding .dll files (e.g., cudart64_*.dll).
@webconsulting
Copy link

Hi! I just encountered this exact issue while trying to build with CUDA on Windows. The culibos library is indeed Linux-specific and causes the build to fail on Windows.

I've tested the proposed changes locally and can confirm they resolve the issue perfectly. This fix would be really valuable for Windows users wanting to use CUDA acceleration.

Is there anything blocking this PR from being merged? Happy to help with testing or provide additional feedback if needed. Thanks for all the great work on this project!

@MarcusDunn
Copy link
Contributor

I'd like to see it rebased on top of main because there was a resonably sized version bump of upstream that just landed. Otherwise this looks good to me

@MarcusDunn
Copy link
Contributor

it would be awesome if you could get the windows check passing - that would make it a lot eaiser to ensure we don't break it in the future (or at least know what broke it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants