Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
47d6bc86
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看板
未验证
提交
47d6bc86
编写于
9月 22, 2021
作者:
T
Tomasz Socha
提交者:
GitHub
9月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix copy elision warning (#35885)
* Fix copy elision warning * Remove redundand code
上级
736a7388
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
11 addition
and
23 deletion
+11
-23
paddle/fluid/framework/fleet/gloo_wrapper.h
paddle/fluid/framework/fleet/gloo_wrapper.h
+1
-1
paddle/fluid/framework/ir/fc_gru_fuse_pass_tester.h
paddle/fluid/framework/ir/fc_gru_fuse_pass_tester.h
+1
-1
paddle/fluid/framework/ir/fc_lstm_fuse_pass_tester.h
paddle/fluid/framework/ir/fc_lstm_fuse_pass_tester.h
+1
-1
paddle/fluid/framework/new_executor/interpretercore_util.cc
paddle/fluid/framework/new_executor/interpretercore_util.cc
+2
-2
paddle/fluid/framework/new_executor/workqueue.cc
paddle/fluid/framework/new_executor/workqueue.cc
+3
-3
paddle/fluid/inference/api/api_impl.cc
paddle/fluid/inference/api/api_impl.cc
+0
-12
paddle/fluid/memory/allocation/mmap_allocator.cc
paddle/fluid/memory/allocation/mmap_allocator.cc
+1
-1
paddle/fluid/pybind/inference_api.cc
paddle/fluid/pybind/inference_api.cc
+1
-1
paddle/fluid/string/string_helper.h
paddle/fluid/string/string_helper.h
+1
-1
未找到文件。
paddle/fluid/framework/fleet/gloo_wrapper.h
浏览文件 @
47d6bc86
...
@@ -215,7 +215,7 @@ class GlooWrapper {
...
@@ -215,7 +215,7 @@ class GlooWrapper {
#else
#else
LOG
(
WARNING
)
<<
"AllGather does nothing when WITH_GLOO=OFF"
;
LOG
(
WARNING
)
<<
"AllGather does nothing when WITH_GLOO=OFF"
;
#endif
#endif
return
std
::
move
(
ret
)
;
return
ret
;
}
}
protected:
protected:
...
...
paddle/fluid/framework/ir/fc_gru_fuse_pass_tester.h
浏览文件 @
47d6bc86
...
@@ -88,7 +88,7 @@ std::unique_ptr<ir::Graph> PrepareGraph(
...
@@ -88,7 +88,7 @@ std::unique_ptr<ir::Graph> PrepareGraph(
nullptr
,
false
,
false
,
activation
,
gate_activation
);
nullptr
,
false
,
false
,
activation
,
gate_activation
);
std
::
unique_ptr
<
ir
::
Graph
>
graph
(
new
ir
::
Graph
(
layers
.
main_program
()));
std
::
unique_ptr
<
ir
::
Graph
>
graph
(
new
ir
::
Graph
(
layers
.
main_program
()));
return
std
::
move
(
graph
)
;
return
graph
;
}
}
}
// namespace fc_gru_test
}
// namespace fc_gru_test
}
// namespace ir
}
// namespace ir
...
...
paddle/fluid/framework/ir/fc_lstm_fuse_pass_tester.h
浏览文件 @
47d6bc86
...
@@ -91,7 +91,7 @@ std::unique_ptr<ir::Graph> PrepareGraph(
...
@@ -91,7 +91,7 @@ std::unique_ptr<ir::Graph> PrepareGraph(
false
,
gate_activation
,
cell_activation
,
candidate_activation
);
false
,
gate_activation
,
cell_activation
,
candidate_activation
);
std
::
unique_ptr
<
ir
::
Graph
>
graph
(
new
ir
::
Graph
(
layers
.
main_program
()));
std
::
unique_ptr
<
ir
::
Graph
>
graph
(
new
ir
::
Graph
(
layers
.
main_program
()));
return
std
::
move
(
graph
)
;
return
graph
;
}
}
}
// namespace fc_lstm_test
}
// namespace fc_lstm_test
...
...
paddle/fluid/framework/new_executor/interpretercore_util.cc
浏览文件 @
47d6bc86
...
@@ -25,7 +25,7 @@ AtomicVectorSizeT AsyncWorkQueue::PrepareAtomicDeps(
...
@@ -25,7 +25,7 @@ AtomicVectorSizeT AsyncWorkQueue::PrepareAtomicDeps(
working_dependecy_count
[
i
]
=
working_dependecy_count
[
i
]
=
std
::
make_unique
<
std
::
atomic
<
size_t
>>
(
dependecy_count
[
i
]);
std
::
make_unique
<
std
::
atomic
<
size_t
>>
(
dependecy_count
[
i
]);
}
}
return
std
::
move
(
working_dependecy_count
)
;
return
working_dependecy_count
;
}
}
AtomicVectorSizeT
AsyncWorkQueue
::
PrepareAtomicVarRef
(
AtomicVectorSizeT
AsyncWorkQueue
::
PrepareAtomicVarRef
(
...
@@ -36,7 +36,7 @@ AtomicVectorSizeT AsyncWorkQueue::PrepareAtomicVarRef(
...
@@ -36,7 +36,7 @@ AtomicVectorSizeT AsyncWorkQueue::PrepareAtomicVarRef(
working_var_ref
[
i
]
=
working_var_ref
[
i
]
=
std
::
make_unique
<
std
::
atomic
<
size_t
>>
(
vec_meta_info
[
i
].
var_ref_count_
);
std
::
make_unique
<
std
::
atomic
<
size_t
>>
(
vec_meta_info
[
i
].
var_ref_count_
);
}
}
return
std
::
move
(
working_var_ref
)
;
return
working_var_ref
;
}
}
bool
var_can_be_deleted
(
const
std
::
string
&
name
,
const
BlockDesc
&
block
)
{
bool
var_can_be_deleted
(
const
std
::
string
&
name
,
const
BlockDesc
&
block
)
{
...
...
paddle/fluid/framework/new_executor/workqueue.cc
浏览文件 @
47d6bc86
...
@@ -147,7 +147,7 @@ std::unique_ptr<WorkQueue> CreateSingleThreadedWorkQueue(
...
@@ -147,7 +147,7 @@ std::unique_ptr<WorkQueue> CreateSingleThreadedWorkQueue(
"For a SingleThreadedWorkQueue, "
"For a SingleThreadedWorkQueue, "
"WorkQueueOptions.num_threads must equals to 1."
));
"WorkQueueOptions.num_threads must equals to 1."
));
std
::
unique_ptr
<
WorkQueue
>
ptr
(
new
WorkQueueImpl
(
options
));
std
::
unique_ptr
<
WorkQueue
>
ptr
(
new
WorkQueueImpl
(
options
));
return
std
::
move
(
ptr
)
;
return
ptr
;
}
}
std
::
unique_ptr
<
WorkQueue
>
CreateMultiThreadedWorkQueue
(
std
::
unique_ptr
<
WorkQueue
>
CreateMultiThreadedWorkQueue
(
...
@@ -158,7 +158,7 @@ std::unique_ptr<WorkQueue> CreateMultiThreadedWorkQueue(
...
@@ -158,7 +158,7 @@ std::unique_ptr<WorkQueue> CreateMultiThreadedWorkQueue(
"WorkQueueOptions.num_threads must be "
"WorkQueueOptions.num_threads must be "
"greater than 1."
));
"greater than 1."
));
std
::
unique_ptr
<
WorkQueue
>
ptr
(
new
WorkQueueImpl
(
options
));
std
::
unique_ptr
<
WorkQueue
>
ptr
(
new
WorkQueueImpl
(
options
));
return
std
::
move
(
ptr
)
;
return
ptr
;
}
}
std
::
unique_ptr
<
WorkQueueGroup
>
CreateWorkQueueGroup
(
std
::
unique_ptr
<
WorkQueueGroup
>
CreateWorkQueueGroup
(
...
@@ -168,7 +168,7 @@ std::unique_ptr<WorkQueueGroup> CreateWorkQueueGroup(
...
@@ -168,7 +168,7 @@ std::unique_ptr<WorkQueueGroup> CreateWorkQueueGroup(
"For a WorkQueueGroup, the number of WorkQueueOptions "
"For a WorkQueueGroup, the number of WorkQueueOptions "
"must be greater than 1."
));
"must be greater than 1."
));
std
::
unique_ptr
<
WorkQueueGroup
>
ptr
(
new
WorkQueueGroupImpl
(
queues_options
));
std
::
unique_ptr
<
WorkQueueGroup
>
ptr
(
new
WorkQueueGroupImpl
(
queues_options
));
return
std
::
move
(
ptr
)
;
return
ptr
;
}
}
}
// namespace framework
}
// namespace framework
...
...
paddle/fluid/inference/api/api_impl.cc
浏览文件 @
47d6bc86
...
@@ -192,14 +192,7 @@ std::unique_ptr<PaddlePredictor> NativePaddlePredictor::Clone() {
...
@@ -192,14 +192,7 @@ std::unique_ptr<PaddlePredictor> NativePaddlePredictor::Clone() {
LOG
(
ERROR
)
<<
"fail to call Init"
;
LOG
(
ERROR
)
<<
"fail to call Init"
;
return
nullptr
;
return
nullptr
;
}
}
#ifdef __clang__
// fix clang compile error
return
cls
;
return
cls
;
#else
// fix manylinux compile error.
return
std
::
move
(
cls
);
#endif
}
}
bool
NativePaddlePredictor
::
SetFeed
(
const
std
::
vector
<
PaddleTensor
>
&
inputs
,
bool
NativePaddlePredictor
::
SetFeed
(
const
std
::
vector
<
PaddleTensor
>
&
inputs
,
...
@@ -390,12 +383,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
...
@@ -390,12 +383,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
if
(
!
dynamic_cast
<
NativePaddlePredictor
*>
(
predictor
.
get
())
->
Init
(
nullptr
))
{
if
(
!
dynamic_cast
<
NativePaddlePredictor
*>
(
predictor
.
get
())
->
Init
(
nullptr
))
{
return
nullptr
;
return
nullptr
;
}
}
#ifdef __clang__
// fix clang compile error
return
predictor
;
return
predictor
;
#else
return
std
::
move
(
predictor
);
#endif
}
}
template
<
>
template
<
>
...
...
paddle/fluid/memory/allocation/mmap_allocator.cc
浏览文件 @
47d6bc86
...
@@ -59,7 +59,7 @@ std::string GetIPCName() {
...
@@ -59,7 +59,7 @@ std::string GetIPCName() {
#endif
#endif
handle
+=
"_"
;
handle
+=
"_"
;
handle
+=
std
::
to_string
(
rd
());
handle
+=
std
::
to_string
(
rd
());
return
std
::
move
(
handle
)
;
return
handle
;
}
}
std
::
shared_ptr
<
MemoryMapWriterAllocation
>
AllocateMemoryMapWriterAllocation
(
std
::
shared_ptr
<
MemoryMapWriterAllocation
>
AllocateMemoryMapWriterAllocation
(
...
...
paddle/fluid/pybind/inference_api.cc
浏览文件 @
47d6bc86
...
@@ -324,7 +324,7 @@ void BindInferenceApi(py::module *m) {
...
@@ -324,7 +324,7 @@ void BindInferenceApi(py::module *m) {
auto
pred
=
auto
pred
=
std
::
unique_ptr
<
paddle_infer
::
Predictor
>
(
std
::
unique_ptr
<
paddle_infer
::
Predictor
>
(
new
paddle_infer
::
Predictor
(
config
));
new
paddle_infer
::
Predictor
(
config
));
return
std
::
move
(
pred
)
;
return
pred
;
});
});
m
->
def
(
"copy_tensor"
,
&
CopyPaddleInferTensor
);
m
->
def
(
"copy_tensor"
,
&
CopyPaddleInferTensor
);
m
->
def
(
"paddle_dtype_size"
,
&
paddle
::
PaddleDtypeSize
);
m
->
def
(
"paddle_dtype_size"
,
&
paddle
::
PaddleDtypeSize
);
...
...
paddle/fluid/string/string_helper.h
浏览文件 @
47d6bc86
...
@@ -53,7 +53,7 @@ template <class... ARGS>
...
@@ -53,7 +53,7 @@ template <class... ARGS>
std
::
string
format_string
(
const
char
*
fmt
,
ARGS
&&
...
args
)
{
std
::
string
format_string
(
const
char
*
fmt
,
ARGS
&&
...
args
)
{
std
::
string
str
;
std
::
string
str
;
format_string_append
(
str
,
fmt
,
args
...);
format_string_append
(
str
,
fmt
,
args
...);
return
st
d
::
move
(
str
)
;
return
st
r
;
}
}
template
<
class
...
ARGS
>
template
<
class
...
ARGS
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录