Skip to content

Commit

Permalink
Fix upload path for Windows wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc123 committed Apr 3, 2020
1 parent bf86056 commit dd7effc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 28 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Expand Up @@ -1077,7 +1077,7 @@ workflows:
name: nightly_binary_win_wheel_py3.5_cu92_upload
requires:
- nightly_binary_win_wheel_py3.5_cu92
subfolder: cuda92/
subfolder: cu92/
- binary_win_wheel_release:
cu_version: '101'
filters:
Expand All @@ -1093,7 +1093,7 @@ workflows:
name: nightly_binary_win_wheel_py3.5_cu101_upload
requires:
- nightly_binary_win_wheel_py3.5_cu101
subfolder: cuda101/
subfolder: cu101/
- binary_win_wheel_release:
cu_version: '102'
filters:
Expand All @@ -1109,7 +1109,7 @@ workflows:
name: nightly_binary_win_wheel_py3.5_cu102_upload
requires:
- nightly_binary_win_wheel_py3.5_cu102
subfolder: cuda102/
subfolder: cu102/
- binary_win_wheel_release:
cu_version: cpu
filters:
Expand Down Expand Up @@ -1141,7 +1141,7 @@ workflows:
name: nightly_binary_win_wheel_py3.6_cu92_upload
requires:
- nightly_binary_win_wheel_py3.6_cu92
subfolder: cuda92/
subfolder: cu92/
- binary_win_wheel_release:
cu_version: '101'
filters:
Expand All @@ -1157,7 +1157,7 @@ workflows:
name: nightly_binary_win_wheel_py3.6_cu101_upload
requires:
- nightly_binary_win_wheel_py3.6_cu101
subfolder: cuda101/
subfolder: cu101/
- binary_win_wheel_release:
cu_version: '102'
filters:
Expand All @@ -1173,7 +1173,7 @@ workflows:
name: nightly_binary_win_wheel_py3.6_cu102_upload
requires:
- nightly_binary_win_wheel_py3.6_cu102
subfolder: cuda102/
subfolder: cu102/
- binary_win_wheel_release:
cu_version: cpu
filters:
Expand Down Expand Up @@ -1205,7 +1205,7 @@ workflows:
name: nightly_binary_win_wheel_py3.7_cu92_upload
requires:
- nightly_binary_win_wheel_py3.7_cu92
subfolder: cuda92/
subfolder: cu92/
- binary_win_wheel_release:
cu_version: '101'
filters:
Expand All @@ -1221,7 +1221,7 @@ workflows:
name: nightly_binary_win_wheel_py3.7_cu101_upload
requires:
- nightly_binary_win_wheel_py3.7_cu101
subfolder: cuda101/
subfolder: cu101/
- binary_win_wheel_release:
cu_version: '102'
filters:
Expand All @@ -1237,7 +1237,7 @@ workflows:
name: nightly_binary_win_wheel_py3.7_cu102_upload
requires:
- nightly_binary_win_wheel_py3.7_cu102
subfolder: cuda102/
subfolder: cu102/
- binary_win_wheel_release:
cu_version: cpu
filters:
Expand Down Expand Up @@ -1269,7 +1269,7 @@ workflows:
name: nightly_binary_win_wheel_py3.8_cu92_upload
requires:
- nightly_binary_win_wheel_py3.8_cu92
subfolder: cuda92/
subfolder: cu92/
- binary_win_wheel_release:
cu_version: '101'
filters:
Expand All @@ -1285,7 +1285,7 @@ workflows:
name: nightly_binary_win_wheel_py3.8_cu101_upload
requires:
- nightly_binary_win_wheel_py3.8_cu101
subfolder: cuda101/
subfolder: cu101/
- binary_win_wheel_release:
cu_version: '102'
filters:
Expand All @@ -1301,7 +1301,7 @@ workflows:
name: nightly_binary_win_wheel_py3.8_cu102_upload
requires:
- nightly_binary_win_wheel_py3.8_cu102
subfolder: cuda102/
subfolder: cu102/
- binary_linux_conda:
cu_version: cpu
filters:
Expand Down
17 changes: 4 additions & 13 deletions .circleci/regenerate.py
Expand Up @@ -72,7 +72,7 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version,
"cu_version": cu_version.replace("cu", "") if os_type == "win" else cu_version,
}

if unicode:
if os_type != "win" and unicode:
d["unicode_abi"] = '1'

if os_type != "win":
Expand All @@ -81,9 +81,8 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version,
if filter_branch is not None:
d["filters"] = {"branches": {"only": filter_branch}}

workflow_job = f"binary_{os_type}_{btype}_release" if os_type == "win" else f"binary_{os_type}_{btype}"

return {workflow_job: d}
w = f"binary_{os_type}_{btype}_release" if os_type == "win" else f"binary_{os_type}_{btype}"
return {w: d}


def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *, filter_branch=None):
Expand All @@ -94,15 +93,7 @@ def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *,
}

if btype == 'wheel':
if os_type == 'macos':
d["subfolder"] = ""
elif os_type == 'win':
if cu_version == 'cpu':
d["subfolder"] = "cpu/"
else:
d["subfolder"] = cu_version.replace("cu", "cuda") + "/"
else:
d["subfolder"] = cu_version + "/"
d["subfolder"] = "" if os_type == 'macos' else cu_version + "/"

if filter_branch is not None:
d["filters"] = {"branches": {"only": filter_branch}}
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/internal/setup.bat
Expand Up @@ -30,7 +30,7 @@ if "%CXX%"=="sccache cl" (

:pytorch
:: This stores in e.g. D:/_work/1/s/windows/output/cpu
pip wheel -e . --no-deps --wheel-dir ../output/%CUDA_PREFIX%
pip wheel -e . --no-deps --wheel-dir ../output

:build_end
IF ERRORLEVEL 1 exit /b 1
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/internal/test.bat
Expand Up @@ -11,7 +11,7 @@ if "%BUILD_VISION%" == "" (
pip install future pytest "pillow>=4.1.1" mock
)

for /F "delims=" %%i in ('where /R %SRC_DIR%\output\%CUDA_PREFIX% *%MODULE_NAME%*%PYTHON_VERSION%*.whl') do pip install "%%i"
for /F "delims=" %%i in ('where /R %SRC_DIR%\output *%MODULE_NAME%*%PYTHON_VERSION%*.whl') do pip install "%%i"

if ERRORLEVEL 1 exit /b 1

Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/templates/upload_to_s3.yml
Expand Up @@ -8,7 +8,7 @@ steps:
inputs:
awsCredentials: 'Pytorch S3 bucket'
bucketName: 'pytorch'
sourceFolder: 'packaging/windows/output/${{ parameters.cudaVer }}'
sourceFolder: 'packaging/windows/output'
globExpressions: '*.whl'
targetFolder: 'whl/nightly/${{ parameters.cuVer }}/'
filesAcl: 'public-read'
Expand Down

0 comments on commit dd7effc

Please sign in to comment.