Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
98dfb492
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
98dfb492
编写于
3月 14, 2019
作者:
M
minqiyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Release GIL lock
上级
42e96a02
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
29 addition
and
27 deletion
+29
-27
paddle/fluid/CMakeLists.txt
paddle/fluid/CMakeLists.txt
+1
-1
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+26
-26
paddle/fluid/pybind/imperative.cc
paddle/fluid/pybind/imperative.cc
+2
-0
未找到文件。
paddle/fluid/CMakeLists.txt
浏览文件 @
98dfb492
...
...
@@ -9,4 +9,4 @@ add_subdirectory(pybind)
# NOTE: please add subdirectory inference at last.
add_subdirectory
(
inference
)
add_subdirectory
(
train
)
#
add_subdirectory(train)
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
98dfb492
...
...
@@ -25,13 +25,13 @@ if (WIN32)
list
(
APPEND fluid_third_partys gflags glog protobuf cblas
)
endif
(
WIN32
)
# paddle_fluid_origin exclude inference api interface
if
(
WIN32
)
sep_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
else
(
WIN32
)
#set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --target elf64-x86-64 cr paddle_fluid_origin ${fluid_modules} paddle_fluid_api")
cc_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
endif
(
WIN32
)
#
#
paddle_fluid_origin exclude inference api interface
#
if(WIN32)
#
sep_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
#
else(WIN32)
#
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --target elf64-x86-64 cr paddle_fluid_origin ${fluid_modules} paddle_fluid_api")
#
cc_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
#
endif(WIN32)
add_subdirectory
(
api
)
...
...
@@ -41,19 +41,19 @@ set(SHARED_INFERENCE_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/api/analysis_predictor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/api/details/zero_copy_tensor.cc
)
if
(
WIN32
)
sep_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array
analysis_config paddle_pass_builder
)
else
(
WIN32
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array analysis_config paddle_pass_builder
)
endif
(
WIN32
)
#
if(WIN32)
#
sep_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS} zero_copy_tensor reset_tensor_array
#
analysis_config paddle_pass_builder)
#
else(WIN32)
#
cc_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS}
#
zero_copy_tensor reset_tensor_array analysis_config paddle_pass_builder)
#
endif(WIN32)
if
(
NOT APPLE
)
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
set
(
LINK_FLAGS
"-Wl,--retain-symbols-file
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_fluid.sym"
)
set_target_properties
(
paddle_fluid PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS
}
"
)
endif
()
#
if(NOT APPLE)
#
#
TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
#
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
#
set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
#
endif()
# Create shared library
if
(
WIN32
)
...
...
@@ -87,10 +87,10 @@ if(NOT APPLE AND NOT WIN32)
add_custom_target
(
check_symbol ALL DEPENDS
"
${
CMAKE_CURRENT_BINARY_DIR
}
/.check_symbol"
)
endif
()
if
(
WITH_TESTING
)
# tests/book depends the models that generated by python/paddle/fluid/tests/book
add_subdirectory
(
tests/book
)
if
(
WITH_INFERENCE_API_TEST
)
add_subdirectory
(
tests/api
)
endif
()
endif
()
#
if(WITH_TESTING)
#
#
tests/book depends the models that generated by python/paddle/fluid/tests/book
#
add_subdirectory(tests/book)
#
if(WITH_INFERENCE_API_TEST)
#
add_subdirectory(tests/api)
#
endif()
#
endif()
paddle/fluid/pybind/imperative.cc
浏览文件 @
98dfb492
...
...
@@ -42,6 +42,7 @@ void BindTracer(pybind11::module* m) {
framework
::
AttributeMap
attrs_map
,
const
platform
::
CPUPlace
expected_place
,
const
bool
stop_gradient
=
false
)
{
pybind11
::
gil_scoped_release
release
;
return
self
.
Trace
(
op
,
inputs
,
outputs
,
attrs_map
,
expected_place
,
stop_gradient
);
})
...
...
@@ -52,6 +53,7 @@ void BindTracer(pybind11::module* m) {
framework
::
AttributeMap
attrs_map
,
const
platform
::
CUDAPlace
expected_place
,
const
bool
stop_gradient
=
false
)
{
pybind11
::
gil_scoped_release
release
;
return
self
.
Trace
(
op
,
inputs
,
outputs
,
attrs_map
,
expected_place
,
stop_gradient
);
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录