Skip to content

Commit db27775

Browse files
committed
[language_model] run bmodel successfully in pcie
1 parent e62eef4 commit db27775

File tree

9 files changed

+1096
-57
lines changed

9 files changed

+1096
-57
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(model)
3+
4+
if (NOT DEFINED TARGET_ARCH)
5+
set(TARGET_ARCH pcie)
6+
endif()
7+
8+
include_directories(${PROJECT_SOURCE_DIR}/../../../support/include)
9+
10+
if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64")
11+
add_definitions(-DSOC_TARGET)
12+
link_directories(${PROJECT_SOURCE_DIR}/../../../support/lib_soc)
13+
message("SoC mode, starting......")
14+
elseif (${TARGET_ARCH} STREQUAL "pcie")
15+
add_definitions(-DPCIE_TARGET)
16+
link_directories(${PROJECT_SOURCE_DIR}/../../../support/lib_pcie)
17+
message("PCIE mode, starting......")
18+
endif()
19+
20+
add_definitions(-DDEBUG --std=c++17 -fPIC -Wall)
21+
22+
set(CMAKE_BUILD_TYPE "Debug")
23+
24+
find_package(pybind11 REQUIRED CONFIG)
25+
26+
file(GLOB CPP_FILES ${PROJECT_SOURCE_DIR}/*.cpp)
27+
28+
29+
pybind11_add_module(chat ${CPP_FILES})
30+
target_link_libraries(chat PUBLIC bmrt bmlib)
31+
install(TARGETS chat DESTINATION python)

0 commit comments

Comments
 (0)