Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
9b83462a
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看板
未验证
提交
9b83462a
编写于
2月 01, 2018
作者:
T
Tao Luo
提交者:
GitHub
2月 01, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7762 from luotao1/warpctc_deps
remove libwarpctc.so in core.so and libpaddle_fluid.so
上级
2fb280c9
d2caf777
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
5 deletion
+15
-5
cmake/generic.cmake
cmake/generic.cmake
+7
-2
paddle/testing/paddle_gtest_main.cc
paddle/testing/paddle_gtest_main.cc
+3
-2
python/paddle/v2/fluid/__init__.py
python/paddle/v2/fluid/__init__.py
+3
-1
python/paddle/v2/fluid/tests/CMakeLists.txt
python/paddle/v2/fluid/tests/CMakeLists.txt
+2
-0
未找到文件。
cmake/generic.cmake
浏览文件 @
9b83462a
...
...
@@ -186,6 +186,11 @@ function(cc_library TARGET_NAME)
add_library
(
${
TARGET_NAME
}
STATIC
${
cc_library_SRCS
}
)
endif
()
if
(
cc_library_DEPS
)
# Don't need link libwarpctc.so
if
(
"
${
cc_library_DEPS
}
;"
MATCHES
"warpctc;"
)
list
(
REMOVE_ITEM cc_library_DEPS warpctc
)
add_dependencies
(
${
TARGET_NAME
}
warpctc
)
endif
()
add_dependencies
(
${
TARGET_NAME
}
${
cc_library_DEPS
}
)
target_link_libraries
(
${
TARGET_NAME
}
${
cc_library_DEPS
}
)
endif
()
...
...
@@ -465,10 +470,10 @@ function(py_test TARGET_NAME)
if
(
WITH_TESTING
)
set
(
options
""
)
set
(
oneValueArgs
""
)
set
(
multiValueArgs SRCS DEPS ARGS
)
set
(
multiValueArgs SRCS DEPS ARGS
ENVS
)
cmake_parse_arguments
(
py_test
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
add_test
(
NAME
${
TARGET_NAME
}
COMMAND env PYTHONPATH=
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
COMMAND env PYTHONPATH=
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
${
py_test_ENVS
}
${
PYTHON_EXECUTABLE
}
-u
${
py_test_SRCS
}
${
py_test_ARGS
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
endif
()
...
...
paddle/testing/paddle_gtest_main.cc
浏览文件 @
9b83462a
...
...
@@ -27,9 +27,10 @@ int main(int argc, char** argv) {
}
#ifdef PADDLE_WITH_CUDA
new_argv
.
push_back
(
strdup
(
"--tryfromenv=fraction_of_gpu_memory_to_use,use_pinned_memory"
));
strdup
(
"--tryfromenv=fraction_of_gpu_memory_to_use,use_pinned_memory,"
"warpctc_dir"
));
#else
new_argv
.
push_back
(
strdup
(
"--tryfromenv=use_pinned_memory"
));
new_argv
.
push_back
(
strdup
(
"--tryfromenv=use_pinned_memory
,warpctc_dir
"
));
#endif
int
new_argc
=
static_cast
<
int
>
(
new_argv
.
size
());
char
**
new_argv_address
=
new_argv
.
data
();
...
...
python/paddle/v2/fluid/__init__.py
浏览文件 @
9b83462a
...
...
@@ -76,7 +76,9 @@ def __bootstrap__():
os
.
environ
[
'OMP_NUM_THREADS'
]
=
str
(
num_threads
)
read_env_flags
=
[
'use_pinned_memory'
,
'check_nan_inf'
,
'benchmark'
]
read_env_flags
=
[
'use_pinned_memory'
,
'check_nan_inf'
,
'benchmark'
,
'warpctc_dir'
]
if
core
.
is_compiled_with_cuda
():
read_env_flags
+=
[
'fraction_of_gpu_memory_to_use'
]
core
.
init_gflags
([
sys
.
argv
[
0
]]
+
...
...
python/paddle/v2/fluid/tests/CMakeLists.txt
浏览文件 @
9b83462a
...
...
@@ -5,9 +5,11 @@ if(NOT WITH_DISTRIBUTE)
list
(
REMOVE_ITEM TEST_OPS test_recv_op
)
endif
(
NOT WITH_DISTRIBUTE
)
list
(
REMOVE_ITEM TEST_OPS test_warpctc_op
)
foreach
(
src
${
TEST_OPS
}
)
py_test
(
${
src
}
SRCS
${
src
}
.py
)
endforeach
()
py_test
(
test_warpctc_op SRCS test_warpctc_op.py ENVS FLAGS_warpctc_dir=
${
WARPCTC_LIB_DIR
}
)
add_subdirectory
(
book
)
add_subdirectory
(
book_distribute
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录