0

I have tried the below instructions, (even with ON option)

option(onnxruntime_USE_AVX "Use AVX instructions" OFF)
option(onnxruntime_USE_AVX2 "Use AVX2 instructions" OFF)
option(onnxruntime_USE_AVX512 "Use AVX512 instructions" OFF)

In CMakeList.txt file and

cmake -DCPU_BASELINE=DETECT
cmake -DCPU_BASELINE=AVX512
cmake -DCPU_BASELINE=AVX512_SKX

in terminal while building.

For testing I have used the objdump -d command.

I expect a solution to build project using cmake using AVX instruction set with clang compiler on ubuntu

starball
  • 20,030
  • 7
  • 43
  • 238
  • 2
    Defining options alone does not influence the build. You need to pass the appropriate flags to the compiler (this can depend on the options, if you want). See e.g., https://stackoverflow.com/questions/11783932/how-do-i-add-a-linker-or-compile-flag-in-a-cmake-file – chtz May 03 '23 at 13:33
  • What CMake project is this? Can you provide a link to a public repo? How can we know what options are available for this project without seeing the original config code? If what you've tried isn't working, how can we know that such options that you tried even exist for this project? – starball May 03 '23 at 22:07

0 Answers0