Rename LLAMA_CANN to GGML_CANN
This commit is contained in:
parent
f50f0905bc
commit
1115d2f836
2 changed files with 13 additions and 12 deletions
|
@ -106,6 +106,7 @@ llama_option_depr(WARNING LLAMA_NATIVE GGML_NATIVE)
|
||||||
llama_option_depr(WARNING LLAMA_RPC GGML_RPC)
|
llama_option_depr(WARNING LLAMA_RPC GGML_RPC)
|
||||||
llama_option_depr(WARNING LLAMA_SYCL GGML_SYCL)
|
llama_option_depr(WARNING LLAMA_SYCL GGML_SYCL)
|
||||||
llama_option_depr(WARNING LLAMA_SYCL_F16 GGML_SYCL_F16)
|
llama_option_depr(WARNING LLAMA_SYCL_F16 GGML_SYCL_F16)
|
||||||
|
llama_option_depr(WARNING LLAMA_CANN GGML_CANN)
|
||||||
|
|
||||||
#
|
#
|
||||||
# build the library
|
# build the library
|
||||||
|
|
|
@ -766,7 +766,7 @@ if (GGML_CPU_HBM)
|
||||||
target_link_libraries(ggml PUBLIC memkind)
|
target_link_libraries(ggml PUBLIC memkind)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LLAMA_CANN)
|
if (GGML_CANN)
|
||||||
if ("cann${CANN_INSTALL_DIR}" STREQUAL "cann" AND DEFINED ENV{ASCEND_TOOLKIT_HOME})
|
if ("cann${CANN_INSTALL_DIR}" STREQUAL "cann" AND DEFINED ENV{ASCEND_TOOLKIT_HOME})
|
||||||
set(CANN_INSTALL_DIR $ENV{ASCEND_TOOLKIT_HOME})
|
set(CANN_INSTALL_DIR $ENV{ASCEND_TOOLKIT_HOME})
|
||||||
message(STATUS "CANN: updated CANN_INSTALL_DIR from ASCEND_TOOLKIT_HOME=$ENV{ASCEND_TOOLKIT_HOME}")
|
message(STATUS "CANN: updated CANN_INSTALL_DIR from ASCEND_TOOLKIT_HOME=$ENV{ASCEND_TOOLKIT_HOME}")
|
||||||
|
@ -774,25 +774,25 @@ if (LLAMA_CANN)
|
||||||
|
|
||||||
if (CANN_INSTALL_DIR)
|
if (CANN_INSTALL_DIR)
|
||||||
# Only Support Linux.
|
# Only Support Linux.
|
||||||
if (LLAMA_CANN)
|
if (GGML_CANN)
|
||||||
if (NOT UNIX)
|
if (NOT UNIX)
|
||||||
set(LLAMA_CANN OFF)
|
set(GGML_CANN OFF)
|
||||||
message(WARNING "CANN: CANN toolkit supports unix but not ${CMAKE_SYSTEM_NAME}. Turning off LLAMA_CANN")
|
message(WARNING "CANN: CANN toolkit supports unix but not ${CMAKE_SYSTEM_NAME}. Turning off GGML_CANN")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Supported platforms: x86-64, arm64
|
# Supported platforms: x86-64, arm64
|
||||||
if (LLAMA_CANN)
|
if (GGML_CANN)
|
||||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
|
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
|
||||||
else()
|
else()
|
||||||
set(LLAMA_CANN OFF)
|
set(GGML_CANN OFF)
|
||||||
message(WARNING "CANN: CANN toolkit supports x86-64 and arm64 but not ${CMAKE_SYSTEM_PROCESSOR}. Turning off LLAMA_CANN")
|
message(WARNING "CANN: CANN toolkit supports x86-64 and arm64 but not ${CMAKE_SYSTEM_PROCESSOR}. Turning off GGML_CANN")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set header and libs
|
# Set header and libs
|
||||||
if(LLAMA_CANN)
|
if(GGML_CANN)
|
||||||
set(CANN_INCLUDE_DIRS
|
set(CANN_INCLUDE_DIRS
|
||||||
${CANN_INSTALL_DIR}/include
|
${CANN_INSTALL_DIR}/include
|
||||||
${CANN_INSTALL_DIR}/include/aclnn
|
${CANN_INSTALL_DIR}/include/aclnn
|
||||||
|
@ -825,12 +825,12 @@ if (LLAMA_CANN)
|
||||||
list(APPEND GGML_CDEF_PUBLIC GGML_USE_CANN)
|
list(APPEND GGML_CDEF_PUBLIC GGML_USE_CANN)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(LLAMA_CANN OFF)
|
set(GGML_CANN OFF)
|
||||||
message(WARNING "CANN: Can't find CANN_INSTALL_DIR, do you forget to source set_var.sh. Turning off LLAMA_CANN")
|
message(WARNING "CANN: Can't find CANN_INSTALL_DIR, do you forget to source set_var.sh. Turning off GGML_CANN")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT LLAMA_CANN)
|
if(NOT GGML_CANN)
|
||||||
message(WARNING "CANN: LLAMA_CANN is turned OFF, see above for details.")
|
message(WARNING "CANN: GGML_CANN is turned OFF, see above for details.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue