Skip to content

Commit

Permalink
Fix copy logic for Windows CUDA DLLs and add smoke tests (pytorch#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc123 authored and soumith committed Nov 7, 2019
1 parent 3abeb39 commit 67091f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
18 changes: 9 additions & 9 deletions windows/internal/copy.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
copy "%CUDA_PATH%\bin\cusparse64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cublas64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cudart64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\curand64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cufft64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cufftw64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cusparse64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cublas64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cudart64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\curand64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cufft64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cufftw64_*.dll*" pytorch\torch\lib

copy "%CUDA_PATH%\bin\cudnn64_%CUDNN_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\nvrtc64_%CUDA_VERSION%*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\nvrtc-builtins64_%CUDA_VERSION%.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\cudnn64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\nvrtc64_*.dll*" pytorch\torch\lib
copy "%CUDA_PATH%\bin\nvrtc-builtins64_*.dll*" pytorch\torch\lib

copy "C:\Program Files\NVIDIA Corporation\NvToolsExt\bin\x64\nvToolsExt64_1.dll*" pytorch\torch\lib
copy "%CONDA_LIB_PATH%\libiomp*5md.dll" pytorch\torch\lib
7 changes: 7 additions & 0 deletions windows/internal/test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ if ERRORLEVEL 1 exit /b 1

if NOT "%BUILD_VISION%" == "" goto smoke_test_end

if "%CUDA_VERSION%" == "cpu" goto smoke_test

:: Remove CUDA paths to ensure all the CUDA DLLs are copied
set desired_cuda=%CUDA_VERSION:~0,-1%.%CUDA_VERSION:~-1,1%
set "PATH=%PATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA=C:\Not_Existing_Folder%"

:smoke_test
echo Smoke testing imports
python -c "import torch"
if ERRORLEVEL 1 exit /b 1
Expand Down

0 comments on commit 67091f7

Please sign in to comment.