Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable AVX512 for hexl #652

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions bazel/patches/hexl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0da96f..61bfdd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,10 +113,10 @@ message(STATUS "CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}")
#------------------------------------------------------------------------------
# Set AVX flags
#------------------------------------------------------------------------------
-hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512dq.cpp" HEXL_HAS_AVX512DQ)
-hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512ifma.cpp" HEXL_HAS_AVX512IFMA)
-hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512vbmi2.cpp" HEXL_HAS_AVX512VBMI2)
-hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx256.cpp" HEXL_HAS_AVX256)
+# hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512dq.cpp" HEXL_HAS_AVX512DQ)
+# hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512ifma.cpp" HEXL_HAS_AVX512IFMA)
+# hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx512vbmi2.cpp" HEXL_HAS_AVX512VBMI2)
+# hexl_check_compile_flag("${HEXL_CMAKE_PATH}/test-avx256.cpp" HEXL_HAS_AVX256)

# ------------------------------------------------------------------------------
# Installation logic...
diff --git a/hexl/CMakeLists.txt b/hexl/CMakeLists.txt
index 7c660a0..7e2e1c9 100644
--- a/hexl/CMakeLists.txt
+++ b/hexl/CMakeLists.txt
@@ -93,7 +93,7 @@ endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(hexl PRIVATE -Wall -Wconversion -Wshadow -pedantic -Wextra
- -Wno-unknown-pragmas -march=native -O3 -fomit-frame-pointer
+ -Wno-unknown-pragmas -mavx -O3 -fomit-frame-pointer
-Wno-sign-conversion
-Wno-implicit-int-conversion
)
2 changes: 2 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def _com_intel_hexl():
urls = [
"https://github.com/intel/hexl/archive/refs/tags/v1.2.5.tar.gz",
],
patch_args = ["-p1"],
patches = ["@spulib//bazel:patches/hexl.patch"],
)

def _com_github_emptoolkit_emp_tool():
Expand Down
Loading