Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
兽拳
Paddle
提交
71d7980f
P
Paddle
项目概览
兽拳
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
71d7980f
编写于
11月 05, 2018
作者:
P
peizhilin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix build issue 1
上级
9d67c1fb
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
45 addition
and
23 deletion
+45
-23
paddle/fluid/CMakeLists.txt
paddle/fluid/CMakeLists.txt
+2
-4
paddle/fluid/framework/garbage_collector.h
paddle/fluid/framework/garbage_collector.h
+1
-1
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+17
-8
paddle/fluid/inference/analysis/CMakeLists.txt
paddle/fluid/inference/analysis/CMakeLists.txt
+4
-0
paddle/fluid/operators/detection/roi_perspective_transform_op.cu
...fluid/operators/detection/roi_perspective_transform_op.cu
+6
-2
paddle/fluid/operators/math/sequence_pooling.cu
paddle/fluid/operators/math/sequence_pooling.cu
+5
-0
paddle/fluid/platform/stream_callback_manager.h
paddle/fluid/platform/stream_callback_manager.h
+1
-1
paddle/fluid/pybind/CMakeLists.txt
paddle/fluid/pybind/CMakeLists.txt
+1
-1
python/CMakeLists.txt
python/CMakeLists.txt
+4
-4
python/requirements.txt
python/requirements.txt
+1
-1
python/setup.py.in
python/setup.py.in
+3
-1
未找到文件。
paddle/fluid/CMakeLists.txt
浏览文件 @
71d7980f
...
...
@@ -9,9 +9,7 @@ if (NOT WIN32)
add_subdirectory
(
recordio
)
endif
(
NOT WIN32
)
if
(
WITH_INFERENCE
)
# NOTE: please add subdirectory inference at last.
add_subdirectory
(
inference
)
endif
()
# NOTE: please add subdirectory inference at last.
add_subdirectory
(
inference
)
add_subdirectory
(
train
)
paddle/fluid/framework/garbage_collector.h
浏览文件 @
71d7980f
...
...
@@ -29,7 +29,7 @@ template <typename T>
class
GarbageCollector
{
public:
GarbageCollector
(
const
platform
::
Place
&
place
,
size_t
max_memory_size
)
:
max_memory_size_
(
std
::
max
(
max_memory_size
,
static_cast
<
size_t
>
(
1
)))
{
:
max_memory_size_
(
(
std
::
max
)
(
max_memory_size
,
static_cast
<
size_t
>
(
1
)))
{
garbages_
.
reset
(
new
std
::
deque
<
T
*>
());
dev_ctx_
=
platform
::
DeviceContextPool
::
Instance
().
Get
(
place
);
}
...
...
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
71d7980f
...
...
@@ -15,7 +15,11 @@ cc_library(paddle_fluid_api
get_property
(
fluid_modules GLOBAL PROPERTY FLUID_MODULES
)
# paddle_fluid_origin exclude inference api interface
cc_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
if
(
WIN32
)
sep_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
else
(
WIN32
)
cc_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
endif
(
WIN32
)
add_subdirectory
(
api
)
...
...
@@ -31,10 +35,10 @@ endif()
# Create static library
if
(
WIN32
)
sep_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array
)
else
()
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array
)
endif
()
sep_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array
)
else
(
WIN32
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_APIS
}
zero_copy_tensor reset_tensor_array
)
endif
(
WIN32
)
if
(
NOT APPLE
)
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
...
...
@@ -43,11 +47,16 @@ if(NOT APPLE)
endif
()
# Create shared library
cc_library
(
paddle_fluid_shared SHARED SRCS
${
SHARED_INFERENCE_SRCS
}
DEPS
${
fluid_modules
}
paddle_fluid_api reset_tensor_array
)
if
(
WIN32
)
sep_library
(
paddle_fluid_shared SHARED SRCS
${
SHARED_INFERENCE_SRCS
}
DEPS
${
fluid_modules
}
paddle_fluid_api reset_tensor_array
)
else
(
WIN32
)
cc_library
(
paddle_fluid_shared SHARED SRCS
${
SHARED_INFERENCE_SRCS
}
DEPS
${
fluid_modules
}
paddle_fluid_api reset_tensor_array
)
endif
()
set_target_properties
(
paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid
)
if
(
NOT APPLE
)
if
(
NOT APPLE
AND NOT WIN32
)
# TODO(liuyiqun): Temporarily disable the link flag because it is not support on Mac.
set
(
LINK_FLAGS
"-Wl,--version-script
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_fluid.map"
)
set_target_properties
(
paddle_fluid_shared PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS
}
"
)
...
...
paddle/fluid/inference/analysis/CMakeLists.txt
浏览文件 @
71d7980f
...
...
@@ -20,6 +20,10 @@ cc_test(test_node SRCS node_tester.cc DEPS analysis)
cc_test
(
test_dot SRCS dot_tester.cc DEPS analysis
)
cc_binary
(
inference_analyzer SRCS analyzer_main.cc DEPS analysis paddle_fluid
)
if
(
WIN32
)
target_link_libraries
(
inference_analyzer shlwapi
)
endif
(
WIN32
)
function
(
inference_analysis_test TARGET
)
if
(
WITH_TESTING
)
set
(
options
""
)
...
...
paddle/fluid/operators/detection/roi_perspective_transform_op.cu
浏览文件 @
71d7980f
...
...
@@ -15,6 +15,10 @@ limitations under the License. */
#include <algorithm>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/platform/cuda_primitives.h"
#include "paddle/fluid/platform/float16.h"
using
paddle
::
platform
::
PADDLE_CUDA_NUM_THREADS
;
using
paddle
::
platform
::
float16
;
namespace
paddle
{
namespace
operators
{
...
...
@@ -31,12 +35,12 @@ namespace operators {
template
<
typename
T
>
__device__
bool
GT_E
(
T
a
,
T
b
)
{
return
(
a
>
b
)
||
f
abs
(
a
-
b
)
<
1e-4
;
return
(
a
>
b
)
||
Eigen
::
numext
::
abs
(
a
-
b
)
<
1e-4
;
}
template
<
typename
T
>
__device__
bool
LT_E
(
T
a
,
T
b
)
{
return
(
a
<
b
)
||
f
abs
(
a
-
b
)
<
1e-4
;
return
(
a
<
b
)
||
Eigen
::
numext
::
abs
(
a
-
b
)
<
1e-4
;
}
template
<
typename
T
>
...
...
paddle/fluid/operators/math/sequence_pooling.cu
浏览文件 @
71d7980f
...
...
@@ -21,7 +21,12 @@ namespace paddle {
namespace
operators
{
namespace
math
{
#if defined(__FLT_MAX__)
#define FLT_MAX __FLT_MAX__
#else
#include <float.h>
#include <limits>
#endif
template
<
typename
T
>
struct
MaxPoolFunctor
{
...
...
paddle/fluid/platform/stream_callback_manager.h
浏览文件 @
71d7980f
...
...
@@ -18,8 +18,8 @@
#include <cuda_runtime.h>
#include <functional>
#include <memory>
#include "ThreadPool.h"
#include "paddle/fluid/platform/enforce.h"
#include "third_party/threadpool/src/extern_threadpool/ThreadPool.h"
namespace
paddle
{
namespace
platform
{
...
...
paddle/fluid/pybind/CMakeLists.txt
浏览文件 @
71d7980f
...
...
@@ -4,7 +4,7 @@ set(PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc)
if
(
NOT WIN32
)
list
(
APPEND PYBIND_DEPS parallel_executor profiler
)
list
(
APPEND PYBIND_SRCS recordio.cc
)
endif
()
endif
(
NOT WIN32
)
if
(
WITH_PYTHON
)
if
(
WITH_AMD_GPU
)
hip_library
(
paddle_pybind SHARED
...
...
python/CMakeLists.txt
浏览文件 @
71d7980f
...
...
@@ -60,13 +60,13 @@ add_custom_target(copy_paddle_pybind ALL DEPENDS ${FLUID_CORE})
IF
(
WIN32
)
add_custom_command
(
OUTPUT
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
# COMMAND ${CMAKE_COMMAND} -E touch stub.cc
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_BINARY_DIR
}
/python/paddle
COMMAND
${
CMAKE_COMMAND
}
-E copy_director
y
${
PADDLE_SOURCE_DIR
}
/python/paddle
${
PADDLE_BINARY_DIR
}
/python/paddle
COMMAND
${
CMAKE_COMMAND
}
-E copy
_directory
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle
${
PADDLE_BINARY_DIR
}
/python/
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_BINARY_DIR
}
/python/paddle
COMMAND
${
CMAKE_COMMAND
}
-E cop
y
${
PADDLE_SOURCE_DIR
}
/python/paddle
${
PADDLE_BINARY_DIR
}
/python/paddle
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle
${
PADDLE_BINARY_DIR
}
/python/
COMMAND
${
CMAKE_COMMAND
}
-E env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py bdist_wheel
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${PADDLE_PYTHON_BUILD_DIR}/lib*
${PADDLE_PYTHON_BUILD_DIR}/lib-python
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
PADDLE_PYTHON_BUILD_DIR
}
/libs
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
DEPENDS gen_proto_py copy_paddle_pybind
${
FLUID_CORE
}
framework_py_proto profiler_py_proto
${
PY_FILES
}
${
external_project_dependencies
}
${
COPY_PADDLE_MASTER
}
)
ELSE
(
WIN32
)
add_custom_command
(
OUTPUT
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
...
...
python/requirements.txt
浏览文件 @
71d7980f
requests==2.9.2
numpy>=1.12,<=1.14 #TODO:change to ">=1.12" when numpy fix bug in 1.15 and higher version
protobuf==3.1
recordio>=0.1.0
recordio>=0.1.0
; sys_platform != 'win32'
matplotlib==2.2.3 # TODO: let python3 paddlepaddle package use latest matplotlib
rarfile
scipy>=0.19.0
...
...
python/setup.py.in
浏览文件 @
71d7980f
...
...
@@ -205,19 +205,21 @@ if '${CMAKE_BUILD_TYPE}' == 'Release':
if os.system(command) != 0:
raise Exception("patch _swig_paddle.so failed, command: %s" % command)
ext_modules = [Extension('_foo', ['stub.cc'])]
if os.name == 'nt':
# fix the path separator under windows
fix_package_dir = {}
for k, v in package_dir.items():
fix_package_dir[k] = v.replace('/', '\\')
package_dir = fix_package_dir
ext_modules = []
setup(name='${PACKAGE_NAME}',
version='${PADDLE_VERSION}',
description='Parallel Distributed Deep Learning',
install_requires=setup_requires,
packages=packages,
ext_modules=
[Extension('_foo', ['stub.cc'])]
,
ext_modules=
ext_modules
,
package_data=package_data,
package_dir=package_dir,
scripts=paddle_bins
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录