Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
94042ccd
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
1 年多 前同步成功
通知
696
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
94042ccd
编写于
8月 09, 2018
作者:
L
luotao1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add comment
上级
64c0ba28
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
4 addition
and
16 deletion
+4
-16
cmake/external/anakin.cmake
cmake/external/anakin.cmake
+3
-15
paddle/fluid/inference/api/CMakeLists.txt
paddle/fluid/inference/api/CMakeLists.txt
+1
-1
未找到文件。
cmake/external/anakin.cmake
浏览文件 @
94042ccd
...
...
@@ -14,7 +14,7 @@ SET(ANAKIN_SABER_LIB ${ANAKIN_LIBRARY}/libanakin_saber_common.so)
# nearly all the header files.
function
(
fetch_include_recursively root_dir
)
if
(
IS_DIRECTORY
${
root_dir
}
)
include_directories
(
${
root_dir
}
)
include_directories
(
BEFORE
${
root_dir
}
)
endif
()
file
(
GLOB ALL_SUB RELATIVE
${
root_dir
}
${
root_dir
}
/*
)
...
...
@@ -26,20 +26,6 @@ function(fetch_include_recursively root_dir)
endfunction
()
fetch_include_recursively
(
${
ANAKIN_INCLUDE
}
)
# A nother helper function used in Anakin.
function
(
target_fetch_include_recursively root_dir target_name
)
if
(
IS_DIRECTORY
${
root_dir
}
)
target_include_directories
(
${
target_name
}
PUBLIC
${
root_dir
}
)
endif
()
file
(
GLOB ALL_SUB RELATIVE
${
root_dir
}
${
root_dir
}
/*
)
foreach
(
sub
${
ALL_SUB
}
)
if
(
IS_DIRECTORY
${
root_dir
}
/
${
sub
}
)
target_include_directories
(
${
target_name
}
PUBLIC
${
root_dir
}
/
${
sub
}
)
endif
()
endforeach
()
endfunction
()
set
(
ANAKIN_COMPILE_EXTRA_FLAGS
-Wno-error=unused-but-set-variable -Wno-unused-but-set-variable
-Wno-error=unused-variable -Wno-unused-variable
...
...
@@ -56,6 +42,7 @@ set(ANAKIN_COMPILE_EXTRA_FLAGS
ExternalProject_Add
(
extern_anakin
${
EXTERNAL_PROJECT_LOG_ARGS
}
# TODO(luotao): use PaddlePaddle/Anakin later
GIT_REPOSITORY
"https://github.com/luotao1/Anakin"
GIT_TAG
"3957ae9263eaa0b1986758dac60a88852afb09be"
PREFIX
${
ANAKIN_SOURCE_DIR
}
...
...
@@ -73,6 +60,7 @@ ExternalProject_Add(
message
(
STATUS
"Anakin for inference is enabled"
)
message
(
STATUS
"Anakin is set INCLUDE:
${
ANAKIN_INCLUDE
}
LIBRARY:
${
ANAKIN_LIBRARY
}
"
)
fetch_include_recursively
(
${
ANAKIN_INCLUDE
}
)
add_dependencies
(
extern_anakin protobuf mklml
)
add_library
(
anakin SHARED IMPORTED GLOBAL
)
set_property
(
TARGET anakin PROPERTY IMPORTED_LOCATION
${
ANAKIN_SHARED_LIB
}
)
...
...
paddle/fluid/inference/api/CMakeLists.txt
浏览文件 @
94042ccd
...
...
@@ -62,11 +62,11 @@ endif()
if
(
WITH_ANAKIN
)
# only needed in CI
# compile the libinference_anakin_api.a and anakin.so.
fetch_include_recursively
(
${
ANAKIN_INCLUDE
}
)
nv_library
(
inference_anakin_api SRCS api.cc api_anakin_engine.cc DEPS anakin
)
nv_library
(
inference_anakin_api_shared SHARED SRCS api.cc api_anakin_engine.cc DEPS anakin
)
set
(
ANAKIN_DEPS_LIB
${
ANAKIN_SHARED_LIB
}
${
ANAKIN_SABER_LIB
}
${
CUDNN_LIBRARY
}
)
function
(
anakin_target target_name
)
target_fetch_include_recursively
(
${
ANAKIN_INCLUDE
}
${
target_name
}
)
target_compile_options
(
${
target_name
}
BEFORE PUBLIC
${
ANAKIN_COMPILE_EXTRA_FLAGS
}
)
target_link_libraries
(
${
target_name
}
${
ANAKIN_DEPS_LIB
}
)
endfunction
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录