File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,33 @@ permissions:
2525 contents : read
2626
2727jobs :
28+ # checks if job should run for ROCm
29+ check-run-job :
30+ matrix :
31+ include :
32+ - name : cuda
33+ runner : linux.g5.48xlarge.nvidia.gpu
34+ gpu-arch-type : cuda
35+ - name : rocm
36+ runner : linux.rocm.gpu.gfx942.8
37+ gpu-arch-type : rocm
38+ outputs :
39+ run_job : ${{ steps.set-flag.outputs.run_job }}
40+ steps :
41+ - name : Decide if job should run for rocm
42+ run : |
43+ if [[ "${{ matrix.gpu-arch-type }}" == "cuda" ]]; then
44+ echo "run_job=1" >> $GITHUB_OUTPUT
45+ elif [[ "${{ matrix.gpu-arch-type }}" == "rocm" && "${{ github.event_name }}" == "schedule" ]]; then
46+ echo "run_job=1" >> $GITHUB_OUTPUT
47+ else
48+ echo "run_job=0" >> $GITHUB_OUTPUT
49+ fi
50+
51+ # runs the test
2852 build-test :
53+ needs : check-run-job
54+ if : ${{ needs.check-runner.outputs.run_job == '1' }}
2955 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3056 strategy :
3157 fail-fast : false
You can’t perform that action at this time.
0 commit comments