From eafbff6cf90da90ce3f40491d098006212a82d64 Mon Sep 17 00:00:00 2001 From: Hardy <100662313+wanghailu0717@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:56:52 +0800 Subject: [PATCH] Support kunlun new toolkit (#224) Co-authored-by: wanghailu --- CMakeLists.txt | 4 ++-- cmake/FindXCCL.cmake | 2 +- include/core/kernel.h | 2 +- include/core/perf_engine.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccacac1c..1dbb007b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,8 +285,8 @@ if(USE_KUNLUN) message(STATUS "KUNLUN_HOME: ${KUNLUN_HOME}") include_directories("${KUNLUN_HOME}/include/") - find_library(KUNLUN_RT libxpurt.so "${KUNLUN_HOME}/so/") - find_library(KUNLUN_DNN libxpuapi.so "${KUNLUN_HOME}/so/") + find_library(KUNLUN_RT libxpurt.so "${KUNLUN_HOME}/lib64/") + find_library(KUNLUN_DNN libxpuapi.so "${KUNLUN_HOME}/lib64/") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++ -Wall -Werror") if ((NOT DEFINED TARGET_CPU_ARCH) AND (NOT DEFINED ENV{TARGET_CPU_ARCH})) diff --git a/cmake/FindXCCL.cmake b/cmake/FindXCCL.cmake index fa4b3b00..28dd1f14 100644 --- a/cmake/FindXCCL.cmake +++ b/cmake/FindXCCL.cmake @@ -9,7 +9,7 @@ find_path(XCCL_INCLUDE_DIRS # ${XCCL_INCLUDE_DIR} HINTS XCCL_INCLUDE_DIR) find_library(XCCL_LIBRARIES # ${XCCL_LIB_DIR} - NAMES so/libbkcl.so + NAMES lib64/libbkcl.so HINTS XCCL_LIB_DIR) message(STATUS "XCCL_INCLUDE_DIRS: ${XCCL_INCLUDE_DIRS}") diff --git a/include/core/kernel.h b/include/core/kernel.h index 76189599..2e0d384a 100644 --- a/include/core/kernel.h +++ b/include/core/kernel.h @@ -5,8 +5,8 @@ #include "utils/operator_utils.h" #include #include -using json = nlohmann::json; namespace infini { +using json = nlohmann::json; class RuntimeObj; // Forward declaration for Kernel::compute diff --git a/include/core/perf_engine.h b/include/core/perf_engine.h index fb65da34..99a5916b 100644 --- a/include/core/perf_engine.h +++ b/include/core/perf_engine.h @@ -2,8 +2,8 @@ #include "core/graph.h" #include "core/kernel.h" #include -using json = nlohmann::json; namespace infini { +using json = nlohmann::json; class PerfEngine { public: