Skip to content

Commit 9bc094e

Browse files
authored
enable Windows GPU CI on GHA (#7498)
1 parent a33ce08 commit 9bc094e

File tree

4 files changed

+6
-160
lines changed

4 files changed

+6
-160
lines changed

.circleci/config.yml

Lines changed: 0 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/config.yml.in

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -433,53 +433,6 @@ jobs:
433433
docker push ${image_name}:${CIRCLE_WORKFLOW_ID}
434434
docker push ${image_name}:latest
435435

436-
unittest_windows_gpu:
437-
<<: *binary_common
438-
executor:
439-
name: windows-gpu
440-
environment:
441-
CUDA_VERSION: "11.7"
442-
PYTHON_VERSION: << parameters.python_version >>
443-
steps:
444-
- checkout
445-
- designate_upload_channel
446-
- run:
447-
name: Generate cache key
448-
# This will refresh cache on Sundays, nightly build should generate new cache.
449-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
450-
- restore_cache:
451-
{% raw %}
452-
keys:
453-
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
454-
{% endraw %}
455-
- run:
456-
name: Setup
457-
command: .circleci/unittest/windows/scripts/setup_env.sh
458-
- save_cache:
459-
{% raw %}
460-
key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
461-
{% endraw %}
462-
paths:
463-
- conda
464-
- env
465-
- run:
466-
name: Install CUDA
467-
command: packaging/windows/internal/cuda_install.bat
468-
- run:
469-
name: Update CUDA driver
470-
command: packaging/windows/internal/driver_update.bat
471-
- run:
472-
name: Install torchvision
473-
command: .circleci/unittest/windows/scripts/install.sh
474-
- run:
475-
name: Run tests
476-
command: .circleci/unittest/windows/scripts/run_test.sh
477-
- run:
478-
name: Post process
479-
command: .circleci/unittest/windows/scripts/post_process.sh
480-
- store_test_results:
481-
path: test-results
482-
483436
cmake_linux_cpu:
484437
<<: *binary_common
485438
docker:
@@ -575,10 +528,6 @@ workflows:
575528
{{ ios_workflows() }}
576529
{{ android_workflows() }}
577530

578-
unittest:
579-
jobs:
580-
{{ unittest_workflows() }}
581-
582531
cmake:
583532
jobs:
584533
{{ cmake_workflows() }}

.circleci/regenerate.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -217,36 +217,6 @@ def indent(indentation, data_list):
217217
return ("\n" + " " * indentation).join(yaml.dump(data_list, default_flow_style=False).splitlines())
218218

219219

220-
def unittest_workflows(indentation=6):
221-
jobs = []
222-
for os_type in ["windows"]:
223-
for device_type in ["gpu"]:
224-
if os_type == "macos" and device_type == "gpu":
225-
continue
226-
227-
for i, python_version in enumerate(PYTHON_VERSIONS):
228-
229-
# Turn off unit tests for 3.11, unit test are not setup properly
230-
if python_version == "3.11":
231-
continue
232-
233-
job = {
234-
"name": f"unittest_{os_type}_{device_type}_py{python_version}",
235-
"python_version": python_version,
236-
}
237-
238-
if device_type == "gpu":
239-
if python_version != "3.8":
240-
job["filters"] = gen_filter_branch_tree("main", "nightly")
241-
job["cu_version"] = "cu117"
242-
else:
243-
job["cu_version"] = "cpu"
244-
245-
jobs.append({f"unittest_{os_type}_{device_type}": job})
246-
247-
return indent(indentation, jobs)
248-
249-
250220
def cmake_workflows(indentation=6):
251221
jobs = []
252222
python_version = "3.8"
@@ -331,7 +301,6 @@ def android_workflows(indentation=6, nightly=False):
331301
f.write(
332302
env.get_template("config.yml.in").render(
333303
build_workflows=build_workflows,
334-
unittest_workflows=unittest_workflows,
335304
cmake_workflows=cmake_workflows,
336305
ios_workflows=ios_workflows,
337306
android_workflows=android_workflows,

.github/workflows/test-windows.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ jobs:
2020
- "3.11"
2121
runner: ["windows.4xlarge"]
2222
gpu-arch-type: ["cpu"]
23-
# FIXME: enable this as soon as nvjpeg is available on the Windows runner
24-
# include:
25-
# - python-version: "3.8"
26-
# runner: windows.8xlarge.nvidia.gpu
27-
# gpu-arch-type: cuda
28-
# gpu-arch-version: "11.7"
23+
include:
24+
- python-version: "3.8"
25+
runner: windows.g5.4xlarge.nvidia.gpu
26+
gpu-arch-type: cuda
27+
gpu-arch-version: "11.7"
2928
fail-fast: false
3029
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
3130
with:
@@ -46,6 +45,7 @@ jobs:
4645
# TODO: This should be handled by the generic Windows job the same as its done by the generic Linux job
4746
export CUDA_HOME="/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${{ matrix.gpu-arch-version }}"
4847
export CUDA_PATH="${CUDA_HOME}"
48+
export PATH="${CUDA_PATH}/bin:${PATH}"
4949
fi
5050
5151
./.github/scripts/unittest.sh

0 commit comments

Comments
 (0)