Skip to content

Commit 0fc62aa

Browse files
authored
update gcc (#9650)
1 parent 0c0ae2d commit 0fc62aa

File tree

9 files changed

+496
-479
lines changed

9 files changed

+496
-479
lines changed
Lines changed: 76 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,79 @@
11
name: build-torch-xla
22
on:
3-
workflow_call:
4-
inputs:
5-
dev-image:
6-
required: true
7-
type: string
8-
description: Base image for builds
9-
torch-commit:
10-
required: true
11-
type: string
12-
description: torch-commit
13-
runner:
14-
required: false
15-
type: string
16-
description: Runner type for the test
17-
default: linux.12xlarge
18-
timeout-minutes:
19-
required: false
20-
type: number
21-
description: Timeout in minutes for the build job
22-
default: 45 # Takes ~20m as of 2025/5/30.
23-
has_code_changes:
24-
required: false
25-
type: string
26-
description: Whether to run full workflow or not
27-
default: 'true'
28-
secrets:
29-
gcloud-service-key:
30-
required: true
31-
description: Secret to access Bazel build cache
3+
workflow_call:
4+
inputs:
5+
dev-image:
6+
required: true
7+
type: string
8+
description: Base image for builds
9+
torch-commit:
10+
required: true
11+
type: string
12+
description: torch-commit
13+
runner:
14+
required: false
15+
type: string
16+
description: Runner type for the test
17+
default: linux.12xlarge
18+
timeout-minutes:
19+
required: false
20+
type: number
21+
description: Timeout in minutes for the build job
22+
default: 45 # Takes ~20m as of 2025/5/30.
23+
has_code_changes:
24+
required: false
25+
type: string
26+
description: Whether to run full workflow or not
27+
default: "true"
28+
secrets:
29+
gcloud-service-key:
30+
required: true
31+
description: Secret to access Bazel build cache
3232
jobs:
33-
build:
34-
runs-on: ${{ inputs.runner }}
35-
timeout-minutes: ${{ inputs.timeout-minutes }}
36-
container:
37-
image: ${{ inputs.dev-image }}
38-
env:
39-
GCLOUD_SERVICE_KEY: ${{ secrets.gcloud-service-key }}
40-
BAZEL_REMOTE_CACHE: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
41-
BAZEL_JOBS: '' # Let bazel decide the parallelism based on the number of CPUs.
42-
BUILD_CPP_TESTS: 1
43-
steps:
44-
# Need to check out local composite actions before using them
45-
# https://github.com/orgs/community/discussions/11771
46-
- name: Checkout actions
47-
if: inputs.has_code_changes == 'true'
48-
uses: actions/checkout@v4
49-
with:
50-
sparse-checkout: |
51-
.github/workflows/setup
52-
path: .actions
53-
- name: Setup
54-
if: inputs.has_code_changes == 'true'
55-
uses: ./.actions/.github/workflows/setup
56-
with:
57-
torch-commit: ${{ inputs.torch-commit }}
58-
- name: Build
59-
if: inputs.has_code_changes == 'true'
60-
shell: bash
61-
run: |
62-
cd pytorch/xla/infra/ansible
63-
ansible-playbook playbook.yaml -vvv -e "stage=build arch=amd64 accelerator=tpu src_root=${GITHUB_WORKSPACE} bundle_libtpu=0 build_cpp_tests=1 git_versioned_xla_build=1 cache_suffix=-ci" --skip-tags=fetch_srcs,install_deps
64-
- name: Upload wheel
65-
if: inputs.has_code_changes == 'true'
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: torch-xla-wheels
69-
path: /dist/*.whl
70-
- name: Upload CPP test binaries
71-
if: inputs.has_code_changes == 'true'
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: cpp-test-bin
75-
path: /tmp/test/bin
76-
- name: Report no code changes
77-
if: inputs.has_code_changes == 'false'
78-
run: |
79-
echo "No code changes were detected that require running the full test suite."
80-
33+
build:
34+
runs-on: ${{ inputs.runner }}
35+
timeout-minutes: ${{ inputs.timeout-minutes }}
36+
container:
37+
image: ${{ inputs.dev-image }}
38+
env:
39+
GCLOUD_SERVICE_KEY: ${{ secrets.gcloud-service-key }}
40+
BAZEL_REMOTE_CACHE: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
41+
BAZEL_JOBS: "" # Let bazel decide the parallelism based on the number of CPUs.
42+
BUILD_CPP_TESTS: 1
43+
steps:
44+
# Need to check out local composite actions before using them
45+
# https://github.com/orgs/community/discussions/11771
46+
- name: Checkout actions
47+
if: inputs.has_code_changes == 'true'
48+
uses: actions/checkout@v4
49+
with:
50+
sparse-checkout: |
51+
.github/workflows/setup
52+
path: .actions
53+
- name: Setup
54+
if: inputs.has_code_changes == 'true'
55+
uses: ./.actions/.github/workflows/setup
56+
with:
57+
torch-commit: ${{ inputs.torch-commit }}
58+
- name: Build
59+
if: inputs.has_code_changes == 'true'
60+
shell: bash
61+
run: |
62+
cd pytorch/xla/infra/ansible
63+
ansible-playbook playbook.yaml -vvv -e "stage=build arch=amd64 accelerator=tpu src_root=${GITHUB_WORKSPACE} bundle_libtpu=0 build_cpp_tests=1 git_versioned_xla_build=1 cache_suffix=-ci" --skip-tags=fetch_srcs,install_deps
64+
- name: Upload wheel
65+
if: inputs.has_code_changes == 'true'
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: torch-xla-wheels
69+
path: /dist/*.whl
70+
- name: Upload CPP test binaries
71+
if: inputs.has_code_changes == 'true'
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: cpp-test-bin
75+
path: /tmp/test/bin
76+
- name: Report no code changes
77+
if: inputs.has_code_changes == 'false'
78+
run: |
79+
echo "No code changes were detected that require running the full test suite."

.github/workflows/_docs.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
name: xla-docs-build
22
on:
3-
workflow_call:
4-
inputs:
5-
dev-image:
6-
required: true
7-
type: string
8-
description: Base image for builds
9-
runner:
10-
required: false
11-
type: string
12-
description: Runner type for the test
13-
default: linux.4xlarge
14-
secrets:
15-
torchxla-bot-token:
16-
required: true
3+
workflow_call:
4+
inputs:
5+
dev-image:
6+
required: true
7+
type: string
8+
description: Base image for builds
9+
runner:
10+
required: false
11+
type: string
12+
description: Runner type for the test
13+
default: linux.4xlarge
14+
secrets:
15+
torchxla-bot-token:
16+
required: true
1717
jobs:
18-
build-docs:
19-
runs-on: ubuntu-24.04
20-
timeout-minutes: 45
21-
container:
22-
image: ${{ inputs.dev-image }}
23-
env:
24-
BRANCH_NAME: ${{ github.ref_name }}
25-
steps:
26-
- name: Fetch wheels
27-
uses: actions/download-artifact@v4
28-
with:
29-
name: torch-xla-wheels
30-
path: /tmp/wheels/
31-
- name: Install wheels
32-
shell: bash
33-
run: |
34-
pip install /tmp/wheels/*.whl
35-
- name: Checkout PyTorch/XLA Repo
36-
uses: actions/checkout@v4
37-
with:
38-
path: pytorch/xla
39-
- name: Build docs
40-
shell: bash
41-
run: |
42-
cd pytorch/xla/docs
43-
pip install -r requirements.txt
44-
sphinx-build -b html source build
45-
- name: Checkout GitHub Pages
46-
uses: actions/checkout@v4
47-
with:
48-
path: gh-pages
49-
ref: gh-pages
50-
token: ${{ github.event_name == 'push' && secrets.torchxla-bot-token || github.token }}
51-
- name: Merge changes
52-
shell: bash
53-
run: |
54-
subdir=${{ env.BRANCH_NAME == 'master' && 'master' || format('{0}/{1}', 'release', env.BRANCH_NAME) }}
55-
mkdir -p gh-pages/$subdir
56-
cp -fR pytorch/xla/docs/build/* gh-pages/$subdir
57-
- name: Upload preview as artifact
58-
uses: actions/upload-artifact@v4
59-
with:
60-
name: github-pages
61-
path: pytorch/xla/docs/build/
62-
- name: Deploy
63-
shell: bash
64-
run: |
65-
cd gh-pages
66-
git config user.email "[email protected]"
67-
git config user.name "torchxlabot2"
68-
git add . -v
69-
git diff --cached --exit-code || git commit -m "Update doc from commit ${{ github.sha }}"
70-
git push origin gh-pages
18+
build-docs:
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 45
21+
container:
22+
image: ${{ inputs.dev-image }}
23+
env:
24+
BRANCH_NAME: ${{ github.ref_name }}
25+
steps:
26+
- name: Fetch wheels
27+
uses: actions/download-artifact@v5
28+
with:
29+
name: torch-xla-wheels
30+
path: /tmp/wheels/
31+
- name: Install wheels
32+
shell: bash
33+
run: |
34+
pip install /tmp/wheels/*.whl
35+
- name: Checkout PyTorch/XLA Repo
36+
uses: actions/checkout@v4
37+
with:
38+
path: pytorch/xla
39+
- name: Build docs
40+
shell: bash
41+
run: |
42+
cd pytorch/xla/docs
43+
pip install -r requirements.txt
44+
sphinx-build -b html source build
45+
- name: Checkout GitHub Pages
46+
uses: actions/checkout@v4
47+
with:
48+
path: gh-pages
49+
ref: gh-pages
50+
token: ${{ github.event_name == 'push' && secrets.torchxla-bot-token || github.token }}
51+
- name: Merge changes
52+
shell: bash
53+
run: |
54+
subdir=${{ env.BRANCH_NAME == 'master' && 'master' || format('{0}/{1}', 'release', env.BRANCH_NAME) }}
55+
mkdir -p gh-pages/$subdir
56+
cp -fR pytorch/xla/docs/build/* gh-pages/$subdir
57+
- name: Upload preview as artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: github-pages
61+
path: pytorch/xla/docs/build/
62+
- name: Deploy
63+
shell: bash
64+
run: |
65+
cd gh-pages
66+
git config user.email "[email protected]"
67+
git config user.name "torchxlabot2"
68+
git add . -v
69+
git diff --cached --exit-code || git commit -m "Update doc from commit ${{ github.sha }}"
70+
git push origin gh-pages

0 commit comments

Comments
 (0)