File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2525FetchContent_Declare (highway GIT_REPOSITORY https://github.com/google/highway.git GIT_TAG 2a16a50ff61071bb25ddef0ce35d92b0e2b9c579 EXCLUDE_FROM_ALL )
2626FetchContent_MakeAvailable (highway)
2727
28+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
29+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
30+ # Gemma does not currently use AVX10.2-specific Highway paths, and GCC 15
31+ # builds in CI can reject Highway's AVX10.2 target attribute.
32+ target_compile_definitions (hwy PUBLIC HWY_DISABLED_TARGETS=HWY_AVX10_2 )
33+ endif ()
34+
2835## Note: absl needs to be installed by sentencepiece. This will only happen if
2936## cmake is invoked with -DSPM_ENABLE_SHARED=OFF and -DSPM_ABSL_PROVIDER=module
3037FetchContent_Declare (sentencepiece GIT_REPOSITORY https://github.com/google/sentencepiece GIT_TAG 9045b2f60fa2b323dfac0eaef8fc17565036f9f9 EXCLUDE_FROM_ALL )
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020include (FetchContent )
2121FetchContent_Declare (highway GIT_REPOSITORY https://github.com/google/highway.git GIT_TAG 2a16a50ff61071bb25ddef0ce35d92b0e2b9c579)
2222FetchContent_MakeAvailable (highway)
23+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
24+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
25+ target_compile_definitions (hwy PUBLIC HWY_DISABLED_TARGETS=HWY_AVX10_2 )
26+ endif ()
2327FetchContent_Declare (sentencepiece GIT_REPOSITORY https://github.com/google/sentencepiece GIT_TAG 9045b2f60fa2b323dfac0eaef8fc17565036f9f9)
2428FetchContent_MakeAvailable (sentencepiece)
2529
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020include (FetchContent )
2121FetchContent_Declare (highway GIT_REPOSITORY https://github.com/google/highway.git GIT_TAG 2a16a50ff61071bb25ddef0ce35d92b0e2b9c579)
2222FetchContent_MakeAvailable (highway)
23+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
24+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
25+ target_compile_definitions (hwy PUBLIC HWY_DISABLED_TARGETS=HWY_AVX10_2 )
26+ endif ()
2327FetchContent_Declare (sentencepiece GIT_REPOSITORY https://github.com/google/sentencepiece GIT_TAG 9045b2f60fa2b323dfac0eaef8fc17565036f9f9)
2428FetchContent_MakeAvailable (sentencepiece)
2529
You can’t perform that action at this time.
0 commit comments