From 3817f168ea6cc0a545b28b4ac1107a8972a4db1f Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Thu, 5 Nov 2020 17:54:46 +0100 Subject: [PATCH 1/6] [WIP] Added windows gpu test to circle ci --- .circleci/config.yml | 48 +++++++++++++++++++++++++++++++++++++++++- tests/run_gpu_tests.sh | 5 +++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f8d6503f6e4b..e7ca3483abfa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,14 @@ one_gpu: &one_gpu # https://circleci.com/product/features/resource-classes/#linux-vm resource_class: gpu.small + +one_gpu_windows: &one_gpu_windows + machine: + resource_class: windows.gpu.nvidia.medium + image: windows-server-2019-nvidia:stable + shell: bash.exe + + two_gpus: &two_gpus machine: # https://circleci.com/docs/2.0/configuration-reference/#available-linux-gpu-images @@ -100,7 +108,7 @@ jobs: - <<: *run_pytorch_container - <<: *install_dependencies - run: - name: Run GPU Unit Tests + name: Run GPU Unit Tests and Examples command: | # pytest on cuda @@ -146,6 +154,43 @@ jobs: bash <(curl -s https://codecov.io/bash) -Z -F gpu + one_gpu_windows_tests: + <<: *one_gpu_windows + + working_directory: << pipeline.parameters.workingdir >> + + steps: + - checkout + - run: + name: Trigger job if modified + command: | + bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*" + + - run: + name: Install Conda + command: | + curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O + eval "$(miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0") + eval "$(conda.exe '--version')" + + - run: + name: Install dependencies + command: | + pip install -r requirements-dev.txt + pip install . + + - run: + name: Run GPU Unit Tests + command: | + # pytest on cuda + SKIP_DISTRIB_TESTS=1 bash tests/run_gpu_tests.sh + + - run: + name: Codecov upload + command: | + bash <(curl -s https://codecov.io/bash) -Z -F gpu-windows + + two_gpus_tests: <<: *two_gpus @@ -302,6 +347,7 @@ workflows: jobs: - one_gpu_tests + - one_gpu_windows_tests - two_gpus_tests - two_gpus_check_dist_cifar10_example - two_gpus_hvd_tests diff --git a/tests/run_gpu_tests.sh b/tests/run_gpu_tests.sh index e773f8d5965d..ce06bbe06c8a 100644 --- a/tests/run_gpu_tests.sh +++ b/tests/run_gpu_tests.sh @@ -10,6 +10,11 @@ set -xeu py.test --cov ignite --cov-report term-missing --cov-report xml -vvv tests/ -k 'on_cuda' +# https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02 +if [ "${SKIP_DISTRIB_TESTS:-0}" -eq "1" ]; then + exit 0 +fi + py.test --cov ignite --cov-append --cov-report term-missing --cov-report xml -vvv tests/ -m distributed From 64f91d3822bb0f687f9de84aa330c2ae48d9020b Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Fri, 6 Nov 2020 11:52:32 +0100 Subject: [PATCH 2/6] Updated windows config --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e7ca3483abfa..e08acde8d09a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -170,12 +170,13 @@ jobs: name: Install Conda command: | curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O - eval "$(miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0") - eval "$(conda.exe '--version')" + ./miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 + conda --version - run: name: Install dependencies command: | + conda install -y pytorch torchvision cudatoolkit=10.1 -c pytorch pip install -r requirements-dev.txt pip install . From 598fdeac91dc55260635a8c8bb5de0598ca24f36 Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Fri, 6 Nov 2020 12:02:56 +0100 Subject: [PATCH 3/6] Updated conda installation --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e08acde8d09a..24dd4b8c3560 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -170,7 +170,7 @@ jobs: name: Install Conda command: | curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O - ./miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 + eval "$(miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0") conda --version - run: From c35a07a8a5a85b2eb74702d6824f6197da786f75 Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Fri, 6 Nov 2020 13:27:05 +0100 Subject: [PATCH 4/6] Updated miniconda install command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 24dd4b8c3560..6e6d9815f1d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -170,7 +170,7 @@ jobs: name: Install Conda command: | curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O - eval "$(miniconda.exe /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0") + ./miniconda.exe /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 conda --version - run: From 982d569b3b7f5ee53933c78c0ac2d2352bb4a98a Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Fri, 6 Nov 2020 14:07:43 +0100 Subject: [PATCH 5/6] Removed conda installation --- .circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e6d9815f1d0..314f600bc884 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,10 +167,8 @@ jobs: bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*" - run: - name: Install Conda + name: Check Conda command: | - curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O - ./miniconda.exe /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 conda --version - run: @@ -186,12 +184,6 @@ jobs: # pytest on cuda SKIP_DISTRIB_TESTS=1 bash tests/run_gpu_tests.sh - - run: - name: Codecov upload - command: | - bash <(curl -s https://codecov.io/bash) -Z -F gpu-windows - - two_gpus_tests: <<: *two_gpus From 3be2c9b38ad5425bf1266ffb2b51e9c084d4f4f7 Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Fri, 6 Nov 2020 14:10:31 +0100 Subject: [PATCH 6/6] Updated configuration --- .circleci/config.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 314f600bc884..a7bb13a60a1b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,14 +166,10 @@ jobs: command: | bash .circleci/trigger_if_modified.sh "^(ignite|tests|examples|\.circleci).*" - - run: - name: Check Conda - command: | - conda --version - - run: name: Install dependencies command: | + conda --version conda install -y pytorch torchvision cudatoolkit=10.1 -c pytorch pip install -r requirements-dev.txt pip install .