-
Notifications
You must be signed in to change notification settings - Fork 34
/
onnxruntime-1.19.2-fix-gcc-avxvnni-check.patch
24 lines (22 loc) · 1.57 KB
/
onnxruntime-1.19.2-fix-gcc-avxvnni-check.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -Nuarp onnxruntime-1.19.2.orig/cmake/onnxruntime_mlas.cmake onnxruntime-1.19.2/cmake/onnxruntime_mlas.cmake
--- onnxruntime-1.19.2.orig/cmake/onnxruntime_mlas.cmake 2024-08-31 06:02:31.000000000 +0800
+++ onnxruntime-1.19.2/cmake/onnxruntime_mlas.cmake 2024-10-18 20:34:42.619164693 +0800
@@ -559,7 +559,7 @@ else()
message(STATUS "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}")
-if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "10")
+if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "11")
message(STATUS "Using -mavx2 -mfma -mavxvnni flags")
set_source_files_properties(${mlas_platform_srcs_avx2} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma -mavxvnni")
else()
diff -Nuarp onnxruntime-1.19.2.orig/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen64.h onnxruntime-1.19.2/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen64.h
--- onnxruntime-1.19.2.orig/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen64.h 2024-08-31 06:02:31.000000000 +0800
+++ onnxruntime-1.19.2/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen64.h 2024-10-18 20:35:03.334225739 +0800
@@ -117,7 +117,7 @@ accumulate_blklen64_r1c1blk1_avx2(
__m256 scale_b_8_ps = _mm256_broadcast_ss(scale_b);
acc0 = _mm256_fmadd_ps(sum_ps, _mm256_mul_ps(scale_a_8_ps, scale_b_8_ps), acc0);
-#if !defined(__GNUC__) || (__GNUC__ > 9)
+#if !defined(__GNUC__) || (__GNUC__ > 10)
}
#endif
}