-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
will.yang
committed
Oct 11, 2024
1 parent
92fce84
commit 71773f0
Showing
28 changed files
with
1,711 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(llm_demo) | ||
project(rkllm_demo) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(SOURCE_FILES src/main.cpp) | ||
set(SOURCE_FILES_1 src/llm_demo.cpp) | ||
add_executable(llm_demo ${SOURCE_FILES_1}) | ||
|
||
add_executable(${PROJECT_NAME} ${SOURCE_FILES}) | ||
set(SOURCE_FILES_2 src/multimodel_demo.cpp) | ||
add_executable(multimodel_demo ${SOURCE_FILES_2}) | ||
|
||
set(RKLLM_API_PATH "${CMAKE_SOURCE_DIR}/../../runtime/${CMAKE_SYSTEM_NAME}/librkllm_api") | ||
include_directories(${RKLLM_API_PATH}/include) | ||
if(CMAKE_SYSTEM_NAME STREQUAL "Android") | ||
set(RKLLM_RT_LIB ${RKLLM_API_PATH}/${CMAKE_ANDROID_ARCH_ABI}/librkllmrt.so) | ||
target_link_libraries(${PROJECT_NAME} ${RKLLM_RT_LIB} log) | ||
find_package(OpenMP REQUIRED) | ||
target_link_libraries(llm_demo ${RKLLM_RT_LIB} log OpenMP::OpenMP_CXX) | ||
target_link_libraries(multimodel_demo ${RKLLM_RT_LIB} log OpenMP::OpenMP_CXX) | ||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
set(RKLLM_RT_LIB ${RKLLM_API_PATH}/aarch64/librkllmrt.so) | ||
target_link_libraries(${PROJECT_NAME} ${RKLLM_RT_LIB}) | ||
target_link_libraries(llm_demo ${RKLLM_RT_LIB}) | ||
target_link_libraries(multimodel_demo ${RKLLM_RT_LIB}) | ||
endif() | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.