From 6c381bbcaefc19217e8a085e85ea2d763ec1ccc3 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 14 Jul 2023 10:42:17 -0700 Subject: [PATCH] Remove unused builder files --- .../generate_win_pypi_pkg_download_proxy.sh | 14 -- .../build_pypi_pkg_download_proxy/setup.py | 75 ------ windows/azure-pipelines.yml | 35 --- windows/templates/auth_task.yml | 17 -- windows/templates/build_conda.yml | 12 - windows/templates/build_task.yml | 218 ------------------ windows/templates/build_wheels.yml | 9 - windows/templates/linux_build_task.yml | 38 --- windows/templates/publish_packages.yml | 8 - windows/templates/publish_test_results.yml | 6 - windows/templates/setup_env_for_msagent.yml | 26 --- windows/templates/setup_nightly_variables.yml | 11 - windows/templates/upload_to_conda.yml | 10 - windows/templates/upload_to_s3.yml | 26 --- windows/templates/vsts_auth.yml | 8 - windows/upload/upload.sh | 40 ---- windows/upload/win_reorganize.sh | 114 --------- 17 files changed, 667 deletions(-) delete mode 100644 packaging/windows/build_pypi_pkg_download_proxy/generate_win_pypi_pkg_download_proxy.sh delete mode 100644 packaging/windows/build_pypi_pkg_download_proxy/setup.py delete mode 100644 windows/azure-pipelines.yml delete mode 100644 windows/templates/auth_task.yml delete mode 100644 windows/templates/build_conda.yml delete mode 100644 windows/templates/build_task.yml delete mode 100644 windows/templates/build_wheels.yml delete mode 100644 windows/templates/linux_build_task.yml delete mode 100644 windows/templates/publish_packages.yml delete mode 100644 windows/templates/publish_test_results.yml delete mode 100644 windows/templates/setup_env_for_msagent.yml delete mode 100644 windows/templates/setup_nightly_variables.yml delete mode 100644 windows/templates/upload_to_conda.yml delete mode 100644 windows/templates/upload_to_s3.yml delete mode 100644 windows/templates/vsts_auth.yml delete mode 100755 windows/upload/upload.sh delete mode 100755 windows/upload/win_reorganize.sh diff --git a/packaging/windows/build_pypi_pkg_download_proxy/generate_win_pypi_pkg_download_proxy.sh b/packaging/windows/build_pypi_pkg_download_proxy/generate_win_pypi_pkg_download_proxy.sh deleted file mode 100644 index 7c18baf83..000000000 --- a/packaging/windows/build_pypi_pkg_download_proxy/generate_win_pypi_pkg_download_proxy.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -ex - -TORCH_VER=$1 -SETUP_FILE="setup.py" -REPLACE_KEYWORD="{{GENERATE_TORCH_PKG_VER}}" - -mkdir torch -cp $SETUP_FILE torch/ -cd torch -sed -i "s/$REPLACE_KEYWORD/$TORCH_VER/g" $SETUP_FILE -python $SETUP_FILE sdist - -echo "Generate package under torch/dist" diff --git a/packaging/windows/build_pypi_pkg_download_proxy/setup.py b/packaging/windows/build_pypi_pkg_download_proxy/setup.py deleted file mode 100644 index ffcedac51..000000000 --- a/packaging/windows/build_pypi_pkg_download_proxy/setup.py +++ /dev/null @@ -1,75 +0,0 @@ -import sys -import subprocess - -import setuptools.command.install -from setuptools import find_packages, setup -import wheel.bdist_wheel - -pkg_name = "torch" -pkg_ver = "{{GENERATE_TORCH_PKG_VER}}" -torch_download_url = "https://download.pytorch.org/whl/torch_stable.html" - -python_min_version = (3, 6, 1) -python_min_version_str = '.'.join((str(num) for num in python_min_version)) - -install_requires = [ - 'pip', -] - -class install_torch(setuptools.command.install.install): - def run(self): - if sys.platform == 'win32' and sys.maxsize.bit_length() == 31: - raise UserWarning("We don't support Python x86." \ - "Please install Python x64 instead.") - - raise UserWarning( - f"Can not download torch binary from {torch_download_url}." \ - f"Please visit {torch_download_url} for more details." - ) - -class bdist_wheel(wheel.bdist_wheel.bdist_wheel): - def run(self): - if sys.platform == 'win32' and sys.maxsize.bit_length() != 31: - subprocess.check_call( - [sys.executable, '-m', 'pip', 'download', - f'{pkg_name}==={pkg_ver}', '-f', torch_download_url, - '--platform', 'win_amd64', '--only-binary=:all:', - '--no-deps', '-d', self.dist_dir]) - else: - raise UserWarning("Cannot find a binary package of PyTorch for your Python environment.") - -setup( - name=pkg_name, - version=pkg_ver, - description=("Tensors and Dynamic neural networks in " - "Python with strong GPU acceleration"), - cmdclass={ - 'bdist_wheel': bdist_wheel, - 'install': install_torch, - }, - packages=find_packages(), - url='https://pytorch.org/', - download_url='https://github.com/pytorch/pytorch/tags', - author='PyTorch Team', - author_email='packages@pytorch.org', - python_requires='>={}'.format(python_min_version_str), - install_requires=install_requires, - # PyPI package information. - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: Mathematics', - 'Topic :: Scientific/Engineering :: Artificial Intelligence', - 'Topic :: Software Development', - 'Topic :: Software Development :: Libraries', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Programming Language :: C++', - 'Programming Language :: Python :: 3', - ], - license='BSD-3', - keywords='pytorch machine learning', -) diff --git a/windows/azure-pipelines.yml b/windows/azure-pipelines.yml deleted file mode 100644 index e3d95754e..000000000 --- a/windows/azure-pipelines.yml +++ /dev/null @@ -1,35 +0,0 @@ - -# Turn off auto builds for commits -trigger: none -pr: none - -jobs: -- template: templates/auth_task.yml - -- template: templates/build_task.yml - parameters: - package: 'Conda' - spec: 'CUDA' - msagent: false - -- template: templates/build_task.yml - parameters: - package: 'Wheels' - spec: 'CUDA' - msagent: false - -- template: templates/build_task.yml - parameters: - package: 'Conda' - spec: 'CPU' - msagent: false - -- template: templates/build_task.yml - parameters: - package: 'Wheels' - spec: 'CPU' - msagent: false - -- template: templates/linux_build_task.yml - parameters: - msagent: $(ms.hosted.agent.cpu) diff --git a/windows/templates/auth_task.yml b/windows/templates/auth_task.yml deleted file mode 100644 index 7554ffaac..000000000 --- a/windows/templates/auth_task.yml +++ /dev/null @@ -1,17 +0,0 @@ -jobs: -- job: 'VSTS_Auth_Task' - timeoutInMinutes: 5 - cancelTimeoutInMinutes: 5 - variables: - - group: 'peterjc-vsts-token' - - pool: - vmImage: 'vs2017-win2016' - - steps: - - checkout: self - clean: true - - - template: vsts_auth.yml - parameters: - auth: $(vsts_auth) diff --git a/windows/templates/build_conda.yml b/windows/templates/build_conda.yml deleted file mode 100644 index 81d443b1c..000000000 --- a/windows/templates/build_conda.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - msagent: false - -steps: -- script: 'if not exist %PYTORCH_FINAL_PACKAGE_DIR% mkdir %PYTORCH_FINAL_PACKAGE_DIR%' - displayName: 'Create final package directory' - -- bash: './conda/build_pytorch.sh $CUDA_VERSION $PYTORCH_BUILD_VERSION $PYTORCH_BUILD_NUMBER' - displayName: Build - env: - ${{ if eq(parameters.msagent, 'true') }}: - MAX_JOBS: 2 diff --git a/windows/templates/build_task.yml b/windows/templates/build_task.yml deleted file mode 100644 index 5a7ae43ca..000000000 --- a/windows/templates/build_task.yml +++ /dev/null @@ -1,218 +0,0 @@ -parameters: - package: '' - spec: '' - jobDesc: '' - packageDesc: '' - msagent: true - cpuEnabled: true - cudaEnabled: true - condaEnabled: true - wheelsEnabled: true - override: false - -jobs: -- job: 'Windows_${{ parameters.spec }}_${{ parameters.package }}_Build' - timeoutInMinutes: 240 - cancelTimeoutInMinutes: 5 - condition: > - or(and(eq('${{ parameters.package }}', 'Conda'), eq('${{ parameters.spec }}', 'CPU'), - eq('${{ parameters.condaEnabled }}', 'true'), eq('${{ parameters.cpuEnabled }}', 'true')), - and(eq('${{ parameters.package }}', 'Wheels'), eq('${{ parameters.spec }}', 'CPU'), - eq('${{ parameters.wheelsEnabled }}', 'true'), eq('${{ parameters.cpuEnabled }}', 'true')), - and(eq('${{ parameters.package }}', 'Conda'), eq('${{ parameters.spec }}', 'CUDA'), - eq('${{ parameters.condaEnabled }}', 'true'), eq('${{ parameters.cudaEnabled }}', 'true')), - and(eq('${{ parameters.package }}', 'Wheels'), eq('${{ parameters.spec }}', 'CUDA'), - eq('${{ parameters.wheelsEnabled }}', 'true'), eq('${{ parameters.cudaEnabled }}', 'true'))) - variables: - - ${{ if eq(parameters.override, 'true') }}: - - name: PYTORCH_BUILD_VERSION - value: '1.1.0' - - name: PYTORCH_BUILD_NUMBER - value: 1 - - name: PYTORCH_REPO - value: 'pytorch' - - name: PYTORCH_BRANCH - value: 'v1.1.0' - - name: TORCH_CONDA_BUILD_FOLDER - value: 'pytorch-1.1.0' - - ${{ if eq(parameters.msagent, 'true') }}: - - name: USE_SCCACHE - value: 0 - - ${{ if eq(parameters.msagent, 'false') }}: - - name: USE_SCCACHE - value: 1 - - ${{ if eq(parameters.package, 'Conda') }}: - - group: peterjc_anaconda_token - - name: PYTORCH_FINAL_PACKAGE_DIR - value: '$(Build.Repository.LocalPath)\windows\output' - - strategy: - maxParallel: 10 - matrix: - ${{ if eq(parameters.spec, 'CPU') }}: - PY3.6: - DESIRED_PYTHON: 3.6 - CUDA_VERSION: cpu - PY3.7: - DESIRED_PYTHON: 3.7 - CUDA_VERSION: cpu - PY3.8: - DESIRED_PYTHON: 3.8 - CUDA_VERSION: cpu - ${{ if and(eq(parameters.package, 'Wheels'), eq(parameters.spec, 'CPU')) }}: - LIBTORCH: - DESIRED_PYTHON: 3 - CUDA_VERSION: cpu - BUILD_PYTHONLESS: 1 - LIBTORCH_DEBUG: - DESIRED_PYTHON: 3 - CUDA_VERSION: cpu - BUILD_PYTHONLESS: 1 - DEBUG: 1 - ${{ if ne(parameters.spec, 'CPU') }}: - PY3.6_92: - DESIRED_PYTHON: 3.6 - CUDA_VERSION: 92 - PY3.7_92: - DESIRED_PYTHON: 3.7 - CUDA_VERSION: 92 - PY3.8_92: - DESIRED_PYTHON: 3.8 - CUDA_VERSION: 92 - PY3.6_101: - DESIRED_PYTHON: 3.6 - CUDA_VERSION: 101 - PY3.7_101: - DESIRED_PYTHON: 3.7 - CUDA_VERSION: 101 - PY3.8_101: - DESIRED_PYTHON: 3.8 - CUDA_VERSION: 101 - PY3.6_102: - DESIRED_PYTHON: 3.6 - CUDA_VERSION: 102 - PY3.7_102: - DESIRED_PYTHON: 3.7 - CUDA_VERSION: 102 - PY3.8_102: - DESIRED_PYTHON: 3.8 - CUDA_VERSION: 102 - PY3.6_110: - DESIRED_PYTHON: 3.6 - CUDA_VERSION: 110 - PY3.7_110: - DESIRED_PYTHON: 3.7 - CUDA_VERSION: 110 - PY3.8_110: - DESIRED_PYTHON: 3.8 - CUDA_VERSION: 110 - ${{ if and(ne(parameters.spec, 'CPU'), eq(parameters.package, 'Wheels')) }}: - LIBTORCH_92: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 92 - LIBTORCH_92_DEBUG: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 92 - DEBUG: 1 - LIBTORCH_101: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 101 - LIBTORCH_101_DEBUG: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 101 - DEBUG: 1 - LIBTORCH_102: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 102 - LIBTORCH_102_DEBUG: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 102 - DEBUG: 1 - LIBTORCH_110: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 110 - LIBTORCH_110_DEBUG: - DESIRED_PYTHON: 3 - BUILD_PYTHONLESS: 1 - CUDA_VERSION: 110 - DEBUG: 1 - - pool: - ${{ if eq(parameters.msagent, 'true') }}: - vmImage: 'vs2017-win2016' - ${{ if eq(parameters.msagent, 'false') }}: - name: 'pytorch' - - steps: - - script: | - taskkill /im nvcc.exe /f || ver > NUL - taskkill /im sccache.exe /f || ver > NUL - taskkill /im cl.exe /f || ver > NUL - taskkill /im ninja.exe /f || ver > NUL - taskkill /im link.exe /f || ver > NUL - taskkill /im cmake.exe /f || ver > NUL - taskkill /im conda-build.exe /f || ver > NUL - rd /s /q $(Build.Repository.LocalPath)\windows\pytorch || ver > NUL - rd /s /q $(Build.Repository.LocalPath)\windows\output || ver > NUL - - displayName: 'Cleaning unclosed processes & files' - - - checkout: self - clean: true - - - template: setup_env_for_msagent.yml - parameters: - msagent: ${{ parameters.msagent }} - - - template: setup_nightly_variables.yml - parameters: - package: ${{ parameters.package }} - - - ${{ if eq(parameters.package, 'Wheels') }}: - - template: build_wheels.yml - parameters: - msagent: ${{ parameters.msagent }} - - - ${{ if eq(parameters.package, 'Conda') }}: - - template: build_conda.yml - parameters: - msagent: ${{ parameters.msagent }} - - - ${{ if or(eq(parameters.package, 'Wheels'), eq(parameters.package, 'Conda')) }}: - - template: publish_test_results.yml - parameters: - msagent: ${{ parameters.msagent }} - - - ${{ if and(eq(parameters.package, 'Wheels'), eq(parameters.spec, 'CPU')) }}: - - template: upload_to_s3.yml - parameters: - cuVer: '$(CUDA_VERSION)' - cudaVer: '$(CUDA_VERSION)' - - - ${{ if and(eq(parameters.package, 'Wheels'), ne(parameters.spec, 'CPU')) }}: - - template: upload_to_s3.yml - parameters: - cuVer: 'cu$(CUDA_VERSION)' - cudaVer: 'cuda$(CUDA_VERSION)' - - - ${{ if eq(parameters.package, 'Conda') }}: - - template: upload_to_conda.yml - parameters: - user: $(peterjc_conda_username) - pass: $(peterjc_conda_password) - - # If you want to upload binaries to Azure Git, please uncomment this section. - # - ${{ if or(eq(parameters.package, 'Wheels'), eq(parameters.package, 'Conda')) }}: - # - template: publish_test_results.yml - # parameters: - # msagent: ${{ parameters.msagent }} - # - template: publish_packages.yml - # parameters: - # package: ${{ parameters.package }} diff --git a/windows/templates/build_wheels.yml b/windows/templates/build_wheels.yml deleted file mode 100644 index e27ba44ee..000000000 --- a/windows/templates/build_wheels.yml +++ /dev/null @@ -1,9 +0,0 @@ -parameters: - msagent: false - -steps: -- script: 'call windows/build_pytorch.bat %CUDA_VERSION% %PYTORCH_BUILD_VERSION% %PYTORCH_BUILD_NUMBER%' - displayName: Build - env: - ${{ if eq(parameters.msagent, 'true') }}: - MAX_JOBS: 2 diff --git a/windows/templates/linux_build_task.yml b/windows/templates/linux_build_task.yml deleted file mode 100644 index 0b3289279..000000000 --- a/windows/templates/linux_build_task.yml +++ /dev/null @@ -1,38 +0,0 @@ -parameters: - msagent: true - enabled: false - -jobs: -- job: 'Linux_CPU_Conda_Build' - timeoutInMinutes: 0 - cancelTimeoutInMinutes: 5 - condition: ${{ eq(parameters.enabled, 'true') }} - variables: - CUDA_VERSION: cpu - TORCH_CONDA_BUILD_FOLDER: pytorch-nightly - PYTORCH_FINAL_PACKAGE_DIR: '$(Build.Repository.LocalPath)/output' - - strategy: - maxParallel: 10 - matrix: - PY3.5: - DESIRED_PYTHON: 3.5 - - pool: - vmImage: 'ubuntu-16.04' - - steps: - - checkout: self - clean: true - - - script: 'sudo apt-get install p7zip-full' - displayName: 'Install 7Zip' - - - task: CondaEnvironment@1 - displayName: 'Install conda-build' - inputs: - packageSpecs: 'conda-build' - - - template: build_conda.yml - parameters: - msagent: ${{ parameters.msagent }} diff --git a/windows/templates/publish_packages.yml b/windows/templates/publish_packages.yml deleted file mode 100644 index 9be02f5df..000000000 --- a/windows/templates/publish_packages.yml +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - package: '' - -steps: -- script: 'windows/internal/publish.bat' - displayName: 'Upload packages to Azure DevOps Repo' - env: - PACKAGEFULLNAME: ${{ parameters.package }} diff --git a/windows/templates/publish_test_results.yml b/windows/templates/publish_test_results.yml deleted file mode 100644 index 1e0dc0215..000000000 --- a/windows/templates/publish_test_results.yml +++ /dev/null @@ -1,6 +0,0 @@ -steps: -- task: PublishTestResults@2 # No test results to publish - inputs: - testResultsFiles: 'windows/pytorch/test/**/*.xml' - testRunTitle: 'Publish test results' - enabled: false diff --git a/windows/templates/setup_env_for_msagent.yml b/windows/templates/setup_env_for_msagent.yml deleted file mode 100644 index a8d35692b..000000000 --- a/windows/templates/setup_env_for_msagent.yml +++ /dev/null @@ -1,26 +0,0 @@ -parameters: - msagent: false - -steps: -- ${{ if eq(parameters.msagent, 'true') }}: - - task: BatchScript@1 - displayName: 'Install VS 2017' - inputs: - filename: 'windows/internal/vs_install.bat' - - modifyEnvironment: true - - - task: BatchScript@1 - enabled: false - displayName: 'Environment fix' - inputs: - filename: 'windows/internal/env_fix.bat' - - modifyEnvironment: false - - - task: BatchScript@1 - displayName: 'Install 7Zip' - inputs: - filename: 'windows/internal/7z_install.bat' - - modifyEnvironment: true diff --git a/windows/templates/setup_nightly_variables.yml b/windows/templates/setup_nightly_variables.yml deleted file mode 100644 index b7899ee11..000000000 --- a/windows/templates/setup_nightly_variables.yml +++ /dev/null @@ -1,11 +0,0 @@ -parameters: - package: '' - -steps: -- task: BatchScript@1 - displayName: 'Setup nightly variables' - inputs: - filename: 'windows/internal/nightly_defaults.bat' - arguments: ${{ parameters.package }} - - modifyEnvironment: true diff --git a/windows/templates/upload_to_conda.yml b/windows/templates/upload_to_conda.yml deleted file mode 100644 index 2da208733..000000000 --- a/windows/templates/upload_to_conda.yml +++ /dev/null @@ -1,10 +0,0 @@ -parameters: - user: '' - pass: '' - -steps: -- script: 'call windows/internal/upload.bat' - displayName: 'Upload packages to Anaconda Cloud' - env: - PYTORCH_ANACONDA_USERNAME: ${{ parameters.user }} - PYTORCH_ANACONDA_PASSWORD: ${{ parameters.pass }} diff --git a/windows/templates/upload_to_s3.yml b/windows/templates/upload_to_s3.yml deleted file mode 100644 index eaad0495d..000000000 --- a/windows/templates/upload_to_s3.yml +++ /dev/null @@ -1,26 +0,0 @@ -parameters: - cuVer: '' - cudaVer: '' - -steps: -- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1 - displayName: 'Upload ${{ parameters.cuVer }} wheel to S3' - inputs: - awsCredentials: 'Pytorch S3 bucket' - bucketName: 'pytorch' - sourceFolder: 'windows/output' - globExpressions: '*.whl' - targetFolder: 'whl/nightly/${{ parameters.cuVer }}/' - filesAcl: 'public-read' - flattenFolders: 'true' - -- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1 - displayName: 'Upload ${{ parameters.cuVer }} libtorch to S3' - inputs: - awsCredentials: 'Pytorch S3 bucket' - bucketName: 'pytorch' - sourceFolder: 'windows/output' - globExpressions: '*.zip' - targetFolder: 'libtorch/nightly/${{ parameters.cuVer }}/' - filesAcl: 'public-read' - flattenFolders: 'true' diff --git a/windows/templates/vsts_auth.yml b/windows/templates/vsts_auth.yml deleted file mode 100644 index 5a036ce63..000000000 --- a/windows/templates/vsts_auth.yml +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - auth: '' - -steps: -- script: 'call windows/internal/auth.bat' - displayName: 'Sign in to Azure Pipelines' - env: - VSTS_AUTH: ${{ parameters.auth }} diff --git a/windows/upload/upload.sh b/windows/upload/upload.sh deleted file mode 100755 index dfc71cd4c..000000000 --- a/windows/upload/upload.sh +++ /dev/null @@ -1,40 +0,0 @@ -set -ex - -if [ "$#" -ne 1 ]; then - echo "Illegal number of parameters. Pass pytorch or torchvision as the option" - exit 1 -fi - -package_name=$1 - -if [[ "$package_name" == pytorch ]]; then - echo "Uploading pytorch binaries" -elif [[ "$package_name" == torchvision ]]; then - echo "Uploading torchvision binaries" -else - echo "Unknown option $package_name" - exit 1 -fi - - -pushd winwheels/conda -anaconda upload -u pytorch $package_name*.bz2 --force -popd - - -pushd winwheels/whl -if [[ "$package_name" == pytorch ]]; then - find . -name "*torch-*.whl" | cut -f 2- -d'/' | xargs -I {} aws s3 cp {} s3://pytorch/whl/{} --acl public-read -elif [[ "$package_name" == torchvision ]]; then - find . -name "*torchvision*.whl" | cut -f 2- -d'/' | xargs -I {} aws s3 cp {} s3://pytorch/whl/{} --acl public-read -fi -popd - - -if [[ "$package_name" == pytorch ]]; then - pushd winwheels/libtorch - find . -name "*.zip" | cut -f 2- -d'/' | xargs -I {} aws s3 cp {} s3://pytorch/libtorch/{} --acl public-read -fi - -# then run -# HTML_NAME=torch_nightly.html PIP_UPLOAD_FOLDER="nightly/" cron/update_s3_htmls.sh diff --git a/windows/upload/win_reorganize.sh b/windows/upload/win_reorganize.sh deleted file mode 100755 index 72d05caea..000000000 --- a/windows/upload/win_reorganize.sh +++ /dev/null @@ -1,114 +0,0 @@ -set -ex - -if [ "$#" -ne 1 ]; then - echo "Illegal number of parameters. Pass pytorch or torchvision as the option" - exit 1 -fi - -package_name=$1 - -if [[ "$package_name" == pytorch ]]; then - echo "Reorganizing pytorch binaries" -elif [[ "$package_name" == torchvision ]]; then - echo "Reorganizing torchvision binaries" -else - echo "Unknown option $package_name" - exit 1 -fi - -# the branch names that get published are: -# remotes/origin/conda_3.5 -# remotes/origin/conda_3.5_cuda101 -# remotes/origin/conda_3.5_cuda92 -# remotes/origin/conda_3.6 -# remotes/origin/conda_3.6_cuda101 -# remotes/origin/conda_3.6_cuda92 -# remotes/origin/conda_3.7 -# remotes/origin/conda_3.7_cuda101 -# remotes/origin/conda_3.7_cuda92 -# remotes/origin/conda_3.8 -# remotes/origin/conda_3.8_cuda101 -# remotes/origin/conda_3.8_cuda92 -# remotes/origin/master -# remotes/origin/wheels_3 -# remotes/origin/wheels_3_debug -# remotes/origin/wheels_3.5 -# remotes/origin/wheels_3.5_cuda101 -# remotes/origin/wheels_3.5_cuda92 -# remotes/origin/wheels_3.6 -# remotes/origin/wheels_3.6_cuda101 -# remotes/origin/wheels_3.6_cuda92 -# remotes/origin/wheels_3.7 -# remotes/origin/wheels_3.7_cuda101 -# remotes/origin/wheels_3.7_cuda92 -# remotes/origin/wheels_3.8 -# remotes/origin/wheels_3.8_cuda101 -# remotes/origin/wheels_3.8_cuda92 -# remotes/origin/wheels_3_cuda101 -# remotes/origin/wheels_3_cuda101_debug -# remotes/origin/wheels_3_cuda92 -# remotes/origin/wheels_3_cuda92_debug - - -PYTHON_VERSIONS=('3.5' '3.6' '3.7' '3.8') -DTYPE=('conda' 'wheels') - -CUDA_VERSIONS=('' '_cuda92' '_cuda101') -CUDA_FOLDERS=('cpu' 'cuda92' 'cuda101') -CUDA_VERSIONS_FINAL=('cpu' 'cu92' 'cu101') - -mkdir winwheels || true -final_dir="$(pwd)/winwheels" - -pushd pytorch_builder -for ((i=0;i<${#CUDA_VERSIONS[@]};++i)); do - CUDA_VERSION=${CUDA_VERSIONS[i]} - CUDA_VERSION_FINAL=${CUDA_VERSIONS_FINAL[i]} - CUDA_FOLDER=${CUDA_FOLDERS[i]} - for py_ver in "${PYTHON_VERSIONS[@]}"; do - for dtype in "${DTYPE[@]}"; do - - BRANCH_NAME=remotes/origin/${dtype}_$py_ver$CUDA_VERSION - VISION_BRANCH_NAME=remotes/origin/vision_${dtype}_$py_ver$CUDA_VERSION - if [[ "$package_name" == pytorch ]]; then - echo $BRANCH_NAME - git checkout $BRANCH_NAME - if [[ "$dtype" == "wheels"* ]]; then - mkdir -p $final_dir/whl/$CUDA_VERSION_FINAL - cp $dtype/$CUDA_FOLDER/* $final_dir/whl/$CUDA_VERSION_FINAL/ - else - mkdir -p $final_dir/conda - cp $dtype/* $final_dir/conda/ - fi - elif [[ "$package_name" == torchvision ]]; then - echo $VISION_BRANCH_NAME - git checkout $VISION_BRANCH_NAME - if [[ "$dtype" == "wheels"* ]]; then - mkdir -p $final_dir/whl/$CUDA_VERSION_FINAL - cp $dtype/$CUDA_FOLDER/* $final_dir/whl/$CUDA_VERSION_FINAL/ - else - mkdir -p $final_dir/conda - cp $dtype/* $final_dir/conda/ - fi - fi - done - done -done -popd - -if [[ "$package_name" == pytorch ]]; then - - mkdir $final_dir/libtorch || true - pushd pytorch_builder - - for ((i=0;i<${#CUDA_VERSIONS[@]};++i)); do - CUDA_VERSION=${CUDA_VERSIONS[i]} - CUDA_VERSION_FINAL=${CUDA_VERSIONS_FINAL[i]} - CUDA_FOLDER=${CUDA_FOLDERS[i]} - mkdir -p $final_dir/libtorch/$CUDA_VERSION_FINAL - git checkout remotes/origin/wheels_3${CUDA_VERSION} - cp wheels/$CUDA_FOLDER/* $final_dir/libtorch/$CUDA_VERSION_FINAL - git checkout remotes/origin/wheels_3${CUDA_VERSION}_debug - cp wheels/$CUDA_FOLDER/* $final_dir/libtorch/$CUDA_VERSION_FINAL - done -fi