Skip to content

Commit

Permalink
# This is a combination of 3 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

# This is a combination of 16 commits.
# This is the 1st commit message:

.

# This is the commit message pytorch#2:

Enable wheel tests

# This is the commit message pytorch#3:

Remove useless %

# This is the commit message pytorch#4:

Debug CPU conda

# This is the commit message pytorch#5:

.

# This is the commit message pytorch#6:

.

# This is the commit message pytorch#7:

Revert debugging stuff

# This is the commit message pytorch#8:

.

# This is the commit message pytorch#9:

Revert to normal

# This is the commit message pytorch#10:

Revert to legacy version

# This is the commit message pytorch#11:

Disable all except CPU conda

# This is the commit message pytorch#12:

Explicit python version

# This is the commit message pytorch#13:

Revert "Explicit python version"

This reverts commit a45b285.

# This is the commit message pytorch#14:

Revert "Disable all except CPU conda"

This reverts commit 2c69de7.

# This is the commit message pytorch#15:

Use branches first

# This is the commit message pytorch#16:

Use hash

# This is the commit message pytorch#2:

.

# This is the commit message pytorch#3:

.
  • Loading branch information
peterjc123 authored and soumith committed Apr 28, 2019
1 parent 50d345a commit eb98223
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 41 deletions.
14 changes: 13 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,26 @@ 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


##############################################################################
# Running unit tests (except not right now)
##############################################################################
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
Expand Down
10 changes: 5 additions & 5 deletions windows/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions windows/internal/clone.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion windows/internal/publish.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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%
Expand Down
7 changes: 2 additions & 5 deletions windows/internal/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions windows/internal/test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -35,26 +35,25 @@ 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

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

Expand Down
45 changes: 25 additions & 20 deletions windows/templates/build_task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
cudaEnabled: true
condaEnabled: true
wheelsEnabled: true
override: false
override: true

jobs:
- job: 'Windows_${{ parameters.spec }}_${{ parameters.package }}_Build'
Expand All @@ -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
Expand Down Expand Up @@ -110,7 +112,7 @@ jobs:
${{ if eq(parameters.msagent, 'true') }}:
vmImage: 'win1803'
${{ if eq(parameters.msagent, 'false') }}:
name: 'pytorch'
name: 'release'

steps:
- checkout: self
Expand All @@ -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
Expand All @@ -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)
8 changes: 8 additions & 0 deletions windows/templates/publish_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
package: ''

steps:
- script: 'windows/internal/publish.bat'
displayName: 'Upload packages to Azure DevOps Repo'
env:
PACKAGEFULLNAME: ${{ parameters.package }}

0 comments on commit eb98223

Please sign in to comment.