Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
02631965
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
02631965
编写于
11月 12, 2018
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine
上级
d231e550
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
1 deletion
+10
-1
paddle/fluid/memory/allocation/allocator_strategy.cc
paddle/fluid/memory/allocation/allocator_strategy.cc
+2
-0
paddle/fluid/memory/allocation/allocator_strategy.h
paddle/fluid/memory/allocation/allocator_strategy.h
+3
-0
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+2
-0
paddle/testing/paddle_gtest_main.cc
paddle/testing/paddle_gtest_main.cc
+2
-0
python/paddle/fluid/tests/unittests/test_data_balance.py
python/paddle/fluid/tests/unittests/test_data_balance.py
+1
-1
未找到文件。
paddle/fluid/memory/allocation/allocator_strategy.cc
浏览文件 @
02631965
...
...
@@ -34,6 +34,8 @@ AllocatorStrategy GetAllocatorStrategy() {
static
AllocatorStrategy
strategy
=
GetStrategyFromFlag
();
return
strategy
;
}
void
UseAllocatorStrategyGFlag
()
{}
}
// namespace allocation
}
// namespace memory
}
// namespace paddle
paddle/fluid/memory/allocation/allocator_strategy.h
浏览文件 @
02631965
...
...
@@ -22,6 +22,9 @@ enum class AllocatorStrategy { kLegacy, kNaiveBestFit };
extern
AllocatorStrategy
GetAllocatorStrategy
();
// Do nothing, just make sure linker do not prune this file.
extern
void
UseAllocatorStrategyGFlag
();
}
// namespace allocation
}
// namespace memory
}
// namespace paddle
paddle/fluid/pybind/pybind.cc
浏览文件 @
02631965
...
...
@@ -34,6 +34,7 @@ limitations under the License. */
#include "paddle/fluid/framework/reader.h"
#include "paddle/fluid/framework/selected_rows.h"
#include "paddle/fluid/framework/version.h"
#include "paddle/fluid/memory/allocation/allocator_strategy.h"
#include "paddle/fluid/operators/activation_op.h"
#include "paddle/fluid/operators/reader/lod_tensor_blocking_queue.h"
#include "paddle/fluid/platform/enforce.h"
...
...
@@ -83,6 +84,7 @@ bool IsCompiledWithDIST() {
}
PYBIND11_PLUGIN
(
core
)
{
paddle
::
memory
::
allocation
::
UseAllocatorStrategyGFlag
();
py
::
module
m
(
"core"
,
"C++ core of PaddlePaddle"
);
// using framework in this function. Since it is inside a function, it will
...
...
paddle/testing/paddle_gtest_main.cc
浏览文件 @
02631965
...
...
@@ -16,10 +16,12 @@ limitations under the License. */
#include "gflags/gflags.h"
#include "gtest/gtest.h"
#include "paddle/fluid/memory/allocation/allocator_strategy.h"
#include "paddle/fluid/memory/memory.h"
#include "paddle/fluid/platform/init.h"
int
main
(
int
argc
,
char
**
argv
)
{
paddle
::
memory
::
allocation
::
UseAllocatorStrategyGFlag
();
testing
::
InitGoogleTest
(
&
argc
,
argv
);
std
::
vector
<
char
*>
new_argv
;
std
::
string
gflags_env
;
...
...
python/paddle/fluid/tests/unittests/test_data_balance.py
浏览文件 @
02631965
...
...
@@ -116,7 +116,7 @@ class TestDataBalance(unittest.TestCase):
print
(
"WARNING: Unittest TestDataBalance skipped.
\
For the result is not correct when device count
\
is larger than batch size."
)
exit
(
0
)
return
fetch_list
=
[
image
.
name
,
label
.
name
]
data_appeared
=
[
False
]
*
self
.
total_ins_num
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录