Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Nov 11, 2021

Also, made a small change to CUDA install script on windows:
echo %errorlevel% would always return 0, and save cuda install log into the home folder rather than in current directory

cc @seemethere

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Nov 11, 2021

💊 CI failures summary and remediations

As of commit b604bf9 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@datumbox
Copy link
Contributor

datumbox commented Nov 11, 2021

@malfet I don't think the fix works and neither passing CU_VERSION. I gave it a try at #4921 and it seems the fix will be more elaborate as it requires installing missing libs, changing the image type etc. I closed it for now and plan to revisit it. If you have pointers let me know. Thanks!

@malfet malfet force-pushed the malfet/run-cmake-win-gpu-on-cuda-11.1 branch 4 times, most recently from 1d75997 to 00b8229 Compare November 12, 2021 08:29
@malfet malfet changed the title Move cmake_windows_gpu to CUDA-11.1 Move cmake_windows_* to CUDA-11.3 Nov 12, 2021
@malfet malfet changed the title Move cmake_windows_* to CUDA-11.3 Move cmake_[windows|linux]_gpu to CUDA-11.3 Nov 12, 2021
@malfet malfet force-pushed the malfet/run-cmake-win-gpu-on-cuda-11.1 branch from 00b8229 to e0ff4a7 Compare November 12, 2021 08:52
set "CUDA_PATH_V%CUDA_VER_MAJOR%_%CUDA_VER_MINOR%=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"

if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we move this section to line 195

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea. Let me do it as part of separate PR

@malfet malfet force-pushed the malfet/run-cmake-win-gpu-on-cuda-11.1 branch from e0ff4a7 to 13d15e6 Compare November 12, 2021 08:57
@mszhanyi
Copy link
Contributor

Also, made a small change to CUDA install script on windows: echo %errorlevel% would always return 0, and save cuda install log into the home folder rather than in current directory

@malfet , errorlevel would be non-zero if setup.exe failed.
https://app.circleci.com/pipelines/github/pytorch/pytorch/372302/workflows/8a242e28-ad44-4af6-a53a-a031cb9e92d2/jobs/15706071

C:\w\b\windows\temp_build\cuda>start /wait setup.exe -s thrust_11.3 nvcc_11.3 cuobjdump_11.3 nvprune_11.3 nvprof_11.3 cupti_11.3 cublas_11.3 cublas_dev_11.3 cudart_11.3 cufft_11.3 cufft_dev_11.3 curand_11.3 curand_dev_11.3 cusolver_11.3 cusolver_dev_11.3 cusparse_11.3 cusparse_dev_11.3 npp_11.3 npp_dev_11.3 nvrtc_11.3 nvrtc_dev_11.3 nvml_dev_11.3 -loglevel:6 -log:"C:\w\b\windows\temp_build\cuda/cuda_install_logs" 

C:\w\b\windows\temp_build\cuda>echo -469237760 
-469237760

in https://circleci.com/api/v1.1/project/github/pytorch/pytorch/15706071/output/104/0?file=true&allocation-id=6129e01c942d271d4e1ef010-0-build%2F7371EF63

@malfet
Copy link
Contributor Author

malfet commented Nov 13, 2021

@malfet , errorlevel would be non-zero if setup.exe failed.
Yes, but errorlevel is not the same as %errorlevel%, and as far as I understand, general advise for batch scripts is to use if errorlevel, rather than if %errorlevel%, see https://ss64.com/nt/errorlevel.html

@malfet malfet force-pushed the malfet/run-cmake-win-gpu-on-cuda-11.1 branch from 13d15e6 to b862f00 Compare November 13, 2021 03:28
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet Thanks for your help in fixing this. I've added a couple of questions, let me know your thoughts.

CMakeLists.txt Outdated
cmake_minimum_required(VERSION 3.12)
project(torchvision)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? My understanding is that TorchVision aligns with PyTorch
s approach and sets CMAKE_CXX_STANDARD to 14.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to fix Windows compilation errors, where CUDA-11.x (which supports C++17 standard) could not be compiled using C++14 standard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. Makes sense. So I guess PyTorch Core will be moving as well to C++17, right?

@malfet malfet force-pushed the malfet/run-cmake-win-gpu-on-cuda-11.1 branch from b862f00 to 8a6713c Compare November 16, 2021 16:39
@malfet
Copy link
Contributor Author

malfet commented Nov 16, 2021

Ok, splitting this PR into 3:
#4944 <- cherry-picks changes from audio back to vision that fixes CMake builds on Linux
#4945 <- Fix CUDA-11 Windows CMake builds

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@datumbox datumbox merged commit 983d27e into main Nov 16, 2021
facebook-github-bot pushed a commit that referenced this pull request Nov 17, 2021
Summary:
* Set cuversion to 113 for cmake builds

* Build CUDA-11 Windows cmake using C++17

* Cherry-pick pkg_helper changes from pytorch/audio back to vision

Reviewed By: datumbox

Differential Revision: D32470469

fbshipit-source-id: a40cbebb7d11ff4af08faa3c65d1a5d929652461

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants