Skip to content

Commit 626b736

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

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/_build_torch_xla_3.11.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ jobs:
4949
cd pytorch/
5050
git clone --recursive https://github.com/tenstorrent/pytorch-xla.git xla
5151
52-
# copy pre-built wheels from cache
53-
python3.11 setup.py bdist_wheel
54-
python3.11 setup.py develop
52+
(
53+
# Build PyTorch
54+
# From https://docs.pytorch.org/FBGEMM/fbgemm/development/BuildInstructions.html, section "Build Issues with GCC 12+"
55+
export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict"
56+
export CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict"
57+
# copy pre-built wheels from cache
58+
python3.11 setup.py bdist_wheel
59+
python3.11 setup.py develop
60+
)
5561
5662
# Build PyTorch/XLA
5763
cd xla/

0 commit comments

Comments
 (0)