-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[runtime/xpu] Support the execution of non-streaming parsing on the K…
…unlun XPU card #1455
- Loading branch information
panhehe
committed
Oct 25, 2022
1 parent
89e8d0d
commit 5395671
Showing
28 changed files
with
3,395 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
if(NOT WIN32) | ||
string(ASCII 27 Esc) | ||
set(ColourReset "${Esc}[m") | ||
set(ColourBold "${Esc}[1m") | ||
set(Red "${Esc}[31m") | ||
set(Green "${Esc}[32m") | ||
set(Yellow "${Esc}[33m") | ||
set(Blue "${Esc}[34m") | ||
set(Magenta "${Esc}[35m") | ||
set(Cyan "${Esc}[36m") | ||
set(White "${Esc}[37m") | ||
set(BoldRed "${Esc}[1;31m") | ||
set(BoldGreen "${Esc}[1;32m") | ||
set(BoldYellow "${Esc}[1;33m") | ||
set(BoldBlue "${Esc}[1;34m") | ||
set(BoldMagenta "${Esc}[1;35m") | ||
set(BoldCyan "${Esc}[1;36m") | ||
set(BoldWhite "${Esc}[1;37m") | ||
endif() | ||
|
||
if(XPU) | ||
set(RUNTIME_XPU_PATH ${CMAKE_CURRENT_SOURCE_DIR}) | ||
message(STATUS "RUNTIME_XPU_PATH is ${RUNTIME_XPU_PATH} .\n") | ||
set(XPU_KUNLUN_PATH ${RUNTIME_XPU_PATH}/decoder/xpu_kunlun) | ||
if(NOT DEFINED ENV{XPU_API_PATH}) | ||
message(FATAL_ERROR "${BoldRed}NO ENV{XPU_API_PATH} in your env. Please set XPU_API_PATH.${ColourReset}\n") | ||
else() | ||
set(XPU_API_PATH $ENV{XPU_API_PATH}) | ||
message("set XPU_API_PATH from env_var. Val is $ENV{XPU_API_PATH}.") | ||
endif() | ||
|
||
include_directories(${XPU_KUNLUN_PATH}/ | ||
${XPU_API_PATH}/output/include ${XPU_API_PATH}/../runtime/include) | ||
link_directories(${XPU_API_PATH}/output/so/ ${XPU_API_PATH}/../runtime/output/so/) | ||
|
||
add_definitions(-DUSE_XPU) | ||
endif() |
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
Oops, something went wrong.