Skip to content

[CI] fix OpenBLAS build for non-AArch64 - #188262

Closed
luhenry wants to merge 5 commits into
pytorch:mainfrom
riseproject-dev:build-openblas
Closed

luhenry wants to merge 5 commits into
pytorch:mainfrom
riseproject-dev:build-openblas

Conversation

@luhenry

@luhenry luhenry commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to make install consistently.

TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only
set on aarch64; x86 relies on DYNAMIC_ARCH instead. Also enable the
missing float/double/complex precision variants and pass build flags to
`make install` consistently.
@luhenry
luhenry requested a review from a team as a code owner June 26, 2026 09:32
@pytorch-bot

pytorch-bot Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188262

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 68795d7 with merge base e7206c0 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot

pytorch-bot Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@luhenry

luhenry commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

cc @malfet @huydhn @zxiiro @atalman as you've reviewed changes in this area. Thank you! 🙇‍♂️

zxiiro
zxiiro previously approved these changes Jun 26, 2026
malfet
malfet previously approved these changes Jun 26, 2026

@malfet malfet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title is a bit confusing (and doesn't match the context), as OpenBlas is not at all built on x86 now in CI, and support for float and double is there from the very beginning, but sure, why not

@luhenry

luhenry commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

PR title is a bit confusing (and doesn't match the context), as OpenBlas is not at all built on x86 now in CI, and support for float and double is there from the very beginning, but sure, why not

It is indeed not compiled today for x86 today, so let me update commit message. The change stays valid though as anything else than AArch64 will fail today. That's particularly relevant for RISC-V and any other platform that we want to depend on OpenBLAS until MKL is supported.

@luhenry luhenry changed the title ci: fix OpenBLAS build for x86 and enable more precision types [CI] fix OpenBLAS build for non-AArch64 Jun 26, 2026
@luhenry

luhenry commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 26, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

huydhn
huydhn previously approved these changes Jun 27, 2026
@huydhn

huydhn commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

The Docker build failure from this PR look legit though https://github.com/pytorch/pytorch/actions/runs/28234461752/job/83693524440?pr=188262.

make -j8 NUM_THREADS=256 USE_OPENMP=1 NO_SHARED=0 DYNAMIC_ARCH=1 TARGET=ARMV8 CFLAGS=-O3 FFLAGS=-Wno-maybe-uninitialized BUILD_BFLOAT16=1 BUILD_HFLOAT16=1 BUILD_SINGLE=1 BUILD_DOUBLE=1 BUILD_COMPLEX=1 BUILD_COMPLEX16=1 -C OpenBLAS

took hours to build, then reached the job timeout

@luhenry

luhenry commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

@huydhn thanks for the review! I'll have a look at why it's timing out.

@luhenry

luhenry commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

The hang is due to tests running which are taking longer:

root         349  0.0  0.9 2821188 160264 ?      Ssl  Jun28   1:02 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root      558445  0.3  0.0 2123452 13212 ?       Sl   16:18   0:06  \_ runc --log /var/lib/docker/buildkit/executor/runc-log.json --log-format json run --bundle /var/lib/docker/buildkit/executor/oanah43e9e4g1r05mg6i68v4f --keep oanah43e9e4g1r05mg6i68v4f
root      558460  0.0  0.0   2328  1372 ?        Ss   16:18   0:00      \_ /bin/sh -c if [ -n "${OPENBLAS}" ]; then bash ./install_openblas.sh; fi
root      558478  0.0  0.0   3876  2612 ?        S    16:18   0:00          \_ bash ./install_openblas.sh
root      558518  0.0  0.0   2720  1860 ?        S    16:19   0:00              \_ make -j8 CC=gcc NUM_THREADS=256 USE_OPENMP=1 NO_SHARED=0 DYNAMIC_ARCH=1 TARGET=ARMV8 CFLAGS=-O3 FFLAGS=-Wno-maybe-uninitialized BUILD_BFLOAT16=1 BUILD_HFLOAT16=1 BUILD_SINGLE=1 BUILD_DOUBLE=1 BUILD_COMPLEX=1 BUILD_COMPLEX16=1 -C OpenBLAS
root      638296  0.0  0.0   2856  2092 ?        S    16:38   0:00                  \_ make -C test all
root      638577  0.0  0.0   2328  1388 ?        S    16:39   0:00                      \_ /bin/sh -c OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./test_shgemm > SHBLAT3.SUMM
root      638578 99.9  0.0  80000  2168 ?        R    16:39  13:52                          \_ ./test_shgemm

And the output is blank similarly to on CI:

#76 1180.4 Warning: Unused dummy argument 'bs' at (1) [-Wunused-dummy-argument]
#76 1180.5 zblat3.f:1284:36:
#76 1180.5 
#76 1180.5  1284 |      $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
#76 1180.5       |                                    1
#76 1180.5 Warning: Unused dummy argument 'b' at (1) [-Wunused-dummy-argument]
#76 1180.5 zblat3.f:1284:39:
#76 1180.5 
#76 1180.5  1284 |      $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
#76 1180.5       |                                       1~
#76 1180.5 Warning: Unused dummy argument 'bb' at (1) [-Wunused-dummy-argument]
#76 1180.5 zblat3.f:1284:43:
#76 1180.5 
#76 1180.5  1284 |      $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
#76 1180.5       |                                           1~
#76 1180.5 Warning: Unused dummy argument 'bs' at (1) [-Wunused-dummy-argument]
    

I'm trying to figure out how I can disable these tests for now.

@luhenry

luhenry commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

A lot of failed! Unable to locate credentials. Would you know what it's about?

@zxiiro

zxiiro commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

A lot of failed! Unable to locate credentials. Would you know what it's about?

That's the end of the job uploading metrics to HUD I believe. Since its unrelated to your change I think we should be able to ignore it to merge.

@luhenry

luhenry commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@zxiiro it failed in most aarch64 jobs. Given the changes mostly impact aarch64, I would be a lot more confident if we can re-run CI to check if it was intermittent failure or somehow related to this change. If it fails again, I will try to reproduce locally.

@huydhn

huydhn commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

A lot of failed! Unable to locate credentials. Would you know what it's about?

This means that a fork PR can't write anything back as it doesn't have the permission. However, this is not a failure, but a warning on the upload script. The tests failed earlier, and you can refer to Dr.CI output to where they are #188262 (comment)

@zxiiro

zxiiro commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @huydhn for confirming. Considering the failures are expected with PRs from forked repos let's try merge again.

@pytorchbot merge -i

@liangel-02
liangel-02 requested review from huydhn, malfet and zxiiro June 30, 2026 22:27
@liangel-02 liangel-02 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 30, 2026
@luhenry

luhenry commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Let me revert BUILD_HFLOAT16=1 to BUILD_HFLOAT16=0 so that we don't build the float16 kernels when it wasn't built before.

@luhenry

luhenry commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@zxiiro the issue should be fixed (I could verify locally). Could you please trigger CI again? It seems to have been stuck on downloading the docker image.

@zxiiro

zxiiro commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@luhenry I retriggered the 2 failing jobs.

@luhenry

luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Looking at the latest failure at https://github.com/pytorch/pytorch/actions/runs/28480615979/job/86000352914?pr=188262#step:2:4:

I'll merge latest upstream/main to trigger a fresh workflow

luhenry added a commit to riseproject-dev/pytorch that referenced this pull request Jul 9, 2026
luhenry added a commit to riseproject-dev/pytorch that referenced this pull request Jul 9, 2026
@luhenry

luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

All the aarch64 jobs are passing:

@luhenry

luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

ValerianRey pushed a commit to ValerianRey/pytorch that referenced this pull request Jul 10, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/Skylion007
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/zxiiro, https://github.com/malfet, https://github.com/huydhn
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
This reverts commit 0ab6f77.

Reverted pytorch#188262 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#188262 (comment)))
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/Skylion007
DamJanusz pushed a commit to DamJanusz/pytorch that referenced this pull request Jul 21, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/Skylion007
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/Skylion007
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/zxiiro, https://github.com/malfet, https://github.com/huydhn
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
This reverts commit 0ab6f77.

Reverted pytorch#188262 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#188262 (comment)))
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
TARGET=ARMV8 was hardcoded, breaking non-aarch64 builds. Now it's only set on aarch64; other platforms (like riscv64) rely on DYNAMIC_ARCH instead. Also forcibly enable the float/double/complex precision variants and pass build flags to `make install` consistently.
Pull Request resolved: pytorch#188262
Approved by: https://github.com/Skylion007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/docker ciflow/trunk Trigger trunk jobs on your pull request Merged open source Reverted topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants