Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit cd4b08d

Browse files
committed
consolidated windows and linux test
1 parent d2ba48e commit cd4b08d

File tree

2 files changed

+49
-53
lines changed

2 files changed

+49
-53
lines changed

.github/workflows/validate-windows-binaries-gpu.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
matrix:
1515
# ${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
1616
"include": [
17-
# {
18-
# "python_version": "3.7",
19-
# "gpu_arch_type": "cpu",
20-
# "gpu_arch_version": "",
21-
# "desired_cuda": "cpu",
22-
# "container_image": "pytorch/conda-builder:cpu",
23-
# "package_type": "conda",
24-
# "build_name": "conda-py3_7-cpu",
25-
# "installation": "conda install pytorch torchvision torchaudio cpuonly -c pytorch-nightly",
26-
# "validation_runner": "windows-2019"
27-
# },
17+
{
18+
"python_version": "3.7",
19+
"gpu_arch_type": "cpu",
20+
"gpu_arch_version": "",
21+
"desired_cuda": "cpu",
22+
"container_image": "pytorch/conda-builder:cpu",
23+
"package_type": "conda",
24+
"build_name": "conda-py3_7-cpu",
25+
"installation": "conda install pytorch torchvision torchaudio cpuonly -c pytorch-nightly",
26+
"validation_runner": "windows-2019"
27+
},
2828
{
2929
"python_version": "3.7",
3030
"gpu_arch_type": "cuda",
@@ -46,46 +46,43 @@ jobs:
4646
# "build_name": "conda-py3_7-cpu",
4747
# "validation_runner": "macos-m1-12"
4848
# },
49-
# {
50-
# "python_version": "3.7",
51-
# "gpu_arch_type": "cpu",
52-
# "gpu_arch_version": "",
53-
# "desired_cuda": "cpu",
54-
# "container_image": "pytorch/conda-builder:cpu",
55-
# "package_type": "conda",
56-
# "build_name": "conda-py3_7-cpu",
57-
# "validation_runner": "ubuntu-20.04"
58-
# },
59-
# {
60-
# "python_version": "3.8",
61-
# "gpu_arch_type": "cuda",
62-
# "gpu_arch_version": "11.6",
63-
# "desired_cuda": "cu116",
64-
# "container_image": "pytorch/conda-builder:cuda11.6",
65-
# "package_type": "conda",
66-
# "build_name": "conda-py3_8-cuda11_6",
67-
# "validation_runner": "ubuntu-20.04-m60",
68-
# "channel": "test"
69-
# }
49+
{
50+
"python_version": "3.7",
51+
"gpu_arch_type": "cpu",
52+
"gpu_arch_version": "",
53+
"desired_cuda": "cpu",
54+
"container_image": "pytorch/conda-builder:cpu",
55+
"package_type": "conda",
56+
"build_name": "conda-py3_7-cpu",
57+
"installation": "conda install pytorch torchvision torchaudio cpuonly -c pytorch-nightly",
58+
"validation_runner": "ubuntu-20.04"
59+
},
60+
{
61+
"python_version": "3.8",
62+
"gpu_arch_type": "cuda",
63+
"gpu_arch_version": "11.6",
64+
"desired_cuda": "cu116",
65+
"container_image": "pytorch/conda-builder:cuda11.6",
66+
"package_type": "conda",
67+
"build_name": "conda-py3_8-cuda11_6",
68+
"validation_runner": "ubuntu-20.04-m60",
69+
"installation": "conda install pytorch torchvision torchaudio cpuonly -c pytorch-nightly",
70+
"channel": "test"
71+
}
7072
]
7173
fail-fast: false
7274
runs-on: ${{ matrix.validation_runner }}
7375
steps:
7476
- name: Checkout PyTorch builder
7577
uses: actions/checkout@v2
76-
# - name: Install conda
77-
# uses: conda-incubator/setup-miniconda@v2
78-
# with:
79-
# python-version: ${{ matrix.python_version }}
80-
# miniconda-version: "latest"
81-
# auto-activate-base: false
82-
# activate-environment: conda-env-${{ github.run_id }}
83-
- name: Check nvidia smi
84-
if: ${{ matrix.gpu_arch_type == 'cuda' }}
85-
run: |
86-
nvidia-smi
87-
- name: Conda version
88-
run: conda --version
78+
- name: Install conda
79+
uses: conda-incubator/setup-miniconda@v2
80+
if: matrix.validation_runner == 'windows-2019' || contains(matrix.validation_runner, 'ubuntu')
81+
with:
82+
python-version: ${{ matrix.python_version }}
83+
auto-update-conda: true
84+
miniconda-version: "latest"
85+
activate-environment: testenv
8986
- name: Conda Install pytorch and smoke test
9087
env:
9188
GPU_ARCH_VER: ${{ matrix.gpu_arch_version }}
@@ -94,7 +91,10 @@ jobs:
9491
INSTALLATION: ${{ matrix.installation }}
9592
ENV_NAME: conda-env-${{ github.run_id }}
9693
run: |
97-
$ErrorActionPreference = 'Stop'
98-
conda create -yp $env:ENV_NAME python=${{ matrix.python_version }} numpy
99-
conda run -p $env:ENV_NAME $env:INSTALLATION
100-
conda run -p $env:ENV_NAME python ./test/smoke_test/smoke_test.py
94+
conda install numpy python=${{ matrix.python_version }}
95+
${{ matrix.installation }}
96+
conda info
97+
conda list
98+
which python
99+
python --version
100+
python ./test/smoke_test/smoke_test.py

test/smoke_test/smoke_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
import os
2-
3-
print(os.environ['CONDA_DEFAULT_ENV'])
4-
print(os.environ["CONDA_PREFIX"])
5-
62
import sys
73
import torch
84
import torchvision

0 commit comments

Comments
 (0)