Skip to content

Commit 0c1fcb5

Browse files
authored
Allow Nova Linux job read access to RUNNER envvars (#7413)
Same as pytorch/pytorch#165821, but for non-ROCm jobs. There are some `test_linux_jobs` that are obsoleted, and don't work anymore. I can clean them up in another PR. We are all on `linux_job_v2` now. I also need to update the test workflow to get rid of `3.9` and `cu121`. --------- Signed-off-by: Huy Do <[email protected]>
1 parent 288e95d commit 0c1fcb5

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

.github/actions/setup-linux/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ runs:
5252
run: |
5353
env | grep '^GITHUB' >> "${RUNNER_TEMP}/github_env_${GITHUB_RUN_ID}"
5454
env | grep '^CI' >> "${RUNNER_TEMP}/github_env_${GITHUB_RUN_ID}"
55+
env | grep '^RUNNER' >> "${RUNNER_TEMP}/github_env_${GITHUB_RUN_ID}"
5556
5657
- name: Setup useful environment variables
5758
shell: bash

.github/workflows/test_linux_job.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,6 @@ jobs:
3535
gpu-arch-version: ""
3636
script: |
3737
[[ "${SECRET_NOT_A_SECRET_USED_FOR_TESTING}" == "SECRET_VALUE" ]] || exit 1
38-
test-cpu:
39-
uses: ./.github/workflows/linux_job.yml
40-
with:
41-
job-name: "linux-py3.9-cpu"
42-
runner: linux.2xlarge
43-
test-infra-repository: ${{ github.repository }}
44-
test-infra-ref: ${{ github.ref }}
45-
submodules: "recursive"
46-
gpu-arch-type: cpu
47-
gpu-arch-version: ""
48-
script: |
49-
conda create --yes --quiet -n test python=3.9
50-
conda activate test
51-
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
52-
# Can import pytorch
53-
python3 -c 'import torch'
5438
test-gpu:
5539
uses: ./.github/workflows/linux_job.yml
5640
strategy:

.github/workflows/test_linux_job_v2.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
permissions:
1616
id-token: write
1717
with:
18-
job-name: "linux-py3.9-cpu"
18+
job-name: "linux-py3.10-cpu"
1919
runner: linux.2xlarge
2020
test-infra-repository: ${{ github.repository }}
2121
test-infra-ref: ${{ github.ref }}
2222
submodules: "recursive"
2323
gpu-arch-type: cpu
2424
gpu-arch-version: ""
2525
script: |
26-
conda create --yes --quiet -n test python=3.9
26+
conda create --yes --quiet -n test python=3.10
2727
conda activate test
2828
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
2929
# Can import pytorch
@@ -34,26 +34,26 @@ jobs:
3434
id-token: write
3535
strategy:
3636
matrix:
37-
runner_type: ["linux.4xlarge.nvidia.gpu", "linux.g5.4xlarge.nvidia.gpu"]
37+
runner_type: ["linux.g5.4xlarge.nvidia.gpu"]
3838
with:
39-
job-name: "linux-py3.9-cu121"
39+
job-name: "linux-py3.10-cu128"
4040
runner: ${{ matrix.runner_type }}
4141
test-infra-repository: ${{ github.repository }}
4242
test-infra-ref: ${{ github.ref }}
4343
submodules: ${{ 'true' }}
4444
gpu-arch-type: cuda
45-
gpu-arch-version: "12.1"
45+
gpu-arch-version: "12.8"
4646
timeout: 60
4747
script: |
4848
nvidia-smi
49-
nvcc --version | grep "cuda_12.1"
50-
conda create --yes --quiet -n test python=3.9
49+
nvcc --version | grep "cuda_12.8"
50+
conda create --yes --quiet -n test python=3.10
5151
conda activate test
52-
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cu121 --pre torch
52+
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cu128 --pre torch
5353
# Can import pytorch, cuda is available
5454
python3 -c 'import torch;cuda_avail = torch.cuda.is_available();print("CUDA available: " + str(cuda_avail));assert(cuda_avail)'
5555
python3 -c 'import torch;t = torch.ones([2,2], device="cuda:0");print(t);print("tensor device:" + str(t.device))'
56-
python3 -c 'import torch;assert(torch.version.cuda == "12.1")'
56+
python3 -c 'import torch;assert(torch.version.cuda == "12.8")'
5757
test-gpu-containers:
5858
uses: ./.github/workflows/linux_job_v2.yml
5959
permissions:
@@ -179,7 +179,7 @@ jobs:
179179
id-token: write
180180
strategy:
181181
matrix:
182-
python_version: ["3.9", "3.10", "3.11", "3.12"]
182+
python_version: ["3.10", "3.11", "3.12", "3.13"]
183183
with:
184184
runner: linux.2xlarge
185185
test-infra-repository: ${{ github.repository }}

0 commit comments

Comments
 (0)