Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
13bc7619
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
13bc7619
编写于
11月 26, 2018
作者:
J
Jiabin Yang
提交者:
GitHub
11月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14552 from JiabinYang/fix_mac/fix_pinned_memory
fix Mac unittest error on reading pined memory flag
上级
3639d99f
560b9b5b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
6 deletion
+15
-6
paddle/fluid/memory/allocation/retry_allocator_test.cc
paddle/fluid/memory/allocation/retry_allocator_test.cc
+1
-1
paddle/testing/paddle_gtest_main.cc
paddle/testing/paddle_gtest_main.cc
+5
-0
python/paddle/fluid/__init__.py
python/paddle/fluid/__init__.py
+9
-5
未找到文件。
paddle/fluid/memory/allocation/retry_allocator_test.cc
浏览文件 @
13bc7619
...
@@ -41,7 +41,7 @@ TEST(RetryAllocator, RetryAllocator) {
...
@@ -41,7 +41,7 @@ TEST(RetryAllocator, RetryAllocator) {
size_t
thread_num
=
32
;
size_t
thread_num
=
32
;
size_t
sleep_time
=
40
;
size_t
sleep_time
=
40
;
size_t
extra_time
=
2
;
size_t
extra_time
=
10
;
// Reserve to perform more tests in the future
// Reserve to perform more tests in the future
std
::
vector
<
std
::
shared_ptr
<
Allocator
>>
allocators
;
std
::
vector
<
std
::
shared_ptr
<
Allocator
>>
allocators
;
...
...
paddle/testing/paddle_gtest_main.cc
浏览文件 @
13bc7619
...
@@ -31,6 +31,11 @@ int main(int argc, char** argv) {
...
@@ -31,6 +31,11 @@ int main(int argc, char** argv) {
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
new_argv
.
push_back
(
new_argv
.
push_back
(
strdup
(
"--tryfromenv=fraction_of_gpu_memory_to_use,allocator_strategy"
));
strdup
(
"--tryfromenv=fraction_of_gpu_memory_to_use,allocator_strategy"
));
#elif __clang__
new_argv
.
push_back
(
strdup
(
"--tryfromenv=use_mkldnn,initial_cpu_memory_in_"
"mb,allocator_strategy"
));
new_argv
.
push_back
(
strdup
(
"--undefok=use_mkldnn,initial_cpu_memory_in_mb"
));
#else
#else
new_argv
.
push_back
(
new_argv
.
push_back
(
strdup
(
"--tryfromenv=use_pinned_memory,use_mkldnn,initial_cpu_memory_in_"
strdup
(
"--tryfromenv=use_pinned_memory,use_mkldnn,initial_cpu_memory_in_"
...
...
python/paddle/fluid/__init__.py
浏览文件 @
13bc7619
...
@@ -91,6 +91,7 @@ def __bootstrap__():
...
@@ -91,6 +91,7 @@ def __bootstrap__():
"""
"""
import
sys
import
sys
import
os
import
os
import
platform
from
.
import
core
from
.
import
core
in_test
=
'unittest'
in
sys
.
modules
in_test
=
'unittest'
in
sys
.
modules
...
@@ -110,14 +111,17 @@ def __bootstrap__():
...
@@ -110,14 +111,17 @@ def __bootstrap__():
print
(
'PLEASE USE OMP_NUM_THREADS WISELY.'
,
file
=
sys
.
stderr
)
print
(
'PLEASE USE OMP_NUM_THREADS WISELY.'
,
file
=
sys
.
stderr
)
os
.
environ
[
'OMP_NUM_THREADS'
]
=
str
(
num_threads
)
os
.
environ
[
'OMP_NUM_THREADS'
]
=
str
(
num_threads
)
sysstr
=
platform
.
system
()
read_env_flags
=
[
read_env_flags
=
[
'
use_pinned_memory'
,
'check_nan_inf'
,
'benchmark'
,
'eager_delete_scope
'
,
'
check_nan_inf'
,
'benchmark'
,
'eager_delete_scope'
,
'use_mkldnn
'
,
'use_
mkldnn'
,
'use_ngraph'
,
'initial_cpu_memory_in_mb
'
,
'use_
ngraph'
,
'initial_cpu_memory_in_mb'
,
'init_allocated_mem
'
,
'
init_allocated_mem'
,
'free_idle_memory'
,
'paddle_num_threads'
,
'
free_idle_memory'
,
'paddle_num_threads'
,
"dist_threadpool_size"
,
"dist_threadpool_size"
,
'eager_delete_tensor_gb'
,
'allocator_strategy'
,
'eager_delete_tensor_gb'
,
'allocator_strategy'
,
'reader_queue_speed_test_mode'
,
'print_sub_graph_dir'
'reader_queue_speed_test_mode'
,
'print_sub_graph_dir'
]
]
if
'Darwin'
not
in
sysstr
:
read_env_flags
.
append
(
'use_pinned_memory'
)
if
os
.
name
!=
'nt'
:
if
os
.
name
!=
'nt'
:
read_env_flags
.
append
(
'warpctc_dir'
)
read_env_flags
.
append
(
'warpctc_dir'
)
read_env_flags
.
append
(
'cpu_deterministic'
)
read_env_flags
.
append
(
'cpu_deterministic'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录