Skip to content

Commit 27f7792

Browse files
committed
Torch build option change
Torch build option change to avoid build warning and error.
1 parent 86bac8b commit 27f7792

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/_build_torch_xla_3.11.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
artifact_name: ${{ steps.set_upload_name.outputs.artifact_name }}
2626
steps:
2727
- name: "Build Torch/XLA wheel"
28+
shell: bash
2829
id: build_wheels
2930
run: |
3031
cmake --version
@@ -49,9 +50,15 @@ jobs:
4950
cd pytorch/
5051
git clone --recursive https://github.com/tenstorrent/pytorch-xla.git xla
5152
52-
# copy pre-built wheels from cache
53-
python3.11 setup.py bdist_wheel
54-
python3.11 setup.py develop
53+
(
54+
# Build PyTorch
55+
# From https://docs.pytorch.org/FBGEMM/fbgemm/development/BuildInstructions.html, section "Build Issues with GCC 12+"
56+
export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict"
57+
export CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict"
58+
# copy pre-built wheels from cache
59+
python3.11 setup.py bdist_wheel
60+
python3.11 setup.py develop
61+
)
5562
5663
# Build PyTorch/XLA
5764
cd xla/

0 commit comments

Comments
 (0)