-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Windows #49
Add Windows #49
Conversation
…da-forge-pinning 2020.10.31.07.48.09
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
This passes locally but the CLI installation of CUDA doesn't modify PATH or sets CUDA_PATH. I'll look into it tomorrow! |
…findstr; cuda-gdb -> nvcc as a pathfinder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…da-forge-pinning 2020.11.04.10.36.34
if exist "%LIBCUDA_SO_CONDA_NVCC_BACKUP%" ( | ||
ren "%LIBCUDA_SO_CONDA_NVCC_BACKUP%" "%LIBRARY_LIB%\cuda.lib" | ||
) else ( | ||
del "%LIBRARY_LIB%\cuda.lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this fail somehow? If it does and the build passes, we'll be packaging this against its license.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add an errorlevel
check there and also text for non-existence in the meta.yaml
tests. Would that be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that test is only for this recipe. What happens in downstream packages?
How about generating this cuda.lib
ourselves from the DLL so that we can redistribute it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this?
These are the DLLs available under \bin
. Which one applies here?
Directory: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin
Length Name
------ ----
89057280 cublas64_11.dll
167523328 cublasLt64_11.dll
335872 cudart32_110.dll
401408 cudart64_110.dll
162878976 cufft64_10.dll
272896 cufftw64_10.dll
1305600 cuinj64_110.dll
52446720 curand64_10.dll
525173248 cusolver64_10.dll
314601984 cusolverMg64_10.dll
159789568 cusparse64_11.dll
232448 nppc64_11.dll
10907648 nppial64_11.dll
4569600 nppicc64_11.dll
7840256 nppidei64_11.dll
51866112 nppif64_11.dll
26065920 nppig64_11.dll
6411264 nppim64_11.dll
20231168 nppist64_11.dll
203264 nppisu64_11.dll
2856960 nppitc64_11.dll
8873472 npps64_11.dll
299520 nvblas64_11.dll
3133952 nvjpeg64_11.dll
5118976 nvrtc-builtins64_110.dll
16161792 nvrtc64_110_0.dll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this?
Yes
These are the DLLs available under \bin. Which one applies here?
Have a look at cuda.lib
(It's a text file) It should tell you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Had to use dumpbin /ALL cuda.lib
to figure it out. FIle is nvcuda.dll
, which should be part of the drivers at C:\Windows\system32
, but I can't find it in my system. A separate installation process for the drivers seems to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a stub now. Tried to generate off the drivers installation in the CI, but nvcuda.dll
is not present there (I guess because no GPU). So I generated one from my 456.71 Windows installation and copied it over. Is that ok? I left a generate_stub.bat
script in case it needs to be regenerated again in the future (drivers update?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file might get outdated in that case. How about this? create an empty cuda.lib
in bld.bat
here so that the empty file will get packaged and then overriding that in a activate.bat
? This way, conda will not package the actual cuda.lib
in a downstream package because that file is already there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that could work, yes. Check last commit 36ade89.
I think I was a bit too quick to push the new commits. The new |
I guess CUDA 11 places their Windows files elsewhere. I'll investigate locally. |
That did it. CUDA 11 does not ship a |
Stub generated from Studio Driver 456.71
…cidentally package it
Anything else needed? |
:: Make a backup of `cuda.lib` if it exists -- we make sure this is the case in install_nvcc.bat | ||
if exist %LIBRARY_LIB%\cuda.lib ( | ||
set "LIBCUDA_SO_CONDA_NVCC_BACKUP=%LIBRARY_LIB%\cuda.lib-conda-nvcc-backup" | ||
ren "%LIBRARY_LIB%\cuda.lib" "%LIBCUDA_SO_CONDA_NVCC_BACKUP%" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just delete this instead of keeping a backup. There's no need to restore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is also present in the Linux version. I guess it's trying to prevent we mess with another installation that might be providing that file?
Thanks! 🥳 |
Thanks for all of this work! 😄 |
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Bringing CUDA to Windows
We need three things
cudatoolkit
packages (submitted by @scopatz)nvcc
metapackage (this PR)conda-forge-ci-setup
-- see Install CUDA on Windows if cuda_compiler_version is present in %CONFIG% conda-forge-ci-setup-feedstock#129conda-forge-pinning
-- see Add migrator for CUDA on Windows conda-forge-pinning-feedstock#914Questions:
cuda.lib
fromCUDA_HOME\lib\x64
toLIBRARY_LIB
. Is this ok?CUDA_PATH
, notCUDA_HOME
, but I am aliasing this one just in case.cuda-gdb
so I am usingnvcc
as a fallback pathfindervs2015
, which is now deprecated in conda-forge. There could be a workaround, but looks tricky.