diff --git a/run_tests.sh b/run_tests.sh index 781e7f3a0..75b73e515 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -137,7 +137,7 @@ popd # real problems. Once these are on circleci and a smoke-binary-build is added # to PRs then this should stop happening and these can be re-enabled. echo "Not running unit tests. Hopefully these problems are caught by CI" -exit 0 +# exit 0 ############################################################################## @@ -145,6 +145,18 @@ exit 0 ############################################################################## echo "$(date) :: Starting tests for $package_type package for python$py_ver and $cuda_ver" +if [[ "$OSTYPE" == "msys" ]]; then + echo + echo "$(date) :: Calling 'python test/run_test.py -v'" + + python test/run_test.py -v + + echo + echo "$(date) :: Finished 'python test/run_test.py -v'" + + exit 0 +fi + # We keep track of exact tests to skip, as otherwise we would be hardly running # any tests. But b/c of issues working with pytest/normal-python-test/ and b/c # of special snowflake tests in test/run_test.py we also take special care of diff --git a/windows/azure-pipelines.yml b/windows/azure-pipelines.yml index e0cbd7cce..b0e9c0cf6 100644 --- a/windows/azure-pipelines.yml +++ b/windows/azure-pipelines.yml @@ -18,11 +18,11 @@ jobs: spec: 'CPU' msagent: false -- template: templates/build_task.yml - parameters: - package: 'Wheels' - spec: 'CUDA' - msagent: false +# - template: templates/build_task.yml +# parameters: +# package: 'Wheels' +# spec: 'CUDA' +# msagent: false - template: templates/build_task.yml parameters: diff --git a/windows/internal/clone.bat b/windows/internal/clone.bat index b69d48014..620a8f2a3 100755 --- a/windows/internal/clone.bat +++ b/windows/internal/clone.bat @@ -43,8 +43,8 @@ set PYTORCH_BRANCH=%last_commit% IF "%PYTORCH_BRANCH%" == "" ( set PYTORCH_BRANCH=v%PYTORCH_BUILD_VERSION% ) -git checkout tags/%PYTORCH_BRANCH% -IF ERRORLEVEL 1 git checkout %PYTORCH_BRANCH% +git checkout %PYTORCH_BRANCH% +IF ERRORLEVEL 1 git checkout tags/%PYTORCH_BRANCH% :submodule diff --git a/windows/internal/publish.bat b/windows/internal/publish.bat index 5fc1942ec..6ee9ef853 100644 --- a/windows/internal/publish.bat +++ b/windows/internal/publish.bat @@ -9,6 +9,12 @@ if NOT "%CUDA_VERSION%" == "cpu" ( set PACKAGE_SUFFIX= ) +if "%PACKAGEFULLNAME%" == "Conda" ( + set PACKAGE=conda +) else ( + set PACKAGE=wheels +) + set PUBLISH_BRANCH=%PACKAGE%_%DESIRED_PYTHON%%PACKAGE_SUFFIX% git clone %ARTIFACT_REPO_URL% -b %PUBLISH_BRANCH% --single-branch >nul 2>&1 @@ -52,7 +58,7 @@ if "%RETRY_TIMES%" == "" ( set /a SLEEP_TIME=%SLEEP_TIME%*2 ) -git push origin %PUBLISH_BRANCH%% -f > nul 2>&1 +git push origin %PUBLISH_BRANCH% -f > nul 2>&1 IF ERRORLEVEL 1 ( echo Git push retry times remaining: %RETRY_TIMES% diff --git a/windows/internal/setup.bat b/windows/internal/setup.bat index 13cdb9ce6..c8c2d8282 100755 --- a/windows/internal/setup.bat +++ b/windows/internal/setup.bat @@ -35,12 +35,9 @@ if "%BUILD_PYTHONLESS%" == "" goto pytorch else goto libtorch set VARIANT=shared-with-deps mkdir libtorch -mkdir libtorch\bin -mkdir libtorch\cmake -mkdir libtorch\include +set "INSTALL_DIR=%CD%\libtorch" mkdir libtorch\lib -mkdir libtorch\share -mkdir libtorch\test +copy /Y torch\lib\*.dll libtorch\lib\ mkdir build pushd build diff --git a/windows/internal/test.bat b/windows/internal/test.bat index 48ec650c6..fbceabae0 100644 --- a/windows/internal/test.bat +++ b/windows/internal/test.bat @@ -18,7 +18,7 @@ if ERRORLEVEL 1 exit /b 1 python -c "from caffe2.python import core" if ERRORLEVEL 1 exit /b 1 -echo "Checking that MKL is available" +echo Checking that MKL is available python -c "import torch; exit(0 if torch.backends.mkl.is_available() else 1)" if ERRORLEVEL 1 exit /b 1 @@ -35,9 +35,6 @@ for /F "delims=" %%i in ('wmic path win32_VideoController get name') do ( endlocal & set NVIDIA_GPU_EXISTS=%NVIDIA_GPU_EXISTS% if NOT "%CUDA_PREFIX%" == "cpu" if "%NVIDIA_GPU_EXISTS%" == "1" ( - python -c "import torch; torch.rand(1).cuda(); exit(0 if torch.cuda.has_magma else 1)" - if ERRORLEVEL 1 exit /b 1 - echo Checking that CUDA archs are setup correctly python -c "import torch; torch.randn([3,5]).cuda()" if ERRORLEVEL 1 exit /b 1 @@ -45,16 +42,18 @@ if NOT "%CUDA_PREFIX%" == "cpu" if "%NVIDIA_GPU_EXISTS%" == "1" ( echo Checking that magma is available python -c "import torch; torch.rand(1).cuda(); exit(0 if torch.cuda.has_magma else 1)" if ERRORLEVEL 1 exit /b 1 + echo Checking that CuDNN is available python -c "import torch; exit(0 if torch.backends.cudnn.is_available() else 1)" if ERRORLEVEL 1 exit /b 1 ) -echo Not running unit tests. Hopefully these problems are caught by CI -goto test_end +REM echo Not running unit tests. Hopefully these problems are caught by CI +REM goto test_end cd pytorch\test -python run_test.py -v -pt -x c10d distributed thd_distributed +REM python run_test.py -v -pt -x c10d distributed thd_distributed +python run_test.py -v if ERRORLEVEL 1 exit /b 1 diff --git a/windows/templates/build_task.yml b/windows/templates/build_task.yml index 146b4b15f..16bbbf161 100644 --- a/windows/templates/build_task.yml +++ b/windows/templates/build_task.yml @@ -8,7 +8,7 @@ parameters: cudaEnabled: true condaEnabled: true wheelsEnabled: true - override: false + override: true jobs: - job: 'Windows_${{ parameters.spec }}_${{ parameters.package }}_Build' @@ -26,13 +26,15 @@ jobs: variables: - ${{ if eq(parameters.override, 'true') }}: - name: PYTORCH_BUILD_VERSION - value: '1.0.0' + value: '1.0.1' - name: PYTORCH_BUILD_NUMBER value: 1 - name: PYTORCH_REPO value: 'pytorch' - name: PYTORCH_BRANCH - value: 'v1.0.0' + value: '743fdbdb192dd0f07d51d6f94f8b47984484b54f' + - name: TORCH_CONDA_BUILD_FOLDER + value: 'pytorch-1.0.1' - ${{ if eq(parameters.msagent, 'true') }}: - name: USE_SCCACHE value: 0 @@ -110,7 +112,7 @@ jobs: ${{ if eq(parameters.msagent, 'true') }}: vmImage: 'win1803' ${{ if eq(parameters.msagent, 'false') }}: - name: 'pytorch' + name: 'release' steps: - checkout: self @@ -120,7 +122,7 @@ jobs: parameters: msagent: ${{ parameters.msagent }} - - template: setup_nightly_variables.yml + # - template: setup_nightly_variables.yml - ${{ if eq(parameters.package, 'Wheels') }}: - template: build_wheels.yml @@ -136,21 +138,24 @@ jobs: - template: publish_test_results.yml parameters: msagent: ${{ parameters.msagent }} - - - ${{ if and(eq(parameters.package, 'Wheels'), eq(parameters.spec, 'CPU')) }}: - - template: upload_to_s3.yml + - template: publish_packages.yml parameters: - cuVer: '$(CUDA_VERSION)' - cudaVer: '$(CUDA_VERSION)' + package: ${{ parameters.package }} - - ${{ 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 and(eq(parameters.package, 'Wheels'), eq(parameters.spec, 'CPU')) }}: + # - template: upload_to_s3.yml + # parameters: + # cuVer: '$(CUDA_VERSION)' + # cudaVer: '$(CUDA_VERSION)' - - ${{ if eq(parameters.package, 'Conda') }}: - - template: upload_to_conda.yml - parameters: - user: $(peterjc_conda_username) - pass: $(peterjc_conda_password) + # - ${{ 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) diff --git a/windows/templates/publish_packages.yml b/windows/templates/publish_packages.yml new file mode 100644 index 000000000..9be02f5df --- /dev/null +++ b/windows/templates/publish_packages.yml @@ -0,0 +1,8 @@ +parameters: + package: '' + +steps: +- script: 'windows/internal/publish.bat' + displayName: 'Upload packages to Azure DevOps Repo' + env: + PACKAGEFULLNAME: ${{ parameters.package }}