-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Build] Build incorrectly assumes that AVX-VNNI is a core part of AVX2 #24432
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
Comments
@microsoft/onnxruntime-mlas could you please help to take a look? |
It basically means enable both AVX2 and AVX-VNNI in compiling when GCC > 11. The code does check that whether CPU supports VNNI, so VNNI kernel will not be launched in un-supported CPU: onnxruntime/onnxruntime/core/mlas/lib/platform.cpp Lines 426 to 433 in c18e06d
@stephenswat, Could you describe the detail build error or runtime error you encountered? |
@tianleiwu I observed this build error. On current
I get this:
Full build log is here: https://termbin.com/st5bw Seems to me like the assembler on AMD fails to compile these instructions. |
From the build log:
So Could you try upgrade GCC to 12 (our build pipeline use 12.x) or 13 (In my machine, GCC 13.2 has no such issue)? |
@tianleiwu It seems to be working for me on GCC13, although I can't say I understand where the differences comes from. |
Describe the issue
PR #20687 introduced the AVXVNNI instruction set extension as a core AVX2 feature:
onnxruntime/cmake/onnxruntime_mlas.cmake
Line 656 in c18e06d
However, AVXVNNI is not a core feature of AVX2 at all. AVXVNNI is not actually supported until AMD Zen 5 (2024) while the actual AVX2 instruction set has been supported by AMD since 2015.
Urgency
This issue breaks compilation on virtually all AMD CPUs.
Target platform
AMD CPUs before Zen 5; Intel CPUs before Alder Lake
Build script
N/A.
Error / output
N/A.
Visual Studio Version
No response
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: