Skip to content

Commit 6b65580

Browse files
amdfaapytorchmergebot
authored andcommitted
Getting matrix #1
1 parent 069bb3f commit 6b65580

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ runs:
6767
echo "$msg"
6868
exit 1
6969
fi
70-
test_matrix="${{ inputs.test-matrix }}"
71-
tests=${test-matrix.include[i]["config"]}
72-
for (( i = 0; i < ${#tests}; i++ ))
73-
do
74-
if [[ ${ ${tests} != "default" ]]; then
70+
configs=$(echo "$test_matrix" | jq -c '.include[]')
71+
echo "$configs" | while IFS= read -r config; do
72+
test=$(echo "$config" | jq -r '.config')
73+
if [[ "${test}"" != "default" ]]; then
7574
if [[ $ngpu -eq 1 ]]; then
7675
echo "Error: only 1 GPU detected, at least 2 GPUs are needed for distributed jobs"
7776
echo "$msg"
@@ -80,8 +79,7 @@ runs:
8079
fi
8180
done
8281
env:
83-
test-matrix:
84-
82+
test_matrix: ${{ inputs.test-matrix }}
8583
- name: Runner diskspace health check
8684
uses: ./.github/actions/diskspace-cleanup
8785
if: always()

0 commit comments

Comments
 (0)