Jeff-Shen-00 opened a new issue, #70773:
URL: https://github.com/apache/doris/issues/70773

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Description
   
   Since AMD and Intel latest CPU support AVX512 instructions, it's time to add 
support for avx512 in BE building.
   
   ### Solution
   
   be/CMakeLists.txt
   增加一下编译选项
   set(USE_AVX512 OFF CACHE BOOL "Enable AVX512 instruction set for x86_64")
   message(STATUS "USE_AVX512 is ${USE_AVX512}")
   
       if (USE_AVX512)
           # -mavx512f also defines __AVX2__, so USE_AVX2=0 cannot be honored
           # together with USE_AVX512=ON.
           if (NOT USE_AVX2)
               message(FATAL_ERROR "USE_AVX512 requires USE_AVX2=ON: -mavx512f 
implies AVX2.")
           endif()
           # Doris code only needs F (512-bit integer), BW (byte/word ops) and
           # VL (EVEX-encoded 256-bit ops). DQ is required as well because these
           # flags are also inherited by contrib/faiss, whose __AVX512F__ code
           # paths use DQ intrinsics such as _mm512_inserti32x8.
           add_compile_options(-mavx512f -mavx512bw -mavx512vl -mavx512dq)
           add_definitions(-DUSE_AVX512)
       endif()
   
   build.sh
   USE_AVX512=ON $0 --be                   build Backend with AVX512 
instructions (requires an AVX512 CPU)
   if [[ -z "${USE_AVX512}" ]]; then
       USE_AVX512='OFF'
   fi
   USE_AVX512                          -- ${USE_AVX512}
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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