You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmake/cpu_extension.cmake
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ endif()
15
15
#
16
16
set(ENABLE_AVX512BF16 $ENV{VLLM_CPU_AVX512BF16})
17
17
set(ENABLE_AVX512VNNI $ENV{VLLM_CPU_AVX512VNNI})
18
+
set(ENABLE_AMXBF16 $ENV{VLLM_CPU_AMXBF16})
18
19
19
20
include_directories("${CMAKE_SOURCE_DIR}/csrc")
20
21
@@ -140,6 +141,22 @@ if (AVX512_FOUND AND NOT AVX512_DISABLED)
140
141
set(ENABLE_AVX512VNNI OFF)
141
142
message(WARNING "Disable AVX512-VNNI ISA support, no avx512_vnni found in local CPU flags."" If cross-compilation is required, please set env VLLM_CPU_AVX512VNNI=1.")
message(WARNING "Disable AMX_BF16 ISA support, requires gcc/g++ >= 12.3")
155
+
endif()
156
+
else()
157
+
set(ENABLE_AMXBF16 OFF)
158
+
message(WARNING "Disable AMX_BF16 ISA support, no amx_bf16 found in local CPU flags."" If cross-compilation is required, please set env VLLM_CPU_AMXBF16=1.")
159
+
endif()
143
160
144
161
elseif (AVX2_FOUND)
145
162
list(APPEND CXX_COMPILE_FLAGS "-mavx2")
@@ -275,7 +292,10 @@ if ((AVX512_FOUND AND NOT AVX512_DISABLED) OR (ASIMD_FOUND AND NOT APPLE_SILICON
275
292
set(ONEDNN_VERBOSE "OFF")
276
293
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
277
294
295
+
set(VLLM_BUILD_TYPE ${CMAKE_BUILD_TYPE})
296
+
set(CMAKE_BUILD_TYPE"Release") # remove oneDNN debug symbols to reduce size
0 commit comments