Fix issue: ENABLE_BELOW_SM90 cannot be enabled on aarch64 CPU (#12967)

This commit is contained in:
MarcoDWei
2025-12-18 13:26:42 +08:00
committed by GitHub
parent 58c840db6b
commit ef7c29acd7
+6 -4
View File
@@ -124,14 +124,16 @@ if(CCACHE_FOUND AND ENABLE_CCACHE AND DEFINED ENV{CCACHE_DIR})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "ccache") set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "ccache")
endif() endif()
# Enable gencode below SM90 # Configure gencode below SM90
option(ENABLE_BELOW_SM90 "Enable below SM90" ON)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
set(ENABLE_BELOW_SM90 OFF) set(DEFAULT_ENABLE_BELOW_SM90 OFF)
message(STATUS "For aarch64, disable gencode below SM90 by default") message(STATUS "For aarch64, disable gencode below SM90 by default")
else()
set(DEFAULT_ENABLE_BELOW_SM90 ON)
endif() endif()
option(ENABLE_BELOW_SM90 "Enable gencode below SM90" ${DEFAULT_ENABLE_BELOW_SM90})
include_directories( include_directories(
${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/csrc ${PROJECT_SOURCE_DIR}/csrc