@@ -104,17 +104,24 @@ on:
104
104
required : false
105
105
default : false
106
106
type : boolean
107
+ permissions :
108
+ id-token : write
109
+ contents : read
110
+
107
111
jobs :
108
112
job :
109
113
strategy :
110
114
fail-fast : false
111
115
name : ${{ inputs.job-name }}
112
116
env :
113
117
DOCKER_IMAGE : >-
114
- ${{ inputs.docker-image == 'pytorch/almalinux-builder' && format('pytorch/almalinux-builder:{0}{1}',
118
+ ${{ inputs.gpu-arch-type == 'rocm' && format('pytorch/manylinux2_28-builder:{0}{1}',
119
+ inputs.gpu-arch-type,
120
+ inputs.gpu-arch-version)
121
+ || inputs.docker-image == 'pytorch/almalinux-builder' && format('pytorch/almalinux-builder:{0}{1}',
115
122
inputs.gpu-arch-type,
116
123
inputs.gpu-arch-version)
117
- || inputs.docker-image }}
124
+ || inputs.docker-image }}
118
125
REPOSITORY : ${{ inputs.repository || github.repository }}
119
126
# Will be blank outside of this
120
127
PR_NUMBER : ${{ github.event.pull_request.number }}
@@ -157,6 +164,11 @@ jobs:
157
164
158
165
- name : Setup Linux
159
166
uses : ./test-infra/.github/actions/setup-linux
167
+ if : ${{ inputs.gpu-arch-type != 'rocm' }}
168
+
169
+ - name : Setup ROCM
170
+ uses : pytorch/pytorch/.github/actions/setup-rocm@main
171
+ if : ${{ inputs.gpu-arch-type == 'rocm' }}
160
172
161
173
- name : Setup SSH
162
174
uses : ./test-infra/.github/actions/setup-ssh
@@ -266,15 +278,30 @@ jobs:
266
278
path : ${{ env.RUNNER_TEST_RESULTS_DIR }}
267
279
fail-on-empty : false
268
280
281
+ - name : configure aws credentials
282
+ id : aws_creds
283
+ if : ${{ inputs.gpu-arch-type == 'rocm' }}
284
+ uses : aws-actions/configure-aws-credentials@v4
285
+ with :
286
+ role-to-assume : arn:aws:iam::308535385114:role/gha_workflow_s3_and_ecr_read_only
287
+ aws-region : us-east-1
288
+ role-duration-seconds : 18000
289
+
290
+ - name : Login to Amazon ECR
291
+ id : login-ecr
292
+ if : ${{ inputs.gpu-arch-type == 'rocm' }}
293
+ continue-on-error : true
294
+ uses : aws-actions/amazon-ecr-login@v2
295
+
269
296
- name : Chown repository directory
270
- if : always()
297
+ if : ${{ inputs.gpu-arch-type != 'rocm' }}
271
298
uses : ./test-infra/.github/actions/chown-directory
272
299
with :
273
300
directory : ${{ github.workspace }}/${{ env.repository }}
274
301
ALPINE_IMAGE : ${{ startsWith(inputs.runner, 'linux.arm64') && 'arm64v8/alpine' || '308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine' }}
275
302
276
303
- name : Chown runner temp
277
- if : always()
304
+ if : ${{ inputs.gpu-arch-type != 'rocm' }}
278
305
uses : ./test-infra/.github/actions/chown-directory
279
306
with :
280
307
directory : ${{ runner.temp }}
0 commit comments