Skip to content

Commit ba167fd

Browse files
committed
Update on "Making ops c10-full: Generator arguments"
I don't know why this works. I know, this is never a good way to start a PR description :P I know that Generator is a dispatch relevant argument when called from an unboxed API and is ignored for dispatch purposes when called from a boxed API. This should break something, but maybe we don't have test cases for that. We likely need to align the unboxed and boxed dispatch behavior before landing this. The best solution would be to make Generator not dispatch relevant in unboxing. But that might be a bigger change. An acceptable solution could be to make Generator dispatch relevant in boxing, but that needs perf measurements. This PR needs further discussion. Differential Revision: [D25394998](https://our.internmc.facebook.com/intern/diff/D25394998/) [ghstack-poisoned]
2 parents 2fce219 + b544e0d commit ba167fd

File tree

122 files changed

+2859
-1992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2859
-1992
lines changed

.circleci/cimodel/data/simple/util/versions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ def __init__(self, major, minor):
2929
self.minor = minor
3030

3131
super().__init__([self.major, self.minor], "cuda")
32+
33+
def __str__(self):
34+
return f"{self.major}.{self.minor}"

.circleci/cimodel/data/windows_build_definitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ def gen_tree(self):
8686
props_dict["executor"] = "windows-with-nvidia-gpu"
8787

8888
props_dict["cuda_version"] = (
89-
miniutils.quote(str(self.cuda_version.major))
89+
miniutils.quote(str(self.cuda_version))
9090
if self.cuda_version
9191
else "cpu"
9292
)
93+
9394
props_dict["name"] = "_".join(name_parts)
9495

9596
return [{key_name: props_dict}]

.circleci/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ pytorch_windows_params: &pytorch_windows_params
325325
default: ""
326326
cuda_version:
327327
type: string
328-
default: "10"
328+
default: "10.1"
329329
python_version:
330330
type: string
331331
default: "3.6"
@@ -675,7 +675,7 @@ jobs:
675675
default: ""
676676
cuda_version:
677677
type: string
678-
default: "10"
678+
default: "10.1"
679679
python_version:
680680
type: string
681681
default: "3.6"
@@ -737,7 +737,7 @@ jobs:
737737
default: ""
738738
cuda_version:
739739
type: string
740-
default: "10"
740+
default: "10.1"
741741
python_version:
742742
type: string
743743
default: "3.6"
@@ -8077,7 +8077,7 @@ workflows:
80778077
- postnightly
80788078
- pytorch_windows_build:
80798079
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
8080-
cuda_version: "10"
8080+
cuda_version: "10.1"
80818081
name: pytorch_windows_vs2019_py36_cuda10.1_build
80828082
python_version: "3.6"
80838083
use_cuda: "1"
@@ -8086,7 +8086,7 @@ workflows:
80868086
vc_year: "2019"
80878087
- pytorch_windows_test:
80888088
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
8089-
cuda_version: "10"
8089+
cuda_version: "10.1"
80908090
executor: windows-with-nvidia-gpu
80918091
name: pytorch_windows_vs2019_py36_cuda10.1_test1
80928092
python_version: "3.6"
@@ -8099,7 +8099,7 @@ workflows:
80998099
vc_year: "2019"
81008100
- pytorch_windows_test:
81018101
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
8102-
cuda_version: "10"
8102+
cuda_version: "10.1"
81038103
executor: windows-with-nvidia-gpu
81048104
name: pytorch_windows_vs2019_py36_cuda10.1_test2
81058105
python_version: "3.6"
@@ -8112,7 +8112,7 @@ workflows:
81128112
vc_year: "2019"
81138113
- pytorch_windows_build:
81148114
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
8115-
cuda_version: "11"
8115+
cuda_version: "11.1"
81168116
name: pytorch_windows_vs2019_py36_cuda11.1_build
81178117
python_version: "3.6"
81188118
use_cuda: "1"
@@ -8121,7 +8121,7 @@ workflows:
81218121
vc_year: "2019"
81228122
- pytorch_windows_test:
81238123
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
8124-
cuda_version: "11"
8124+
cuda_version: "11.1"
81258125
executor: windows-with-nvidia-gpu
81268126
filters:
81278127
branches:
@@ -8140,7 +8140,7 @@ workflows:
81408140
vc_year: "2019"
81418141
- pytorch_windows_test:
81428142
build_environment: pytorch-win-vs2019-cuda11-cudnn8-py3
8143-
cuda_version: "11"
8143+
cuda_version: "11.1"
81448144
executor: windows-with-nvidia-gpu
81458145
filters:
81468146
branches:
@@ -8204,7 +8204,7 @@ workflows:
82048204
vc_year: "2019"
82058205
- pytorch_windows_test:
82068206
build_environment: pytorch-win-vs2019-cuda10-cudnn7-py3
8207-
cuda_version: "10"
8207+
cuda_version: "10.1"
82088208
filters:
82098209
branches:
82108210
only:

.circleci/scripts/windows_cuda_install.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#!/bin/bash
22
set -eux -o pipefail
33

4-
if [[ "$CUDA_VERSION" == "10" ]]; then
5-
cuda_complete_version="10.1"
4+
if [[ "$CUDA_VERSION" =~ ^10.* ]]; then
65
cuda_installer_name="cuda_10.1.243_426.00_win10"
76
msbuild_project_dir="CUDAVisualStudioIntegration/extras/visual_studio_integration/MSBuildExtensions"
87
cuda_install_packages="nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1"
9-
elif [[ "$CUDA_VERSION" == "11" ]]; then
10-
cuda_complete_version="11.1"
8+
elif [[ "$CUDA_VERSION" =~ ^11.* ]]; then
119
cuda_installer_name="cuda_11.1.0_456.43_win10"
1210
msbuild_project_dir="visual_studio_integration/CUDAVisualStudioIntegration/extras/visual_studio_integration/MSBuildExtensions"
1311
cuda_install_packages="nvcc_11.1 cuobjdump_11.1 nvprune_11.1 nvprof_11.1 cupti_11.1 cublas_11.1 cublas_dev_11.1 cudart_11.1 cufft_11.1 cufft_dev_11.1 curand_11.1 curand_dev_11.1 cusolver_11.1 cusolver_dev_11.1 cusparse_11.1 cusparse_dev_11.1 npp_11.1 npp_dev_11.1 nvrtc_11.1 nvrtc_dev_11.1 nvml_dev_11.1"
@@ -16,7 +14,7 @@ else
1614
exit 1
1715
fi
1816

19-
if [[ "${CUDA_VERSION}" != "10" && "${JOB_EXECUTOR}" == "windows-with-nvidia-gpu" ]]; then
17+
if [[ "$CUDA_VERSION" =~ ^11.* && "${JOB_EXECUTOR}" == "windows-with-nvidia-gpu" ]]; then
2018
cuda_install_packages="${cuda_install_packages} Display.Driver"
2119
fi
2220

@@ -48,7 +46,7 @@ then
4846
export NVTOOLSEXT_PATH="C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\"
4947
fi
5048

51-
if ! ls "/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${cuda_complete_version}/bin/nvcc.exe"
49+
if ! ls "/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${CUDA_VERSION}/bin/nvcc.exe"
5250
then
5351
echo "CUDA installation failed"
5452
mkdir -p /c/w/build-results
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#!/bin/bash
22
set -eux -o pipefail
33

4-
if [[ "$CUDA_VERSION" == "10" ]]; then
5-
cuda_complete_version="10.1"
6-
cudnn_installer_name="cudnn-10.1-windows10-x64-v7.6.4.38"
7-
elif [[ "$CUDA_VERSION" == "11" ]]; then
8-
cuda_complete_version="11.1"
9-
cudnn_installer_name="cudnn-11.1-windows-x64-v8.0.5.39"
4+
if [[ "$CUDA_VERSION" =~ ^10.* ]]; then
5+
cudnn_installer_name="cudnn-${CUDA_VERSION}-windows10-x64-v7.6.4.38"
6+
elif [[ "$CUDA_VERSION" =~ ^11.* ]]; then
7+
cudnn_installer_name="cudnn-${CUDA_VERSION}-windows-x64-v8.0.5.39"
108
else
119
echo "CUDNN for CUDA_VERSION $CUDA_VERSION is not supported yet"
1210
exit 1
@@ -16,6 +14,6 @@ cudnn_installer_link="https://ossci-windows.s3.amazonaws.com/${cudnn_installer_n
1614

1715
curl --retry 3 -O $cudnn_installer_link
1816
7z x ${cudnn_installer_name}.zip -ocudnn
19-
cp -r cudnn/cuda/* "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${cuda_complete_version}/"
17+
cp -r cudnn/cuda/* "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${CUDA_VERSION}/"
2018
rm -rf cudnn
2119
rm -f ${cudnn_installer_name}.zip

.circleci/verbatim-sources/build-parameters/pytorch-build-params.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pytorch_windows_params: &pytorch_windows_params
5959
default: ""
6060
cuda_version:
6161
type: string
62-
default: "10"
62+
default: "10.1"
6363
python_version:
6464
type: string
6565
default: "3.6"

.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ jobs:
237237
default: ""
238238
cuda_version:
239239
type: string
240-
default: "10"
240+
default: "10.1"
241241
python_version:
242242
type: string
243243
default: "3.6"
@@ -299,7 +299,7 @@ jobs:
299299
default: ""
300300
cuda_version:
301301
type: string
302-
default: "10"
302+
default: "10.1"
303303
python_version:
304304
type: string
305305
default: "3.6"

.jenkins/pytorch/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
1111

1212
echo "Testing pytorch"
1313

14+
export LANG=C.UTF-8
15+
1416
if [[ "$BUILD_ENVIRONMENT" == *-slow-* ]]; then
1517
export PYTORCH_TEST_WITH_SLOW=1
1618
export PYTORCH_TEST_SKIP_FAST=1

.jenkins/pytorch/win-test-helpers/build_pytorch.bat

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,19 @@ if "%VC_VERSION%" == "" (
3737
@echo on
3838
popd
3939

40-
if "%CUDA_VERSION%" == "9" goto cuda_build_9
41-
if "%CUDA_VERSION%" == "10" goto cuda_build_10
42-
if "%CUDA_VERSION%" == "11" goto cuda_build_11
43-
goto cuda_build_end
40+
if not "%USE_CUDA%"=="1" goto cuda_build_end
4441

45-
:cuda_build_9
42+
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION%
4643

47-
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2
48-
set CUDA_PATH_V9_2=%CUDA_PATH%
44+
rem version transformer, for example 10.1 to 10_1.
45+
set VERSION_SUFFIX=%CUDA_VERSION:.=_%
46+
set CUDA_PATH_V%VERSION_SUFFIX%=%CUDA_PATH%
4947

50-
goto cuda_build_common
51-
52-
:cuda_build_10
53-
54-
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
55-
set CUDA_PATH_V10_1=%CUDA_PATH%
56-
57-
goto cuda_build_common
58-
59-
:cuda_build_11
60-
61-
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
62-
set CUDA_PATH_V11_1=%CUDA_PATH%
63-
64-
goto cuda_build_common
65-
66-
:cuda_build_common
48+
set CUDNN_LIB_DIR=%CUDA_PATH%\lib\x64
49+
set CUDA_TOOLKIT_ROOT_DIR=%CUDA_PATH%
50+
set CUDNN_ROOT_DIR=%CUDA_PATH%
51+
set NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
52+
set PATH=%CUDA_PATH%\bin;%CUDA_PATH%\libnvvp;%PATH%
6753

6854
set CUDNN_LIB_DIR=%CUDA_PATH%\lib\x64
6955
set CUDA_TOOLKIT_ROOT_DIR=%CUDA_PATH%

.jenkins/pytorch/win-test-helpers/installation-helpers/install_magma.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
if "%CUDA_VERSION%" == "9" set CUDA_SUFFIX=cuda92
2-
if "%CUDA_VERSION%" == "10" set CUDA_SUFFIX=cuda101
3-
if "%CUDA_VERSION%" == "11" set CUDA_SUFFIX=cuda110
1+
rem remove dot in cuda_version, fox example 11.1 to 111
2+
set VERSION_SUFFIX=%CUDA_VERSION:.=%
3+
set CUDA_SUFFIX=cuda%VERSION_SUFFIX%
44

55
if "%CUDA_SUFFIX%" == "" (
6-
echo unknown CUDA version, please set `CUDA_VERSION` to 9, 10 or 11.
6+
echo unknown CUDA version, please set `CUDA_VERSION` higher than 9.2
77
exit /b 1
88
)
99

0 commit comments

Comments
 (0)