github-actions[bot] commented on code in PR #62585:
URL: https://github.com/apache/doris/pull/62585#discussion_r3098980281


##########
be/CMakeLists.txt:
##########
@@ -383,6 +383,7 @@ if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR 
"${CMAKE_BUILD_TARGET_ARCH}"
     add_compile_options(-msse4.2)
     add_definitions(-DLIBDIVIDE_SSE2)
     if (USE_AVX2)
+        add_compile_options(-march=x86-64-v3)

Review Comment:
   `-march=x86-64-v3` is not equivalent to `-mavx2`: it also lets the compiler 
assume `BMI/BMI2/F16C/FMA/LZCNT/MOVBE` (you can see these extra feature macros 
with `gcc -march=x86-64-v3 -dM -E -`). The problem is that Doris' surrounding 
contract is still AVX2-only: `be/src/service/doris_main.cpp` only probes up to 
`AVX2`, `build.sh` and `build-for-release.sh` still document/package this as 
the `USE_AVX2` split, and the startup error text still tells users to rebuild 
only when AVX2 is missing. After this line, the default AVX2-enabled BE binary 
actually requires the full `x86-64-v3` baseline, so AVX2-capable-but-non-v3 
machines will either get a misleading startup failure or execute code outside 
the probed feature set. We need to either keep the target at `-mavx2`, or 
introduce an explicit `x86-64-v3` mode and update the runtime probe + 
packaging/docs together.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to