CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Fix for gcc10 torch.compile compiler error when march=aarch64+sve #137795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137795
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5628514 with merge base 9aaf3a0 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
I disagree that this is a not user facing change, it should be properly marked as bugfix |
Please seek CI approval before scheduling CIFlow labels |
I've converted this to draft to prevent it from being merged. Whilst this fixed the problem empirically, I think a safer fix is to disable gcc's tree-vectorizor and tree-loop-vectorizer in older versions of gcc for sve supported platforms. |
0316e7e
to
f3dc20c
Compare
I've changed the fix to disable tree-vectorize optimizations accross the whole of vec_base.h for gcc versions from 10.0 up to 10.2 where the compiler error is known to occur. I have propsed to target a specific version of gcc for this because when I made some quick performance comparisons there with GCC 11 with and without the optimizations for SVE there was a significant performance hit on inductor micro benchmarks. |
I agree, optimizations for SVE is critical to get performance boost. Summary of Key Developments w.r.t GCC for SVE: Summary of GCC versions in the stable Ubuntu releases: Most of the Linux CI pipelines in PyTorch comes with Ubuntu 22.04 OS which has GCC 11.2 as default compiler and now we plan to move PyTorch CI to use GCC 12. I feel, starting from GCC 11, the SVE path of the compiler is more stable. "I would suggest we should disable SVE build if the GCC compiler version is <11 (GCC < 11). This would avoid the bugs that we encounter mostly with gcc 10." Since GCC is already at 13.x, I think we will still be supporting good range of GCC compiler versions for SVE. |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
f3dc20c
to
c673ab0
Compare
@pytorchbot merge -r |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
@pytorchbot merge -r |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
…mv8-a+sve on specific old versions of gcc
Successfully rebased |
c673ab0
to
5628514
Compare
Merge startedYour 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 |
…torch#137795) Disable tree vectorize in vec_convert.h for gcc10 and aarch64+sve which causes compiler error to occur. ``` /tmp/tmpuqk7lj9j/zx/czx2eyturb6j6m727xhvknkjbdu3y5nqqk66wgxcjkwnxuzvpm5r.cpp:3:18: internal compiler error: in vect_get_vector_types_for_stmt, at tree-vect-stmts.c:12252 3 | extern "C" void kernel(const float* in_ptr0, ``` Fixes pytorch#137775 I've not linked a gcc bug report yet as they require a minimal reproducer to be made. Pull Request resolved: pytorch#137795 Approved by: https://github.com/malfet
Summary: autovec miscompiles on patterns of the type: ```cpp for (const auto i : c10::irange()) ``` Same issue as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117001 and addressed by #137795 for gcc, but not clang Test Plan: buck2 build //caffe2/caffe2/fb/transforms:sigrid_interface Differential Revision: D70422723 Pull Request resolved: #148489 Approved by: https://github.com/malfet
Disable tree vectorize in vec_convert.h for gcc10 and aarch64+sve which causes compiler error to occur.
Fixes #137775
I've not linked a gcc bug report yet as they require a minimal reproducer to be made.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10