Skip to content

Commit a72aaea

Browse files
finilizing changes
1 parent 91f75f3 commit a72aaea

File tree

4 files changed

+36
-47
lines changed

4 files changed

+36
-47
lines changed

.github/scripts/ppc64le-build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ fi
1818

1919
cd ..
2020
pip install pytest pytest-xdist
21-
if ! pytest -n $(nproc) -vvvv $PACKAGE_NAME/test/common_extended_utils.py $PACKAGE_NAME/test/common_utils.py $PACKAGE_NAME/test/smoke_test.py $PACKAGE_NAME/test/test_architecture_ops.py $PACKAGE_NAME/test/test_datasets_video_utils_opt.py $PACKAGE_NAME/test/test_tv_tensors.py; then
22-
echo "------------------$PACKAGE_NAME:install_success_but_test_fails ###---------------------"
23-
exit 0
24-
fi
21+
2522
echo "-----start test
2623
if ! pytest -Xrs test; then
2724
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"

.github/workflows/Dockerfile.ppc64le

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,4 @@ RUN chmod +x /ppc64le-build.sh
3939
RUN dos2unix /ppc64le-build.sh || sed -i 's/\r$//' /ppc64le-build.sh
4040
RUN chmod +x /ppc64le-build.sh
4141

42-
RUN git config --global --add safe.directory /workspace/pytorch
43-
# Use CMD to run the script
44-
#CMD ["/ppc64le-build.sh"]
42+

.github/workflows/_linux-build.yml

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118

119119
- name: Setup SSH (Click me for login details)
120120
uses: pytorch/test-infra/.github/actions/setup-ssh@main
121-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
121+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
122122
with:
123123
github-secret: ${{ secrets.GITHUB_TOKEN }}
124124

@@ -129,15 +129,15 @@ jobs:
129129
- name: Checkout PyTorch
130130
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
131131
with:
132-
no-sudo: ${{ inputs.build-environment == 'linux-s390x-binary-manywheel' || inputs.build-environment == 'linux-ppc64le-binary-manywheel' }}
132+
no-sudo: ${{ inputs.build-environment == 'linux-s390x-binary-manywheel' }}
133133

134134
- name: Setup Linux
135135
uses: ./.github/actions/setup-linux
136-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
136+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
137137

138138
- name: configure aws credentials
139139
uses: aws-actions/configure-aws-credentials@v3
140-
if: ${{ inputs.aws-role-to-assume != '' && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel' }}
140+
if: ${{ inputs.aws-role-to-assume != '' && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9' }}
141141
with:
142142
role-to-assume: ${{ inputs.aws-role-to-assume }}
143143
role-session-name: gha-linux-build
@@ -146,13 +146,13 @@ jobs:
146146
- name: Calculate docker image
147147
id: calculate-docker-image
148148
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
149-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
149+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
150150
with:
151151
docker-image-name: ${{ inputs.docker-image-name }}
152152

153153
- name: Use following to pull public copy of the image
154154
id: print-ghcr-mirror
155-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
155+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
156156
env:
157157
ECR_DOCKER_IMAGE: ${{ steps.calculate-docker-image.outputs.docker-image }}
158158
shell: bash
@@ -162,24 +162,26 @@ jobs:
162162
163163
- name: Pull docker image
164164
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
165-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
165+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
166166
with:
167167
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}
168168

169169
- name: Parse ref
170170
id: parse-ref
171+
if: inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
171172
run: .github/scripts/parse_ref.py
172173

173174
- name: Get workflow job id
174175
id: get-job-id
175176
uses: ./.github/actions/get-workflow-job-id
176-
if: always()
177+
if: always() && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
177178
with:
178179
github-token: ${{ secrets.GITHUB_TOKEN }}
179180

180181
# Apply the filter logic to the build step too if the test-config label is already there
181182
- name: Select all requested test configurations (if the test matrix is available)
182183
id: filter
184+
if: inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
183185
uses: ./.github/actions/filter-test-configs
184186
with:
185187
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -190,26 +192,13 @@ jobs:
190192
- name: Download pytest cache
191193
uses: ./.github/actions/pytest-cache-download
192194
continue-on-error: true
193-
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
195+
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
194196
with:
195197
cache_dir: .pytest_cache
196198
job_identifier: ${{ github.workflow }}_${{ inputs.build-environment }}
197199
s3_bucket: ${{ inputs.s3-bucket }}
198-
199-
200-
201-
- name: Run Docker container and execute build script
202-
if: inputs.build-environment == 'linux-ppc64le-binary-manywheel'
203-
run: |
204-
docker run -d --name temp_builder pytorch-ppc64le:ubi9.3 /ppc64le-build.sh
205-
docker wait temp_builder
206-
docker logs temp_builder
207-
docker cp temp_builder:/workspace/pytorch/dist/. dist/
208-
docker rm temp_builder
209-
210-
211200
- name: Build
212-
if: (steps.filter.outputs.is-test-matrix-empty == 'False' || inputs.test-matrix == '' ) && (inputs.build-environment != 'linux-ppc64le-binary-manywheel')
201+
if: (steps.filter.outputs.is-test-matrix-empty == 'False' || inputs.test-matrix == '' ) && (inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9')
213202
id: build
214203
env:
215204
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
@@ -282,14 +271,24 @@ jobs:
282271
)
283272
docker exec -t "${container_name}" sh -c '.ci/pytorch/build.sh'
284273
274+
- name: Run Docker container and execute build script
275+
if: inputs.build-environment == 'linux-ppc64le-binary-manywheel-ubi9'
276+
run: |
277+
CONTAINER_NAME="temp_builder_${RUN_ID}"
278+
docker run -d --name "$CONTAINER_NAME" pytorch-ppc64le:ubi9.3 /ppc64le-build.sh
279+
docker wait "$CONTAINER_NAME"
280+
docker logs "$CONTAINER_NAME"
281+
docker cp "$CONTAINER_NAME":/workspace/pytorch/dist/. dist/
282+
docker rm "$CONTAINER_NAME"
283+
285284
- name: Archive artifacts into zip
286285
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped'
287286
run: |
288287
zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .additional_ci_files
289288
290289
- name: Store PyTorch Build Artifacts on S3
291290
uses: seemethere/upload-artifact-s3@v5
292-
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && !inputs.use_split_build && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
291+
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && !inputs.use_split_build && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
293292
with:
294293
name: ${{ inputs.build-environment }}
295294
retention-days: 14
@@ -309,7 +308,7 @@ jobs:
309308

310309
- name: Store PyTorch Build Artifacts for s390x
311310
uses: actions/upload-artifact@v4
312-
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && !inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
311+
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && !inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
313312
with:
314313
name: ${{ inputs.build-environment }}
315314
retention-days: 14
@@ -318,30 +317,26 @@ jobs:
318317

319318
- name: Store PyTorch Build Artifacts for s390x for split build
320319
uses: actions/upload-artifact@v4
321-
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
320+
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
322321
with:
323322
name: ${{ inputs.build-environment }}-experimental-split-build
324323
retention-days: 14
325324
if-no-files-found: error
326325
path: artifacts.zip
327326

328-
- name: Archive ppc64le artifacts into zip
329-
if: inputs.build-environment == 'linux-ppc64le-binary-manywheel'
330-
run: |
331-
zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .additional_ci_files
332-
327+
333328

334329
- name: Store PyTorch Build Artifacts for ppc64le
335330
uses: actions/upload-artifact@v4
336-
if: inputs.build-environment == 'linux-ppc64le-binary-manywheel'
331+
if: inputs.build-environment == 'linux-ppc64le-binary-manywheel-ubi9'
337332
with:
338-
name: ${{ inputs.build-environment }}
333+
name: ${{ inputs.build-environment }}-ubi9
339334
retention-days: 14
340335
if-no-files-found: error
341336
path: artifacts.zip
342337

343338
- name: Upload sccache stats
344-
if: steps.build.outcome != 'skipped' && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
339+
if: steps.build.outcome != 'skipped' && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
345340
uses: seemethere/upload-artifact-s3@v5
346341
with:
347342
s3-prefix: |
@@ -353,10 +348,10 @@ jobs:
353348

354349
- name: Teardown Linux
355350
uses: pytorch/test-infra/.github/actions/teardown-linux@main
356-
if: always() && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'
351+
if: always() && inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel-ubi9'
357352

358353
- name: Cleanup docker
359-
if: always() && inputs.build-environment == 'linux-s390x-binary-manywheel' && inputs.build-environment == 'linux-ppc64le-binary-manywheel'
354+
if: always() && (inputs.build-environment == 'linux-s390x-binary-manywheel' || inputs.build-environment == 'linux-ppc64le-binary-manywheel-ubi9')
360355
shell: bash
361356
run: |
362357
# on s390x stop the container for clean worker stop

.github/workflows/ppc64le.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ jobs:
2424
submodules: true
2525
- name: Set up Docker Buildx
2626
uses: docker/setup-buildx-action@v2
27-
2827
- name: Build Docker image for ppc64le
2928
run: |
3029
docker build -f .github/workflows/Dockerfile.ppc64le -t pytorch-ppc64le:ubi9.3 .
3130
32-
3331
linux-ubi-9-3-cpu-ppc64le-build:
3432

3533
name: linux-ubi9-3-cpu-ppc64le
3634
uses: ./.github/workflows/_linux-build.yml
3735
needs: linux-ppc64le-docker-image-build
3836
with:
39-
build-environment: linux-ppc64le-binary-manywheel
37+
build-environment: linux-ppc64le-binary-manywheel-ubi9
4038
docker-image-name: pytorch-ppc64le:ubi9.3
41-
runner: linux.ppc64le # Example runner
39+
build-generates-artifacts: true
40+
runner: linux.ppc64le
4241

0 commit comments

Comments
 (0)