Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
30a02d27
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 2 年 前同步成功
通知
2325
Star
20933
Fork
5424
代码
文件
提交
分支
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看板
未验证
提交
30a02d27
编写于
8月 07, 2023
作者:
R
Ruibin Cheung
提交者:
GitHub
8月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[clang-tidy] enable modernize-use-equals-default (#55983)
上级
4d094b0c
变更
95
显示空白变更内容
内联
并排
Showing
95 changed file
with
121 addition
and
124 deletion
+121
-124
.clang-tidy
.clang-tidy
+1
-1
paddle/fluid/distributed/auto_parallel/spmd_rules/dist_tensor_spec.cc
.../distributed/auto_parallel/spmd_rules/dist_tensor_spec.cc
+1
-1
paddle/fluid/distributed/collective/process_group_nccl.cc
paddle/fluid/distributed/collective/process_group_nccl.cc
+1
-1
paddle/fluid/distributed/fleet_executor/fleet_executor.cc
paddle/fluid/distributed/fleet_executor/fleet_executor.cc
+1
-1
paddle/fluid/distributed/fleet_executor/interceptor.cc
paddle/fluid/distributed/fleet_executor/interceptor.cc
+1
-1
paddle/fluid/distributed/ps/service/communicator/communicator.cc
...fluid/distributed/ps/service/communicator/communicator.cc
+1
-1
paddle/fluid/distributed/ps/table/common_graph_table.cc
paddle/fluid/distributed/ps/table/common_graph_table.cc
+1
-1
paddle/fluid/framework/data_feed.cc
paddle/fluid/framework/data_feed.cc
+1
-1
paddle/fluid/framework/data_feed.h
paddle/fluid/framework/data_feed.h
+1
-1
paddle/fluid/framework/details/fetch_async_op_handle.cc
paddle/fluid/framework/details/fetch_async_op_handle.cc
+1
-1
paddle/fluid/framework/details/fetch_op_handle.cc
paddle/fluid/framework/details/fetch_op_handle.cc
+1
-1
paddle/fluid/framework/details/nan_inf_utils_detail.cc
paddle/fluid/framework/details/nan_inf_utils_detail.cc
+1
-1
paddle/fluid/framework/details/op_handle_base.cc
paddle/fluid/framework/details/op_handle_base.cc
+1
-1
paddle/fluid/framework/details/scale_loss_grad_op_handle.cc
paddle/fluid/framework/details/scale_loss_grad_op_handle.cc
+1
-1
paddle/fluid/framework/details/ssa_graph_executor.cc
paddle/fluid/framework/details/ssa_graph_executor.cc
+1
-1
paddle/fluid/framework/details/var_handle.cc
paddle/fluid/framework/details/var_handle.cc
+1
-1
paddle/fluid/framework/ir/adaptive_pool2d_convert_global_pass.cc
...fluid/framework/ir/adaptive_pool2d_convert_global_pass.cc
+1
-1
paddle/fluid/framework/ir/adaptive_pool2d_convert_global_pass.h
.../fluid/framework/ir/adaptive_pool2d_convert_global_pass.h
+1
-1
paddle/fluid/framework/ir/constant_folding_pass.cc
paddle/fluid/framework/ir/constant_folding_pass.cc
+1
-1
paddle/fluid/framework/ir/conv_bn_fuse_pass.cc
paddle/fluid/framework/ir/conv_bn_fuse_pass.cc
+4
-3
paddle/fluid/framework/ir/cost_model.cc
paddle/fluid/framework/ir/cost_model.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass_tester.cc
.../ir/mkldnn/compute_propagate_scales_mkldnn_pass_tester.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.cc
...e/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.h
...le/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.h
+1
-1
paddle/fluid/framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.cc
...framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.h
.../framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.h
+1
-1
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass.cc
...id/framework/ir/mkldnn/params_quantization_mkldnn_pass.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass.h
...uid/framework/ir/mkldnn/params_quantization_mkldnn_pass.h
+1
-1
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass_tester.cc
...ework/ir/mkldnn/params_quantization_mkldnn_pass_tester.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.cc
...rk/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.cc
+2
-1
paddle/fluid/framework/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.h
...ork/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.h
+1
-1
paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc
...framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc
+1
-1
paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.h
.../framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.h
+1
-1
paddle/fluid/framework/ir/reverse_roll_fuse_pass.cc
paddle/fluid/framework/ir/reverse_roll_fuse_pass.cc
+1
-1
paddle/fluid/framework/ir/reverse_roll_fuse_pass.h
paddle/fluid/framework/ir/reverse_roll_fuse_pass.h
+1
-1
paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc
paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc
+1
-1
paddle/fluid/framework/ir/shuffle_channel_detect_pass.h
paddle/fluid/framework/ir/shuffle_channel_detect_pass.h
+1
-1
paddle/fluid/framework/ir/sigmoid_elementmul_fuse_pass.cc
paddle/fluid/framework/ir/sigmoid_elementmul_fuse_pass.cc
+1
-1
paddle/fluid/framework/ir/trt_map_ops_to_matrix_multiply_pass.cc
...fluid/framework/ir/trt_map_ops_to_matrix_multiply_pass.cc
+1
-1
paddle/fluid/framework/ir/yolo_box_fuse_pass.cc
paddle/fluid/framework/ir/yolo_box_fuse_pass.cc
+1
-1
paddle/fluid/framework/new_executor/garbage_collector/no_event_garbage_collector.cc
..._executor/garbage_collector/no_event_garbage_collector.cc
+1
-1
paddle/fluid/framework/new_executor/new_executor_defs.cc
paddle/fluid/framework/new_executor/new_executor_defs.cc
+1
-1
paddle/fluid/framework/phi_utils.cc
paddle/fluid/framework/phi_utils.cc
+1
-1
paddle/fluid/framework/program_utils.cc
paddle/fluid/framework/program_utils.cc
+1
-1
paddle/fluid/framework/reader.cc
paddle/fluid/framework/reader.cc
+1
-1
paddle/fluid/framework/var_type_traits.cc
paddle/fluid/framework/var_type_traits.cc
+1
-1
paddle/fluid/imperative/amp_auto_cast.cc
paddle/fluid/imperative/amp_auto_cast.cc
+4
-2
paddle/fluid/inference/analysis/analyzer.cc
paddle/fluid/inference/analysis/analyzer.cc
+1
-1
paddle/fluid/inference/analysis/passes/passes.cc
paddle/fluid/inference/analysis/passes/passes.cc
+1
-1
paddle/fluid/inference/api/resource_manager.cc
paddle/fluid/inference/api/resource_manager.cc
+1
-1
paddle/fluid/inference/tensorrt/convert/activation_op.cc
paddle/fluid/inference/tensorrt/convert/activation_op.cc
+1
-1
paddle/fluid/inference/tensorrt/convert/elementwise_op.cc
paddle/fluid/inference/tensorrt/convert/elementwise_op.cc
+2
-2
paddle/fluid/inference/tensorrt/convert/equal_op.cc
paddle/fluid/inference/tensorrt/convert/equal_op.cc
+2
-2
paddle/fluid/inference/tensorrt/convert/square_op.cc
paddle/fluid/inference/tensorrt/convert/square_op.cc
+1
-1
paddle/fluid/inference/tensorrt/convert/top_k_op.cc
paddle/fluid/inference/tensorrt/convert/top_k_op.cc
+1
-1
paddle/fluid/inference/tensorrt/convert/unary_op.cc
paddle/fluid/inference/tensorrt/convert/unary_op.cc
+1
-1
paddle/fluid/inference/tensorrt/dynamic_shape_infermeta.cc
paddle/fluid/inference/tensorrt/dynamic_shape_infermeta.cc
+1
-1
paddle/fluid/inference/tensorrt/op_teller.cc
paddle/fluid/inference/tensorrt/op_teller.cc
+4
-4
paddle/fluid/inference/tensorrt/plugin/many_emb_layernorm_plugin.cu
...id/inference/tensorrt/plugin/many_emb_layernorm_plugin.cu
+1
-1
paddle/fluid/inference/tensorrt/plugin/many_emb_layernorm_varseqlen_plugin.cu
...ce/tensorrt/plugin/many_emb_layernorm_varseqlen_plugin.cu
+1
-1
paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu
...le/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu
+1
-1
paddle/fluid/inference/tensorrt/plugin/stack_op_plugin.cu
paddle/fluid/inference/tensorrt/plugin/stack_op_plugin.cu
+2
-2
paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu
paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu
+1
-1
paddle/fluid/ir_adaptor/translator/attribute_translator.cc
paddle/fluid/ir_adaptor/translator/attribute_translator.cc
+1
-1
paddle/fluid/memory/allocation/allocator_facade.cc
paddle/fluid/memory/allocation/allocator_facade.cc
+2
-2
paddle/fluid/operators/collective/c_comm_init_all_op.cc
paddle/fluid/operators/collective/c_comm_init_all_op.cc
+1
-1
paddle/fluid/operators/collective/c_comm_init_multitrainer_op.cc
...fluid/operators/collective/c_comm_init_multitrainer_op.cc
+1
-1
paddle/fluid/operators/fused/fused_fc_elementwise_layernorm_op.cu
...luid/operators/fused/fused_fc_elementwise_layernorm_op.cu
+1
-1
paddle/fluid/operators/math/beam_search.cc
paddle/fluid/operators/math/beam_search.cc
+1
-1
paddle/fluid/operators/math/beam_search.cu
paddle/fluid/operators/math/beam_search.cu
+1
-1
paddle/fluid/operators/math/sampler.cc
paddle/fluid/operators/math/sampler.cc
+1
-1
paddle/fluid/operators/reader/py_reader.cc
paddle/fluid/operators/reader/py_reader.cc
+3
-1
paddle/fluid/platform/profiler/cuda_tracer.cc
paddle/fluid/platform/profiler/cuda_tracer.cc
+1
-1
paddle/fluid/platform/profiler/custom_device/custom_tracer.cc
...le/fluid/platform/profiler/custom_device/custom_tracer.cc
+1
-1
paddle/ir/core/ir_context.cc
paddle/ir/core/ir_context.cc
+1
-1
paddle/ir/core/storage_manager.cc
paddle/ir/core/storage_manager.cc
+1
-1
paddle/phi/api/include/tensor.h
paddle/phi/api/include/tensor.h
+1
-1
paddle/phi/api/lib/tensor.cc
paddle/phi/api/lib/tensor.cc
+1
-6
paddle/phi/backends/dynload/dynamic_loader.cc
paddle/phi/backends/dynload/dynamic_loader.cc
+1
-1
paddle/phi/backends/gpu/gpu_context.cc
paddle/phi/backends/gpu/gpu_context.cc
+1
-1
paddle/phi/backends/onednn/onednn_context.cc
paddle/phi/backends/onednn/onednn_context.cc
+1
-1
paddle/phi/kernels/cpu/multiclass_nms3_kernel.cc
paddle/phi/kernels/cpu/multiclass_nms3_kernel.cc
+1
-1
paddle/phi/kernels/cpu/rnn_grad_kernel.cc
paddle/phi/kernels/cpu/rnn_grad_kernel.cc
+4
-4
paddle/phi/kernels/cpu/rnn_kernel.cc
paddle/phi/kernels/cpu/rnn_kernel.cc
+2
-2
paddle/phi/kernels/funcs/concat_and_split_functor.cu
paddle/phi/kernels/funcs/concat_and_split_functor.cu
+5
-7
paddle/phi/kernels/gpu/masked_select_grad_kernel.cu
paddle/phi/kernels/gpu/masked_select_grad_kernel.cu
+1
-1
paddle/phi/kernels/gpu/masked_select_kernel.cu
paddle/phi/kernels/gpu/masked_select_kernel.cu
+1
-1
paddle/phi/kernels/gpu/p_norm_kernel.cu
paddle/phi/kernels/gpu/p_norm_kernel.cu
+2
-2
paddle/phi/kernels/gpu/rms_norm_kernel.cu
paddle/phi/kernels/gpu/rms_norm_kernel.cu
+1
-3
test/cpp/fluid/fused/cudnn_bn_add_relu_test.cc
test/cpp/fluid/fused/cudnn_bn_add_relu_test.cc
+1
-1
test/cpp/fluid/fused/cudnn_norm_conv_test.cc
test/cpp/fluid/fused/cudnn_norm_conv_test.cc
+1
-1
test/cpp/fluid/fused/fused_dropout_act_bias_test.cu
test/cpp/fluid/fused/fused_dropout_act_bias_test.cu
+1
-1
test/cpp/fluid/fused/fused_layernorm_residual_dropout_bias_test.cu
...fluid/fused/fused_layernorm_residual_dropout_bias_test.cu
+1
-1
test/cpp/inference/api/analyzer_dam_tester.cc
test/cpp/inference/api/analyzer_dam_tester.cc
+2
-2
test/cpp/inference/api/api_tester.cc
test/cpp/inference/api/api_tester.cc
+1
-1
未找到文件。
.clang-tidy
浏览文件 @
30a02d27
...
@@ -181,7 +181,7 @@ modernize-redundant-void-arg,
...
@@ -181,7 +181,7 @@ modernize-redundant-void-arg,
-modernize-unary-static-assert,
-modernize-unary-static-assert,
-modernize-use-bool-literals,
-modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-emplace,
-
modernize-use-equals-default,
modernize-use-equals-default,
-modernize-use-equals-delete,
-modernize-use-equals-delete,
-modernize-use-noexcept,
-modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-nullptr,
...
...
paddle/fluid/distributed/auto_parallel/spmd_rules/dist_tensor_spec.cc
浏览文件 @
30a02d27
...
@@ -34,7 +34,7 @@ DistTensorSpec::DistTensorSpec(const DistTensorSpec& spec) {
...
@@ -34,7 +34,7 @@ DistTensorSpec::DistTensorSpec(const DistTensorSpec& spec) {
dist_attr_
.
copy_from
(
spec
.
dist_attr
());
dist_attr_
.
copy_from
(
spec
.
dist_attr
());
}
}
DistTensorSpec
::~
DistTensorSpec
()
{}
DistTensorSpec
::~
DistTensorSpec
()
=
default
;
DistTensorSpec
::
DistTensorSpec
(
const
Tensor
&
tensor
)
{
DistTensorSpec
::
DistTensorSpec
(
const
Tensor
&
tensor
)
{
shape_
=
tensor
.
shape
();
shape_
=
tensor
.
shape
();
...
...
paddle/fluid/distributed/collective/process_group_nccl.cc
浏览文件 @
30a02d27
...
@@ -47,7 +47,7 @@ ProcessGroupNCCL::NCCLTask::NCCLTask(const Place& place,
...
@@ -47,7 +47,7 @@ ProcessGroupNCCL::NCCLTask::NCCLTask(const Place& place,
comm_event_
(
place
),
comm_event_
(
place
),
task_place_
(
place
)
{}
task_place_
(
place
)
{}
ProcessGroupNCCL
::
NCCLTask
::~
NCCLTask
()
{}
ProcessGroupNCCL
::
NCCLTask
::~
NCCLTask
()
=
default
;
bool
ProcessGroupNCCL
::
NCCLTask
::
IsCompleted
()
{
return
comm_event_
.
Query
();
}
bool
ProcessGroupNCCL
::
NCCLTask
::
IsCompleted
()
{
return
comm_event_
.
Query
();
}
...
...
paddle/fluid/distributed/fleet_executor/fleet_executor.cc
浏览文件 @
30a02d27
...
@@ -48,7 +48,7 @@ FleetExecutor::FleetExecutor(const FleetExecutorDesc& exe_desc)
...
@@ -48,7 +48,7 @@ FleetExecutor::FleetExecutor(const FleetExecutorDesc& exe_desc)
InitMessageBus
();
InitMessageBus
();
}
}
FleetExecutor
::~
FleetExecutor
()
{
FleetExecutor
::~
FleetExecutor
()
{
// NOLINT
for
(
const
auto
&
carrier_id
:
carrier_ids_
)
{
for
(
const
auto
&
carrier_id
:
carrier_ids_
)
{
GlobalMap
<
std
::
string
,
Carrier
>::
Get
(
carrier_id
)
->
Release
();
GlobalMap
<
std
::
string
,
Carrier
>::
Get
(
carrier_id
)
->
Release
();
}
}
...
...
paddle/fluid/distributed/fleet_executor/interceptor.cc
浏览文件 @
30a02d27
...
@@ -24,7 +24,7 @@ namespace distributed {
...
@@ -24,7 +24,7 @@ namespace distributed {
Interceptor
::
Interceptor
(
int64_t
interceptor_id
,
TaskNode
*
node
)
Interceptor
::
Interceptor
(
int64_t
interceptor_id
,
TaskNode
*
node
)
:
interceptor_id_
(
interceptor_id
),
node_
(
node
)
{}
:
interceptor_id_
(
interceptor_id
),
node_
(
node
)
{}
Interceptor
::~
Interceptor
()
{
Interceptor
::~
Interceptor
()
{
// NOLINT
// FIXME(wangxi): throw in stop function
// FIXME(wangxi): throw in stop function
// std::lock_guard<std::mutex> lock(mutex_);
// std::lock_guard<std::mutex> lock(mutex_);
// PADDLE_ENFORCE_EQ(messages_.empty(), true,
// PADDLE_ENFORCE_EQ(messages_.empty(), true,
...
...
paddle/fluid/distributed/ps/service/communicator/communicator.cc
浏览文件 @
30a02d27
...
@@ -38,7 +38,7 @@ inline double GetCurrentUS() {
...
@@ -38,7 +38,7 @@ inline double GetCurrentUS() {
return
1e+6
*
time
.
tv_sec
+
time
.
tv_usec
;
return
1e+6
*
time
.
tv_sec
+
time
.
tv_usec
;
}
}
Communicator
::
Communicator
()
{}
Communicator
::
Communicator
()
=
default
;
void
Communicator
::
InitGFlag
(
const
std
::
string
&
gflags
)
{
void
Communicator
::
InitGFlag
(
const
std
::
string
&
gflags
)
{
VLOG
(
3
)
<<
"Init With Gflags:"
<<
gflags
;
VLOG
(
3
)
<<
"Init With Gflags:"
<<
gflags
;
...
...
paddle/fluid/distributed/ps/table/common_graph_table.cc
浏览文件 @
30a02d27
...
@@ -1205,7 +1205,7 @@ Node *GraphShard::find_node(uint64_t id) {
...
@@ -1205,7 +1205,7 @@ Node *GraphShard::find_node(uint64_t id) {
return
iter
==
node_location
.
end
()
?
nullptr
:
bucket
[
iter
->
second
];
return
iter
==
node_location
.
end
()
?
nullptr
:
bucket
[
iter
->
second
];
}
}
GraphTable
::~
GraphTable
()
{
GraphTable
::~
GraphTable
()
{
// NOLINT
#ifdef PADDLE_WITH_GPU_GRAPH
#ifdef PADDLE_WITH_GPU_GRAPH
clear_graph
();
clear_graph
();
#endif
#endif
...
...
paddle/fluid/framework/data_feed.cc
浏览文件 @
30a02d27
...
@@ -1999,7 +1999,7 @@ void PaddleBoxDataFeed::PutToFeedVec(const std::vector<Record*>& ins_vec) {
...
@@ -1999,7 +1999,7 @@ void PaddleBoxDataFeed::PutToFeedVec(const std::vector<Record*>& ins_vec) {
#endif
#endif
}
}
SlotRecordInMemoryDataFeed
::~
SlotRecordInMemoryDataFeed
()
{
SlotRecordInMemoryDataFeed
::~
SlotRecordInMemoryDataFeed
()
{
// NOLINT
#if defined(PADDLE_WITH_CUDA) && defined(PADDLE_WITH_HETERPS)
#if defined(PADDLE_WITH_CUDA) && defined(PADDLE_WITH_HETERPS)
stop_token_
.
store
(
true
);
stop_token_
.
store
(
true
);
for
(
auto
&
thread
:
pack_threads_
)
{
for
(
auto
&
thread
:
pack_threads_
)
{
...
...
paddle/fluid/framework/data_feed.h
浏览文件 @
30a02d27
...
@@ -1821,7 +1821,7 @@ class MultiSlotInMemoryDataFeed : public InMemoryDataFeed<Record> {
...
@@ -1821,7 +1821,7 @@ class MultiSlotInMemoryDataFeed : public InMemoryDataFeed<Record> {
class
SlotRecordInMemoryDataFeed
:
public
InMemoryDataFeed
<
SlotRecord
>
{
class
SlotRecordInMemoryDataFeed
:
public
InMemoryDataFeed
<
SlotRecord
>
{
public:
public:
SlotRecordInMemoryDataFeed
()
{}
SlotRecordInMemoryDataFeed
()
=
default
;
virtual
~
SlotRecordInMemoryDataFeed
();
virtual
~
SlotRecordInMemoryDataFeed
();
void
Init
(
const
DataFeedDesc
&
data_feed_desc
)
override
;
void
Init
(
const
DataFeedDesc
&
data_feed_desc
)
override
;
void
LoadIntoMemory
()
override
;
void
LoadIntoMemory
()
override
;
...
...
paddle/fluid/framework/details/fetch_async_op_handle.cc
浏览文件 @
30a02d27
...
@@ -37,7 +37,7 @@ FetchAsyncOpHandle::FetchAsyncOpHandle(ir::Node *node,
...
@@ -37,7 +37,7 @@ FetchAsyncOpHandle::FetchAsyncOpHandle(ir::Node *node,
local_exec_scopes_
(
local_exec_scopes
),
local_exec_scopes_
(
local_exec_scopes
),
return_merged_
(
return_merged
)
{}
return_merged_
(
return_merged
)
{}
FetchAsyncOpHandle
::~
FetchAsyncOpHandle
()
{}
FetchAsyncOpHandle
::~
FetchAsyncOpHandle
()
=
default
;
void
FetchAsyncOpHandle
::
RecordWaitEventOnCtx
(
void
FetchAsyncOpHandle
::
RecordWaitEventOnCtx
(
platform
::
DeviceContext
*
waited_ctx
)
{
platform
::
DeviceContext
*
waited_ctx
)
{
...
...
paddle/fluid/framework/details/fetch_op_handle.cc
浏览文件 @
30a02d27
...
@@ -35,7 +35,7 @@ FetchOpHandle::FetchOpHandle(ir::Node *node,
...
@@ -35,7 +35,7 @@ FetchOpHandle::FetchOpHandle(ir::Node *node,
local_exec_scopes_
(
local_exec_scopes
),
local_exec_scopes_
(
local_exec_scopes
),
return_merged_
(
return_merged
)
{}
return_merged_
(
return_merged
)
{}
FetchOpHandle
::~
FetchOpHandle
()
{}
FetchOpHandle
::~
FetchOpHandle
()
=
default
;
void
FetchOpHandle
::
RecordWaitEventOnCtx
(
platform
::
DeviceContext
*
waited_ctx
)
{
void
FetchOpHandle
::
RecordWaitEventOnCtx
(
platform
::
DeviceContext
*
waited_ctx
)
{
PADDLE_THROW
(
platform
::
errors
::
PermissionDenied
(
PADDLE_THROW
(
platform
::
errors
::
PermissionDenied
(
...
...
paddle/fluid/framework/details/nan_inf_utils_detail.cc
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ namespace paddle {
...
@@ -27,7 +27,7 @@ namespace paddle {
namespace
framework
{
namespace
framework
{
namespace
details
{
namespace
details
{
struct
DebugTools
{
struct
DebugTools
{
DebugTools
()
{}
DebugTools
()
=
default
;
std
::
string
path
=
""
;
std
::
string
path
=
""
;
int
stack_limit
=
1
;
int
stack_limit
=
1
;
};
};
...
...
paddle/fluid/framework/details/op_handle_base.cc
浏览文件 @
30a02d27
...
@@ -30,7 +30,7 @@ std::string OpHandleBase::DebugString() const {
...
@@ -30,7 +30,7 @@ std::string OpHandleBase::DebugString() const {
return
ss
.
str
();
return
ss
.
str
();
}
}
OpHandleBase
::~
OpHandleBase
()
PADDLE_MAY_THROW
{
OpHandleBase
::~
OpHandleBase
()
PADDLE_MAY_THROW
{
// NOLINT
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
for
(
auto
&
ev
:
events_
)
{
for
(
auto
&
ev
:
events_
)
{
if
(
ev
.
second
)
{
if
(
ev
.
second
)
{
...
...
paddle/fluid/framework/details/scale_loss_grad_op_handle.cc
浏览文件 @
30a02d27
...
@@ -40,7 +40,7 @@ ScaleLossGradOpHandle::ScaleLossGradOpHandle(ir::Node *node,
...
@@ -40,7 +40,7 @@ ScaleLossGradOpHandle::ScaleLossGradOpHandle(ir::Node *node,
this
->
SetDeviceContext
(
place_
,
dev_ctx
);
this
->
SetDeviceContext
(
place_
,
dev_ctx
);
}
}
ScaleLossGradOpHandle
::~
ScaleLossGradOpHandle
()
{}
ScaleLossGradOpHandle
::~
ScaleLossGradOpHandle
()
=
default
;
struct
ScaleLossGradFunctor
{
struct
ScaleLossGradFunctor
{
float
coeff_
;
float
coeff_
;
...
...
paddle/fluid/framework/details/ssa_graph_executor.cc
浏览文件 @
30a02d27
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
namespace
paddle
{
namespace
paddle
{
namespace
framework
{
namespace
framework
{
namespace
details
{
namespace
details
{
SSAGraphExecutor
::~
SSAGraphExecutor
()
{}
SSAGraphExecutor
::~
SSAGraphExecutor
()
=
default
;
void
ClearFetchOp
(
ir
::
Graph
*
graph
,
std
::
vector
<
OpHandleBase
*>*
fetch_ops
)
{
void
ClearFetchOp
(
ir
::
Graph
*
graph
,
std
::
vector
<
OpHandleBase
*>*
fetch_ops
)
{
if
(
fetch_ops
->
empty
())
return
;
if
(
fetch_ops
->
empty
())
return
;
...
...
paddle/fluid/framework/details/var_handle.cc
浏览文件 @
30a02d27
...
@@ -18,7 +18,7 @@ namespace paddle {
...
@@ -18,7 +18,7 @@ namespace paddle {
namespace
framework
{
namespace
framework
{
namespace
details
{
namespace
details
{
VarHandleBase
::~
VarHandleBase
()
{}
VarHandleBase
::~
VarHandleBase
()
=
default
;
VarHandle
::~
VarHandle
()
{
VLOG
(
4
)
<<
"deleting var handle "
<<
DebugString
();
}
VarHandle
::~
VarHandle
()
{
VLOG
(
4
)
<<
"deleting var handle "
<<
DebugString
();
}
...
...
paddle/fluid/framework/ir/adaptive_pool2d_convert_global_pass.cc
浏览文件 @
30a02d27
...
@@ -24,7 +24,7 @@ namespace paddle {
...
@@ -24,7 +24,7 @@ namespace paddle {
namespace
framework
{
namespace
framework
{
namespace
ir
{
namespace
ir
{
AdaptivePool2dConvertGlobalPass
::
AdaptivePool2dConvertGlobalPass
()
{
AdaptivePool2dConvertGlobalPass
::
AdaptivePool2dConvertGlobalPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"pool2d"
))
AddOpCompat
(
OpCompat
(
"pool2d"
))
.
AddInput
(
"X"
)
.
AddInput
(
"X"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/adaptive_pool2d_convert_global_pass.h
浏览文件 @
30a02d27
...
@@ -32,7 +32,7 @@ class Graph;
...
@@ -32,7 +32,7 @@ class Graph;
class
AdaptivePool2dConvertGlobalPass
:
public
FusePassBase
{
class
AdaptivePool2dConvertGlobalPass
:
public
FusePassBase
{
public:
public:
AdaptivePool2dConvertGlobalPass
();
AdaptivePool2dConvertGlobalPass
();
virtual
~
AdaptivePool2dConvertGlobalPass
()
{}
virtual
~
AdaptivePool2dConvertGlobalPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/constant_folding_pass.cc
浏览文件 @
30a02d27
...
@@ -51,7 +51,7 @@ struct ConstantFolding : public PatternBase {
...
@@ -51,7 +51,7 @@ struct ConstantFolding : public PatternBase {
};
};
}
// namespace patterns
}
// namespace patterns
ConstantFoldingPass
::
ConstantFoldingPass
()
{}
ConstantFoldingPass
::
ConstantFoldingPass
()
=
default
;
void
ConstantFoldingPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
void
ConstantFoldingPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
PADDLE_ENFORCE_NOT_NULL
(
PADDLE_ENFORCE_NOT_NULL
(
...
...
paddle/fluid/framework/ir/conv_bn_fuse_pass.cc
浏览文件 @
30a02d27
...
@@ -756,7 +756,7 @@ void ConvEltwiseAddBNFusePass::ApplyImpl(ir::Graph* graph) const {
...
@@ -756,7 +756,7 @@ void ConvEltwiseAddBNFusePass::ApplyImpl(ir::Graph* graph) const {
AddStatis
(
found_conv_bn_count
);
AddStatis
(
found_conv_bn_count
);
}
}
ConvTransposeBNFusePass
::
ConvTransposeBNFusePass
()
{
ConvTransposeBNFusePass
::
ConvTransposeBNFusePass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"conv2d_transpose"
))
AddOpCompat
(
OpCompat
(
"conv2d_transpose"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
@@ -800,7 +800,8 @@ ConvTransposeBNFusePass::ConvTransposeBNFusePass() {
...
@@ -800,7 +800,8 @@ ConvTransposeBNFusePass::ConvTransposeBNFusePass() {
.
End
();
.
End
();
}
}
ConvTransposeEltwiseAddBNFusePass
::
ConvTransposeEltwiseAddBNFusePass
()
{
ConvTransposeEltwiseAddBNFusePass
::
ConvTransposeEltwiseAddBNFusePass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"conv2d_transpose"
))
AddOpCompat
(
OpCompat
(
"conv2d_transpose"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
@@ -844,7 +845,7 @@ ConvTransposeEltwiseAddBNFusePass::ConvTransposeEltwiseAddBNFusePass() {
...
@@ -844,7 +845,7 @@ ConvTransposeEltwiseAddBNFusePass::ConvTransposeEltwiseAddBNFusePass() {
.
End
();
.
End
();
}
}
DepthwiseConvBNFusePass
::
DepthwiseConvBNFusePass
()
{
DepthwiseConvBNFusePass
::
DepthwiseConvBNFusePass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"depthwise_conv2d"
))
AddOpCompat
(
OpCompat
(
"depthwise_conv2d"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/cost_model.cc
浏览文件 @
30a02d27
...
@@ -30,7 +30,7 @@ using platform::MemEvent;
...
@@ -30,7 +30,7 @@ using platform::MemEvent;
const
double
CostData
::
NOT_MEASURED
=
-
1
;
const
double
CostData
::
NOT_MEASURED
=
-
1
;
CostData
::~
CostData
()
{
CostData
::~
CostData
()
{
// NOLINT
// TODO(zhhsplendid): when we save a copy of program/graph, we should delete
// TODO(zhhsplendid): when we save a copy of program/graph, we should delete
// here.
// here.
}
}
...
...
paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass_tester.cc
浏览文件 @
30a02d27
...
@@ -56,7 +56,7 @@ static const std::initializer_list<std::string> rnn_variable_names{
...
@@ -56,7 +56,7 @@ static const std::initializer_list<std::string> rnn_variable_names{
class
ComputePropagateScalesMkldnnPassTest
:
public
testing
::
Test
{
class
ComputePropagateScalesMkldnnPassTest
:
public
testing
::
Test
{
public:
public:
ComputePropagateScalesMkldnnPassTest
()
{
ComputePropagateScalesMkldnnPassTest
()
{
// NOLINT
pass
.
reset
(
new
ComputePropagateScalesMkldnnPass
());
pass
.
reset
(
new
ComputePropagateScalesMkldnnPass
());
}
}
...
...
paddle/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.cc
浏览文件 @
30a02d27
...
@@ -32,7 +32,7 @@ class Graph;
...
@@ -32,7 +32,7 @@ class Graph;
PADDLE_ENFORCE_NOT_NULL( \
PADDLE_ENFORCE_NOT_NULL( \
id, platform::errors::InvalidArgument("Subgraph has no node %s.", #id));
id, platform::errors::InvalidArgument("Subgraph has no node %s.", #id));
DepthwiseConvMKLDNNPass
::
DepthwiseConvMKLDNNPass
()
{
DepthwiseConvMKLDNNPass
::
DepthwiseConvMKLDNNPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"depthwise_conv2d"
))
AddOpCompat
(
OpCompat
(
"depthwise_conv2d"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/mkldnn/depthwise_conv_mkldnn_pass.h
浏览文件 @
30a02d27
...
@@ -25,7 +25,7 @@ class Graph;
...
@@ -25,7 +25,7 @@ class Graph;
class
DepthwiseConvMKLDNNPass
:
public
FusePassBase
{
class
DepthwiseConvMKLDNNPass
:
public
FusePassBase
{
public:
public:
DepthwiseConvMKLDNNPass
();
DepthwiseConvMKLDNNPass
();
virtual
~
DepthwiseConvMKLDNNPass
()
{}
virtual
~
DepthwiseConvMKLDNNPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.cc
浏览文件 @
30a02d27
...
@@ -23,7 +23,7 @@ namespace paddle {
...
@@ -23,7 +23,7 @@ namespace paddle {
namespace
framework
{
namespace
framework
{
namespace
ir
{
namespace
ir
{
Int8ScaleCalculationMkldnnPass
::
Int8ScaleCalculationMkldnnPass
()
{
Int8ScaleCalculationMkldnnPass
::
Int8ScaleCalculationMkldnnPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"conv2d"
))
AddOpCompat
(
OpCompat
(
"conv2d"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/mkldnn/int8_scale_calculation_mkldnn_pass.h
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ class Graph;
...
@@ -27,7 +27,7 @@ class Graph;
class
Int8ScaleCalculationMkldnnPass
:
public
FusePassBase
{
class
Int8ScaleCalculationMkldnnPass
:
public
FusePassBase
{
public:
public:
Int8ScaleCalculationMkldnnPass
();
Int8ScaleCalculationMkldnnPass
();
virtual
~
Int8ScaleCalculationMkldnnPass
()
{}
virtual
~
Int8ScaleCalculationMkldnnPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass.cc
浏览文件 @
30a02d27
...
@@ -76,7 +76,7 @@ void QuantizeConvInput(Scope* scope,
...
@@ -76,7 +76,7 @@ void QuantizeConvInput(Scope* scope,
}
// namespace
}
// namespace
ParamsQuantizationMkldnnPass
::
ParamsQuantizationMkldnnPass
()
{
ParamsQuantizationMkldnnPass
::
ParamsQuantizationMkldnnPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"fused_conv2d"
))
AddOpCompat
(
OpCompat
(
"fused_conv2d"
))
.
AddInput
(
"Input"
)
.
AddInput
(
"Input"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass.h
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ class Graph;
...
@@ -27,7 +27,7 @@ class Graph;
class
ParamsQuantizationMkldnnPass
:
public
FusePassBase
{
class
ParamsQuantizationMkldnnPass
:
public
FusePassBase
{
public:
public:
ParamsQuantizationMkldnnPass
();
ParamsQuantizationMkldnnPass
();
virtual
~
ParamsQuantizationMkldnnPass
()
{}
virtual
~
ParamsQuantizationMkldnnPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/mkldnn/params_quantization_mkldnn_pass_tester.cc
浏览文件 @
30a02d27
...
@@ -65,7 +65,7 @@ struct TestScope {
...
@@ -65,7 +65,7 @@ struct TestScope {
};
};
struct
ProgramStrategy
{
struct
ProgramStrategy
{
virtual
~
ProgramStrategy
()
{}
virtual
~
ProgramStrategy
()
=
default
;
std
::
unique_ptr
<
Graph
>
CreateGraph
()
{
std
::
unique_ptr
<
Graph
>
CreateGraph
()
{
CreateProgram
();
CreateProgram
();
...
...
paddle/fluid/framework/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.cc
浏览文件 @
30a02d27
...
@@ -170,7 +170,8 @@ void FuseQuantTranspose2DequantOneDNNPass::ApplyImpl(Graph *graph) const {
...
@@ -170,7 +170,8 @@ void FuseQuantTranspose2DequantOneDNNPass::ApplyImpl(Graph *graph) const {
FuseTranspose2Dequantize
(
graph
,
"transpose2"
);
FuseTranspose2Dequantize
(
graph
,
"transpose2"
);
}
}
FuseQuantTranspose2DequantOneDNNPass
::
FuseQuantTranspose2DequantOneDNNPass
()
{
FuseQuantTranspose2DequantOneDNNPass
::
FuseQuantTranspose2DequantOneDNNPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"transpose2"
))
AddOpCompat
(
OpCompat
(
"transpose2"
))
.
AddInput
(
"X"
)
.
AddInput
(
"X"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/mkldnn/quant_transpose2_dequant_onednn_fuse_pass.h
浏览文件 @
30a02d27
...
@@ -23,7 +23,7 @@ namespace ir {
...
@@ -23,7 +23,7 @@ namespace ir {
class
FuseQuantTranspose2DequantOneDNNPass
:
public
FusePassBase
{
class
FuseQuantTranspose2DequantOneDNNPass
:
public
FusePassBase
{
public:
public:
virtual
~
FuseQuantTranspose2DequantOneDNNPass
()
{}
virtual
~
FuseQuantTranspose2DequantOneDNNPass
()
=
default
;
FuseQuantTranspose2DequantOneDNNPass
();
FuseQuantTranspose2DequantOneDNNPass
();
protected:
protected:
...
...
paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc
浏览文件 @
30a02d27
...
@@ -31,7 +31,7 @@ namespace ir {
...
@@ -31,7 +31,7 @@ namespace ir {
GET_IR_NODE(reshape2_op); \
GET_IR_NODE(reshape2_op); \
GET_IR_NODE(reshape2_out);
GET_IR_NODE(reshape2_out);
ShuffleChannelMKLDNNDetectPass
::
ShuffleChannelMKLDNNDetectPass
()
{
ShuffleChannelMKLDNNDetectPass
::
ShuffleChannelMKLDNNDetectPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"reshape2"
))
AddOpCompat
(
OpCompat
(
"reshape2"
))
.
AddInput
(
"X"
)
.
AddInput
(
"X"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.h
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ class Graph;
...
@@ -27,7 +27,7 @@ class Graph;
class
ShuffleChannelMKLDNNDetectPass
:
public
FusePassBase
{
class
ShuffleChannelMKLDNNDetectPass
:
public
FusePassBase
{
public:
public:
ShuffleChannelMKLDNNDetectPass
();
ShuffleChannelMKLDNNDetectPass
();
virtual
~
ShuffleChannelMKLDNNDetectPass
()
{}
virtual
~
ShuffleChannelMKLDNNDetectPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/reverse_roll_fuse_pass.cc
浏览文件 @
30a02d27
...
@@ -37,7 +37,7 @@ namespace paddle {
...
@@ -37,7 +37,7 @@ namespace paddle {
namespace
framework
{
namespace
framework
{
namespace
ir
{
namespace
ir
{
class
Node
;
class
Node
;
ReverseRollFusePass
::
ReverseRollFusePass
()
{
ReverseRollFusePass
::
ReverseRollFusePass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"reshape2"
))
AddOpCompat
(
OpCompat
(
"reshape2"
))
.
AddInput
(
"X"
)
.
AddInput
(
"X"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/reverse_roll_fuse_pass.h
浏览文件 @
30a02d27
...
@@ -54,7 +54,7 @@ namespace ir {
...
@@ -54,7 +54,7 @@ namespace ir {
class
ReverseRollFusePass
:
public
FusePassBase
{
class
ReverseRollFusePass
:
public
FusePassBase
{
public:
public:
ReverseRollFusePass
();
ReverseRollFusePass
();
virtual
~
ReverseRollFusePass
()
{}
virtual
~
ReverseRollFusePass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc
浏览文件 @
30a02d27
...
@@ -31,7 +31,7 @@ namespace ir {
...
@@ -31,7 +31,7 @@ namespace ir {
GET_IR_NODE(reshape2_op); \
GET_IR_NODE(reshape2_op); \
GET_IR_NODE(reshape2_out);
GET_IR_NODE(reshape2_out);
ShuffleChannelDetectPass
::
ShuffleChannelDetectPass
()
{
ShuffleChannelDetectPass
::
ShuffleChannelDetectPass
()
{
// NOLINT
AddOpCompat
(
OpCompat
(
"reshape2"
))
AddOpCompat
(
OpCompat
(
"reshape2"
))
.
AddInput
(
"X"
)
.
AddInput
(
"X"
)
.
IsTensor
()
.
IsTensor
()
...
...
paddle/fluid/framework/ir/shuffle_channel_detect_pass.h
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ class Graph;
...
@@ -27,7 +27,7 @@ class Graph;
class
ShuffleChannelDetectPass
:
public
FusePassBase
{
class
ShuffleChannelDetectPass
:
public
FusePassBase
{
public:
public:
ShuffleChannelDetectPass
();
ShuffleChannelDetectPass
();
virtual
~
ShuffleChannelDetectPass
()
{}
virtual
~
ShuffleChannelDetectPass
()
=
default
;
protected:
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/framework/ir/sigmoid_elementmul_fuse_pass.cc
浏览文件 @
30a02d27
...
@@ -67,7 +67,7 @@ SigmoidElementmulFusePattern::SigmoidElementmulFusePattern(
...
@@ -67,7 +67,7 @@ SigmoidElementmulFusePattern::SigmoidElementmulFusePattern(
}
// namespace patterns
}
// namespace patterns
SigmoidElementmulFusePass
::
SigmoidElementmulFusePass
()
{}
SigmoidElementmulFusePass
::
SigmoidElementmulFusePass
()
=
default
;
void
SigmoidElementmulFusePass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
void
SigmoidElementmulFusePass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
PADDLE_ENFORCE_NOT_NULL
(
PADDLE_ENFORCE_NOT_NULL
(
...
...
paddle/fluid/framework/ir/trt_map_ops_to_matrix_multiply_pass.cc
浏览文件 @
30a02d27
...
@@ -28,7 +28,7 @@ namespace ir {
...
@@ -28,7 +28,7 @@ namespace ir {
class
Node
;
class
Node
;
TrtMapOpsToMatrixMultiplyPass
::
TrtMapOpsToMatrixMultiplyPass
()
{}
TrtMapOpsToMatrixMultiplyPass
::
TrtMapOpsToMatrixMultiplyPass
()
=
default
;
void
TrtMapOpsToMatrixMultiplyPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
void
TrtMapOpsToMatrixMultiplyPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
PADDLE_ENFORCE_NOT_NULL
(
PADDLE_ENFORCE_NOT_NULL
(
...
...
paddle/fluid/framework/ir/yolo_box_fuse_pass.cc
浏览文件 @
30a02d27
...
@@ -149,7 +149,7 @@ struct YoloBoxPattern : public PatternBase {
...
@@ -149,7 +149,7 @@ struct YoloBoxPattern : public PatternBase {
};
};
}
// namespace patterns
}
// namespace patterns
YoloBoxFusePass
::
YoloBoxFusePass
()
{}
YoloBoxFusePass
::
YoloBoxFusePass
()
=
default
;
void
YoloBoxFusePass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
void
YoloBoxFusePass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
PADDLE_ENFORCE_NOT_NULL
(
PADDLE_ENFORCE_NOT_NULL
(
...
...
paddle/fluid/framework/new_executor/garbage_collector/no_event_garbage_collector.cc
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ InterpreterCoreNoEventGarbageCollector::
...
@@ -27,7 +27,7 @@ InterpreterCoreNoEventGarbageCollector::
}
}
InterpreterCoreNoEventGarbageCollector
::
InterpreterCoreNoEventGarbageCollector
::
~
InterpreterCoreNoEventGarbageCollector
()
{
~
InterpreterCoreNoEventGarbageCollector
()
{
// NOLINT
queue_
.
reset
(
nullptr
);
queue_
.
reset
(
nullptr
);
}
}
...
...
paddle/fluid/framework/new_executor/new_executor_defs.cc
浏览文件 @
30a02d27
...
@@ -37,7 +37,7 @@ VariableScope::VariableScope(Scope* scope) {
...
@@ -37,7 +37,7 @@ VariableScope::VariableScope(Scope* scope) {
"You have passed a nullptr to construct VariableScope."
));
"You have passed a nullptr to construct VariableScope."
));
}
}
VariableScope
::~
VariableScope
()
{}
VariableScope
::~
VariableScope
()
=
default
;
Scope
*
VariableScope
::
GetMutableScope
()
const
{
return
scope_
;
}
Scope
*
VariableScope
::
GetMutableScope
()
const
{
return
scope_
;
}
...
...
paddle/fluid/framework/phi_utils.cc
浏览文件 @
30a02d27
...
@@ -40,7 +40,7 @@ class KernelArgsNameMakerByOpProto : public KernelArgsNameMaker {
...
@@ -40,7 +40,7 @@ class KernelArgsNameMakerByOpProto : public KernelArgsNameMaker {
platform
::
errors
::
InvalidArgument
(
"Op proto cannot be nullptr."
));
platform
::
errors
::
InvalidArgument
(
"Op proto cannot be nullptr."
));
}
}
~
KernelArgsNameMakerByOpProto
()
override
{}
~
KernelArgsNameMakerByOpProto
()
override
=
default
;
const
paddle
::
small_vector
<
const
char
*>&
GetInputArgsNames
()
override
;
const
paddle
::
small_vector
<
const
char
*>&
GetInputArgsNames
()
override
;
const
paddle
::
small_vector
<
const
char
*>&
GetOutputArgsNames
()
override
;
const
paddle
::
small_vector
<
const
char
*>&
GetOutputArgsNames
()
override
;
...
...
paddle/fluid/framework/program_utils.cc
浏览文件 @
30a02d27
...
@@ -187,7 +187,7 @@ void ProgramProcessor::AddDepToBlockOp(const BlockDesc &block) {
...
@@ -187,7 +187,7 @@ void ProgramProcessor::AddDepToBlockOp(const BlockDesc &block) {
}
}
}
}
ProgramProcessor
::
ProgramProcessor
()
{}
ProgramProcessor
::
ProgramProcessor
()
=
default
;
}
// namespace framework
}
// namespace framework
}
// namespace paddle
}
// namespace paddle
paddle/fluid/framework/reader.cc
浏览文件 @
30a02d27
...
@@ -72,7 +72,7 @@ void ReaderBase::Start() {
...
@@ -72,7 +72,7 @@ void ReaderBase::Start() {
}
}
}
}
ReaderBase
::~
ReaderBase
()
{}
ReaderBase
::~
ReaderBase
()
=
default
;
DecoratedReader
::~
DecoratedReader
()
{
DecoratedReader
::~
DecoratedReader
()
{
VLOG
(
1
)
<<
"~DecoratedReader"
;
VLOG
(
1
)
<<
"~DecoratedReader"
;
...
...
paddle/fluid/framework/var_type_traits.cc
浏览文件 @
30a02d27
...
@@ -114,7 +114,7 @@ struct VarIdToTypeIndexMapHolder {
...
@@ -114,7 +114,7 @@ struct VarIdToTypeIndexMapHolder {
}
}
private:
private:
VarIdToTypeIndexMapHolder
()
{
VarIdToTypeIndexMapHolder
()
{
// NOLINT
VarIdToTypeIndexMapInitializer
::
Init
(
&
id_to_type_map_
,
&
type_to_id_map_
);
VarIdToTypeIndexMapInitializer
::
Init
(
&
id_to_type_map_
,
&
type_to_id_map_
);
}
}
...
...
paddle/fluid/imperative/amp_auto_cast.cc
浏览文件 @
30a02d27
...
@@ -131,7 +131,9 @@ AutoCastGuard::AutoCastGuard(std::shared_ptr<Tracer> tracer, AmpLevel level)
...
@@ -131,7 +131,9 @@ AutoCastGuard::AutoCastGuard(std::shared_ptr<Tracer> tracer, AmpLevel level)
}
}
}
}
AutoCastGuard
::~
AutoCastGuard
()
{
tracer_
->
SetAmpLevel
(
pre_amp_level_
);
}
AutoCastGuard
::~
AutoCastGuard
()
{
// NOLINT
tracer_
->
SetAmpLevel
(
pre_amp_level_
);
}
AmpOperators
::
AmpOperators
()
AmpOperators
::
AmpOperators
()
:
allow_ops_
(
new
std
::
unordered_set
<
std
::
string
>
()),
:
allow_ops_
(
new
std
::
unordered_set
<
std
::
string
>
()),
...
@@ -163,7 +165,7 @@ AmpOperators::AmpOperators()
...
@@ -163,7 +165,7 @@ AmpOperators::AmpOperators()
<<
unsupported_bf16_ops_
->
size
();
<<
unsupported_bf16_ops_
->
size
();
}
}
AmpOperators
::~
AmpOperators
()
{}
AmpOperators
::~
AmpOperators
()
=
default
;
AmpOperators
&
AmpOperators
::
Instance
()
{
AmpOperators
&
AmpOperators
::
Instance
()
{
static
AmpOperators
instance
;
static
AmpOperators
instance
;
...
...
paddle/fluid/inference/analysis/analyzer.cc
浏览文件 @
30a02d27
...
@@ -23,7 +23,7 @@ namespace paddle {
...
@@ -23,7 +23,7 @@ namespace paddle {
namespace
inference
{
namespace
inference
{
namespace
analysis
{
namespace
analysis
{
Analyzer
::
Analyzer
()
{}
Analyzer
::
Analyzer
()
=
default
;
void
Analyzer
::
Run
(
Argument
*
argument
)
{
RunAnalysis
(
argument
);
}
void
Analyzer
::
Run
(
Argument
*
argument
)
{
RunAnalysis
(
argument
);
}
...
...
paddle/fluid/inference/analysis/passes/passes.cc
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ namespace paddle {
...
@@ -27,7 +27,7 @@ namespace paddle {
namespace
inference
{
namespace
inference
{
namespace
analysis
{
namespace
analysis
{
PassRegistry
::
PassRegistry
()
{
PassRegistry
::
PassRegistry
()
{
// NOLINT
// Register manually to avoid the trivial `USE_OP` like macro for easier use
// Register manually to avoid the trivial `USE_OP` like macro for easier use
// and link.
// and link.
passes_
.
emplace
(
"ir_analysis_pass"
,
passes_
.
emplace
(
"ir_analysis_pass"
,
...
...
paddle/fluid/inference/api/resource_manager.cc
浏览文件 @
30a02d27
...
@@ -50,7 +50,7 @@ class EigenGpuStreamDevice : public Eigen::StreamInterface {
...
@@ -50,7 +50,7 @@ class EigenGpuStreamDevice : public Eigen::StreamInterface {
EigenGpuStreamDevice
()
:
scratch_
(
nullptr
),
semaphore_
(
nullptr
)
{
EigenGpuStreamDevice
()
:
scratch_
(
nullptr
),
semaphore_
(
nullptr
)
{
Eigen
::
initializeDeviceProp
();
Eigen
::
initializeDeviceProp
();
}
}
~
EigenGpuStreamDevice
()
override
{}
~
EigenGpuStreamDevice
()
override
=
default
;
void
Reinitialize
(
gpuStream_t
cuda_stream
,
void
Reinitialize
(
gpuStream_t
cuda_stream
,
phi
::
Allocator
*
allocator
,
phi
::
Allocator
*
allocator
,
...
...
paddle/fluid/inference/tensorrt/convert/activation_op.cc
浏览文件 @
30a02d27
...
@@ -29,7 +29,7 @@ namespace tensorrt {
...
@@ -29,7 +29,7 @@ namespace tensorrt {
class
ActivationOpConverter
:
public
OpConverter
{
class
ActivationOpConverter
:
public
OpConverter
{
public:
public:
ActivationOpConverter
()
{}
ActivationOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/convert/elementwise_op.cc
浏览文件 @
30a02d27
...
@@ -21,7 +21,7 @@ namespace tensorrt {
...
@@ -21,7 +21,7 @@ namespace tensorrt {
class
ElementwiseTensorOpConverter
:
public
OpConverter
{
class
ElementwiseTensorOpConverter
:
public
OpConverter
{
public:
public:
ElementwiseTensorOpConverter
()
{}
ElementwiseTensorOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
@@ -325,7 +325,7 @@ class ElementwiseTensorModOpConverter : public ElementwiseTensorOpConverter {
...
@@ -325,7 +325,7 @@ class ElementwiseTensorModOpConverter : public ElementwiseTensorOpConverter {
// https://github.com/PaddlePaddle/Paddle/blob/release/2.4/python/paddle/tensor/math.py#L420
// https://github.com/PaddlePaddle/Paddle/blob/release/2.4/python/paddle/tensor/math.py#L420
class
PowOpConverter
:
public
OpConverter
{
class
PowOpConverter
:
public
OpConverter
{
public:
public:
PowOpConverter
()
{}
PowOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/convert/equal_op.cc
浏览文件 @
30a02d27
...
@@ -21,7 +21,7 @@ namespace tensorrt {
...
@@ -21,7 +21,7 @@ namespace tensorrt {
class
EqualOpConverter
:
public
OpConverter
{
class
EqualOpConverter
:
public
OpConverter
{
public:
public:
EqualOpConverter
()
{}
EqualOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
@@ -74,7 +74,7 @@ class EqualOpConverter : public OpConverter {
...
@@ -74,7 +74,7 @@ class EqualOpConverter : public OpConverter {
class
NotEqualOpConverter
:
public
OpConverter
{
class
NotEqualOpConverter
:
public
OpConverter
{
public:
public:
NotEqualOpConverter
()
{}
NotEqualOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/convert/square_op.cc
浏览文件 @
30a02d27
...
@@ -20,7 +20,7 @@ namespace tensorrt {
...
@@ -20,7 +20,7 @@ namespace tensorrt {
class
SquareOpConverter
:
public
OpConverter
{
class
SquareOpConverter
:
public
OpConverter
{
public:
public:
SquareOpConverter
()
{}
SquareOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/convert/top_k_op.cc
浏览文件 @
30a02d27
...
@@ -29,7 +29,7 @@ namespace tensorrt {
...
@@ -29,7 +29,7 @@ namespace tensorrt {
class
TopKOpConverter
:
public
OpConverter
{
class
TopKOpConverter
:
public
OpConverter
{
public:
public:
TopKOpConverter
()
{}
TopKOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/convert/unary_op.cc
浏览文件 @
30a02d27
...
@@ -29,7 +29,7 @@ namespace tensorrt {
...
@@ -29,7 +29,7 @@ namespace tensorrt {
class
UnaryOpConverter
:
public
OpConverter
{
class
UnaryOpConverter
:
public
OpConverter
{
public:
public:
UnaryOpConverter
()
{}
UnaryOpConverter
()
=
default
;
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
void
operator
()(
const
framework
::
proto
::
OpDesc
&
op
,
const
framework
::
Scope
&
scope
,
const
framework
::
Scope
&
scope
,
bool
test_mode
)
override
{
bool
test_mode
)
override
{
...
...
paddle/fluid/inference/tensorrt/dynamic_shape_infermeta.cc
浏览文件 @
30a02d27
...
@@ -23,7 +23,7 @@ namespace tensorrt {
...
@@ -23,7 +23,7 @@ namespace tensorrt {
class
ExprWrapper
{
class
ExprWrapper
{
public:
public:
ExprWrapper
()
{}
ExprWrapper
()
=
default
;
ExprWrapper
(
const
nvinfer1
::
IDimensionExpr
*
expr
,
ExprWrapper
(
const
nvinfer1
::
IDimensionExpr
*
expr
,
nvinfer1
::
IExprBuilder
*
expr_builder
)
{
nvinfer1
::
IExprBuilder
*
expr_builder
)
{
this
->
expr
=
expr
;
this
->
expr
=
expr
;
...
...
paddle/fluid/inference/tensorrt/op_teller.cc
浏览文件 @
30a02d27
...
@@ -35,7 +35,7 @@ namespace tensorrt {
...
@@ -35,7 +35,7 @@ namespace tensorrt {
// Just tell by the op_types.
// Just tell by the op_types.
struct
SimpleOpTypeSetTeller
:
public
Teller
{
struct
SimpleOpTypeSetTeller
:
public
Teller
{
SimpleOpTypeSetTeller
()
{
SimpleOpTypeSetTeller
()
{
// NOLINT
#if IS_TRT_VERSION_GE(7130)
#if IS_TRT_VERSION_GE(7130)
// use TensorRT plugin
// use TensorRT plugin
teller_set
.
insert
(
"group_norm"
);
teller_set
.
insert
(
"group_norm"
);
...
@@ -3083,7 +3083,7 @@ struct SimpleOpTypeSetTeller : public Teller {
...
@@ -3083,7 +3083,7 @@ struct SimpleOpTypeSetTeller : public Teller {
struct
GenericPluginTeller
:
public
Teller
{
struct
GenericPluginTeller
:
public
Teller
{
public:
public:
GenericPluginTeller
()
{}
GenericPluginTeller
()
=
default
;
bool
operator
()(
const
framework
::
OpDesc
&
desc
,
bool
operator
()(
const
framework
::
OpDesc
&
desc
,
bool
use_no_calib_int8
=
false
,
bool
use_no_calib_int8
=
false
,
bool
with_dynamic_shape
=
false
)
override
{
bool
with_dynamic_shape
=
false
)
override
{
...
@@ -3125,7 +3125,7 @@ struct GenericPluginTeller : public Teller {
...
@@ -3125,7 +3125,7 @@ struct GenericPluginTeller : public Teller {
struct
CustomPluginTeller
:
public
Teller
{
struct
CustomPluginTeller
:
public
Teller
{
public:
public:
CustomPluginTeller
()
{}
CustomPluginTeller
()
=
default
;
bool
operator
()(
const
framework
::
OpDesc
&
desc
,
bool
operator
()(
const
framework
::
OpDesc
&
desc
,
bool
use_no_calib_int8
=
false
,
bool
use_no_calib_int8
=
false
,
bool
with_dynamic_shape
=
false
)
override
{
bool
with_dynamic_shape
=
false
)
override
{
...
@@ -3178,7 +3178,7 @@ bool OpTeller::Tell(const framework::ir::Node* node,
...
@@ -3178,7 +3178,7 @@ bool OpTeller::Tell(const framework::ir::Node* node,
return
false
;
return
false
;
}
}
OpTeller
::
OpTeller
()
{
OpTeller
::
OpTeller
()
{
// NOLINT
tellers_
.
emplace_back
(
new
tensorrt
::
SimpleOpTypeSetTeller
);
tellers_
.
emplace_back
(
new
tensorrt
::
SimpleOpTypeSetTeller
);
tellers_
.
emplace_back
(
new
tensorrt
::
GenericPluginTeller
);
tellers_
.
emplace_back
(
new
tensorrt
::
GenericPluginTeller
);
tellers_
.
emplace_back
(
new
tensorrt
::
CustomPluginTeller
);
tellers_
.
emplace_back
(
new
tensorrt
::
CustomPluginTeller
);
...
...
paddle/fluid/inference/tensorrt/plugin/many_emb_layernorm_plugin.cu
浏览文件 @
30a02d27
...
@@ -405,7 +405,7 @@ char const* EmbLayerNormPlugin::getPluginNamespace() const noexcept {
...
@@ -405,7 +405,7 @@ char const* EmbLayerNormPlugin::getPluginNamespace() const noexcept {
return
mNamespace
.
c_str
();
return
mNamespace
.
c_str
();
}
}
EmbLayerNormPluginCreator
::
EmbLayerNormPluginCreator
()
{}
EmbLayerNormPluginCreator
::
EmbLayerNormPluginCreator
()
=
default
;
char
const
*
EmbLayerNormPluginCreator
::
getPluginName
()
const
noexcept
{
char
const
*
EmbLayerNormPluginCreator
::
getPluginName
()
const
noexcept
{
return
EMB_LAYER_NORM_NAME
;
return
EMB_LAYER_NORM_NAME
;
...
...
paddle/fluid/inference/tensorrt/plugin/many_emb_layernorm_varseqlen_plugin.cu
浏览文件 @
30a02d27
...
@@ -771,7 +771,7 @@ char const* EmbLayerNormVarSeqlenPluginBase::getPluginNamespace()
...
@@ -771,7 +771,7 @@ char const* EmbLayerNormVarSeqlenPluginBase::getPluginNamespace()
}
}
EmbLayerNormVarSeqlenPluginBaseCreator
::
EmbLayerNormVarSeqlenPluginBaseCreator
::
EmbLayerNormVarSeqlenPluginBaseCreator
()
{}
EmbLayerNormVarSeqlenPluginBaseCreator
()
=
default
;
char
const
*
EmbLayerNormVarSeqlenPluginBaseCreator
::
getPluginName
()
char
const
*
EmbLayerNormVarSeqlenPluginBaseCreator
::
getPluginName
()
const
noexcept
{
const
noexcept
{
...
...
paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu
浏览文件 @
30a02d27
...
@@ -405,7 +405,7 @@ void RoiAlignPluginDynamic::serialize(void* buffer) const TRT_NOEXCEPT {
...
@@ -405,7 +405,7 @@ void RoiAlignPluginDynamic::serialize(void* buffer) const TRT_NOEXCEPT {
void
RoiAlignPluginDynamic
::
destroy
()
TRT_NOEXCEPT
{}
void
RoiAlignPluginDynamic
::
destroy
()
TRT_NOEXCEPT
{}
RoiAlignPluginDynamicCreator
::
RoiAlignPluginDynamicCreator
()
{}
RoiAlignPluginDynamicCreator
::
RoiAlignPluginDynamicCreator
()
=
default
;
void
RoiAlignPluginDynamicCreator
::
setPluginNamespace
(
const
char
*
lib_namespace
)
void
RoiAlignPluginDynamicCreator
::
setPluginNamespace
(
const
char
*
lib_namespace
)
TRT_NOEXCEPT
{
TRT_NOEXCEPT
{
...
...
paddle/fluid/inference/tensorrt/plugin/stack_op_plugin.cu
浏览文件 @
30a02d27
...
@@ -36,7 +36,7 @@ StackPluginDynamic::StackPluginDynamic(void const* serial_data,
...
@@ -36,7 +36,7 @@ StackPluginDynamic::StackPluginDynamic(void const* serial_data,
DeserializeValue
(
&
serial_data
,
&
serial_length
,
&
with_fp16_
);
DeserializeValue
(
&
serial_data
,
&
serial_length
,
&
with_fp16_
);
}
}
StackPluginDynamic
::~
StackPluginDynamic
()
{}
StackPluginDynamic
::~
StackPluginDynamic
()
=
default
;
nvinfer1
::
IPluginV2DynamicExt
*
StackPluginDynamic
::
clone
()
const
TRT_NOEXCEPT
{
nvinfer1
::
IPluginV2DynamicExt
*
StackPluginDynamic
::
clone
()
const
TRT_NOEXCEPT
{
return
new
StackPluginDynamic
(
axis_
,
num_stack_
,
with_fp16_
);
return
new
StackPluginDynamic
(
axis_
,
num_stack_
,
with_fp16_
);
...
@@ -230,7 +230,7 @@ int StackPluginDynamic::enqueue(const nvinfer1::PluginTensorDesc* input_desc,
...
@@ -230,7 +230,7 @@ int StackPluginDynamic::enqueue(const nvinfer1::PluginTensorDesc* input_desc,
return
cudaGetLastError
()
!=
cudaSuccess
;
return
cudaGetLastError
()
!=
cudaSuccess
;
}
}
StackPluginDynamicCreator
::
StackPluginDynamicCreator
()
{}
StackPluginDynamicCreator
::
StackPluginDynamicCreator
()
=
default
;
const
char
*
StackPluginDynamicCreator
::
getPluginName
()
const
TRT_NOEXCEPT
{
const
char
*
StackPluginDynamicCreator
::
getPluginName
()
const
TRT_NOEXCEPT
{
return
"stack_plugin"
;
return
"stack_plugin"
;
...
...
paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu
浏览文件 @
30a02d27
...
@@ -437,7 +437,7 @@ nvinfer1::IPluginV2Ext* YoloBoxPlugin::clone() const TRT_NOEXCEPT {
...
@@ -437,7 +437,7 @@ nvinfer1::IPluginV2Ext* YoloBoxPlugin::clone() const TRT_NOEXCEPT {
input_w_
);
input_w_
);
}
}
YoloBoxPluginCreator
::
YoloBoxPluginCreator
()
{}
YoloBoxPluginCreator
::
YoloBoxPluginCreator
()
=
default
;
void
YoloBoxPluginCreator
::
setPluginNamespace
(
const
char
*
lib_namespace
)
void
YoloBoxPluginCreator
::
setPluginNamespace
(
const
char
*
lib_namespace
)
TRT_NOEXCEPT
{
TRT_NOEXCEPT
{
...
...
paddle/fluid/ir_adaptor/translator/attribute_translator.cc
浏览文件 @
30a02d27
...
@@ -34,7 +34,7 @@ class AttributeVisitor {
...
@@ -34,7 +34,7 @@ class AttributeVisitor {
public:
public:
ir
::
IrContext
*
ctx
;
ir
::
IrContext
*
ctx
;
AttributeVisitor
()
{
ctx
=
ir
::
IrContext
::
Instance
();
}
AttributeVisitor
()
{
ctx
=
ir
::
IrContext
::
Instance
();
}
~
AttributeVisitor
()
{}
~
AttributeVisitor
()
=
default
;
public:
public:
virtual
ir
::
Attribute
operator
()(
int
i
)
{
virtual
ir
::
Attribute
operator
()(
int
i
)
{
...
...
paddle/fluid/memory/allocation/allocator_facade.cc
浏览文件 @
30a02d27
...
@@ -127,7 +127,7 @@ class CUDAGraphAllocator
...
@@ -127,7 +127,7 @@ class CUDAGraphAllocator
:
underlying_allocator_
(
allocator
)
{}
:
underlying_allocator_
(
allocator
)
{}
public:
public:
~
CUDAGraphAllocator
()
override
{}
~
CUDAGraphAllocator
()
override
=
default
;
static
std
::
shared_ptr
<
Allocator
>
Create
(
static
std
::
shared_ptr
<
Allocator
>
Create
(
const
std
::
shared_ptr
<
Allocator
>&
allocator
)
{
const
std
::
shared_ptr
<
Allocator
>&
allocator
)
{
...
@@ -1272,7 +1272,7 @@ AllocatorFacadePrivate::AllocatorMap AllocatorFacadePrivate::system_allocators_;
...
@@ -1272,7 +1272,7 @@ AllocatorFacadePrivate::AllocatorMap AllocatorFacadePrivate::system_allocators_;
AllocatorFacade
::
AllocatorFacade
()
:
m_
(
new
AllocatorFacadePrivate
())
{}
AllocatorFacade
::
AllocatorFacade
()
:
m_
(
new
AllocatorFacadePrivate
())
{}
// delete m_ may cause core dump when the destructor of python in conflict with
// delete m_ may cause core dump when the destructor of python in conflict with
// cpp.
// cpp.
AllocatorFacade
::~
AllocatorFacade
()
{}
AllocatorFacade
::~
AllocatorFacade
()
=
default
;
AllocatorFacade
&
AllocatorFacade
::
Instance
()
{
AllocatorFacade
&
AllocatorFacade
::
Instance
()
{
static
AllocatorFacade
*
instance
=
new
AllocatorFacade
;
static
AllocatorFacade
*
instance
=
new
AllocatorFacade
;
...
...
paddle/fluid/operators/collective/c_comm_init_all_op.cc
浏览文件 @
30a02d27
...
@@ -38,7 +38,7 @@ namespace operators {
...
@@ -38,7 +38,7 @@ namespace operators {
class
CCommInitAllInferShape
:
public
framework
::
InferShapeBase
{
class
CCommInitAllInferShape
:
public
framework
::
InferShapeBase
{
public:
public:
~
CCommInitAllInferShape
()
override
{}
~
CCommInitAllInferShape
()
override
=
default
;
void
operator
()(
framework
::
InferShapeContext
*
ctx
)
const
override
{};
void
operator
()(
framework
::
InferShapeContext
*
ctx
)
const
override
{};
};
};
...
...
paddle/fluid/operators/collective/c_comm_init_multitrainer_op.cc
浏览文件 @
30a02d27
...
@@ -38,7 +38,7 @@ namespace operators {
...
@@ -38,7 +38,7 @@ namespace operators {
class
CCommInitMultiTrainerInferShape
:
public
framework
::
InferShapeBase
{
class
CCommInitMultiTrainerInferShape
:
public
framework
::
InferShapeBase
{
public:
public:
~
CCommInitMultiTrainerInferShape
()
override
{}
~
CCommInitMultiTrainerInferShape
()
override
=
default
;
void
operator
()(
framework
::
InferShapeContext
*
ctx
)
const
override
{};
void
operator
()(
framework
::
InferShapeContext
*
ctx
)
const
override
{};
};
};
...
...
paddle/fluid/operators/fused/fused_fc_elementwise_layernorm_op.cu
浏览文件 @
30a02d27
...
@@ -44,7 +44,7 @@ static __device__ __forceinline__ double RealSqrt(double x) { return sqrt(x); }
...
@@ -44,7 +44,7 @@ static __device__ __forceinline__ double RealSqrt(double x) { return sqrt(x); }
template
<
typename
T
>
template
<
typename
T
>
struct
PairForLayerNorm
{
struct
PairForLayerNorm
{
__device__
__forceinline__
PairForLayerNorm
()
{}
__device__
__forceinline__
PairForLayerNorm
()
=
default
;
__device__
__forceinline__
PairForLayerNorm
(
const
T
&
first
,
const
T
&
second
)
__device__
__forceinline__
PairForLayerNorm
(
const
T
&
first
,
const
T
&
second
)
:
first_
(
first
),
second_
(
second
)
{}
:
first_
(
first
),
second_
(
second
)
{}
...
...
paddle/fluid/operators/math/beam_search.cc
浏览文件 @
30a02d27
...
@@ -113,7 +113,7 @@ class BeamSearchFunctor<phi::CPUContext, T> {
...
@@ -113,7 +113,7 @@ class BeamSearchFunctor<phi::CPUContext, T> {
* The basic items help to sort.
* The basic items help to sort.
*/
*/
struct
Item
{
struct
Item
{
Item
()
{}
Item
()
=
default
;
Item
(
size_t
offset
,
size_t
id
,
float
score
)
Item
(
size_t
offset
,
size_t
id
,
float
score
)
:
offset
(
offset
),
id
(
id
),
score
(
score
)
{}
:
offset
(
offset
),
id
(
id
),
score
(
score
)
{}
// offset in the higher lod level.
// offset in the higher lod level.
...
...
paddle/fluid/operators/math/beam_search.cu
浏览文件 @
30a02d27
...
@@ -21,7 +21,7 @@ namespace operators {
...
@@ -21,7 +21,7 @@ namespace operators {
namespace
math
{
namespace
math
{
struct
Triple
{
struct
Triple
{
__device__
__forceinline__
Triple
()
{}
__device__
__forceinline__
Triple
()
=
default
;
__device__
__forceinline__
Triple
(
int
o
,
int
i
,
float
s
)
__device__
__forceinline__
Triple
(
int
o
,
int
i
,
float
s
)
:
offset
(
o
),
id
(
i
),
score
(
s
)
{}
:
offset
(
o
),
id
(
i
),
score
(
s
)
{}
...
...
paddle/fluid/operators/math/sampler.cc
浏览文件 @
30a02d27
...
@@ -22,7 +22,7 @@ namespace paddle {
...
@@ -22,7 +22,7 @@ namespace paddle {
namespace
operators
{
namespace
operators
{
namespace
math
{
namespace
math
{
Sampler
::~
Sampler
()
{}
Sampler
::~
Sampler
()
=
default
;
UniformSampler
::
UniformSampler
(
int64_t
range
,
unsigned
int
seed
)
UniformSampler
::
UniformSampler
(
int64_t
range
,
unsigned
int
seed
)
:
Sampler
(
range
,
seed
),
inv_range_
(
1.0
/
(
range
+
1
))
{
:
Sampler
(
range
,
seed
),
inv_range_
(
1.0
/
(
range
+
1
))
{
...
...
paddle/fluid/operators/reader/py_reader.cc
浏览文件 @
30a02d27
...
@@ -36,7 +36,9 @@ void PyReader::ReadNext(paddle::framework::LoDTensorArray* out) {
...
@@ -36,7 +36,9 @@ void PyReader::ReadNext(paddle::framework::LoDTensorArray* out) {
if
(
!
success
)
out
->
clear
();
if
(
!
success
)
out
->
clear
();
}
}
PyReader
::~
PyReader
()
{
queue_
->
Close
();
}
PyReader
::~
PyReader
()
{
// NOLINT
queue_
->
Close
();
}
void
PyReader
::
Shutdown
()
{
queue_
->
Close
();
}
void
PyReader
::
Shutdown
()
{
queue_
->
Close
();
}
...
...
paddle/fluid/platform/profiler/cuda_tracer.cc
浏览文件 @
30a02d27
...
@@ -47,7 +47,7 @@ std::unordered_map<uint32_t, uint64_t> CreateThreadIdMapping() {
...
@@ -47,7 +47,7 @@ std::unordered_map<uint32_t, uint64_t> CreateThreadIdMapping() {
}
}
}
// namespace details
}
// namespace details
CudaTracer
::
CudaTracer
()
{}
CudaTracer
::
CudaTracer
()
=
default
;
void
CudaTracer
::
PrepareTracing
()
{
void
CudaTracer
::
PrepareTracing
()
{
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
...
...
paddle/fluid/platform/profiler/custom_device/custom_tracer.cc
浏览文件 @
30a02d27
...
@@ -32,7 +32,7 @@ CustomTracer::CustomTracer(const std::string& dev_type) : dev_type_(dev_type) {
...
@@ -32,7 +32,7 @@ CustomTracer::CustomTracer(const std::string& dev_type) : dev_type_(dev_type) {
#endif
#endif
}
}
CustomTracer
::~
CustomTracer
()
{
CustomTracer
::~
CustomTracer
()
{
// NOLINT
#ifdef PADDLE_WITH_CUSTOM_DEVICE
#ifdef PADDLE_WITH_CUSTOM_DEVICE
phi
::
DeviceManager
::
ProfilerFinalize
(
dev_type_
,
&
collector_
,
context_
);
phi
::
DeviceManager
::
ProfilerFinalize
(
dev_type_
,
&
collector_
,
context_
);
#endif
#endif
...
...
paddle/ir/core/ir_context.cc
浏览文件 @
30a02d27
...
@@ -29,7 +29,7 @@ namespace ir {
...
@@ -29,7 +29,7 @@ namespace ir {
// AbstractType, TypeStorage, AbstractAttribute, AttributeStorage, Dialect.
// AbstractType, TypeStorage, AbstractAttribute, AttributeStorage, Dialect.
class
IrContextImpl
{
class
IrContextImpl
{
public:
public:
IrContextImpl
()
{}
IrContextImpl
()
=
default
;
~
IrContextImpl
()
{
~
IrContextImpl
()
{
std
::
lock_guard
<
ir
::
SpinLock
>
guard
(
destructor_lock_
);
std
::
lock_guard
<
ir
::
SpinLock
>
guard
(
destructor_lock_
);
...
...
paddle/ir/core/storage_manager.cc
浏览文件 @
30a02d27
...
@@ -66,7 +66,7 @@ struct ParametricStorageManager {
...
@@ -66,7 +66,7 @@ struct ParametricStorageManager {
std
::
function
<
void
(
StorageBase
*
)
>
destroy_
;
std
::
function
<
void
(
StorageBase
*
)
>
destroy_
;
};
};
StorageManager
::
StorageManager
()
{}
StorageManager
::
StorageManager
()
=
default
;
StorageManager
::~
StorageManager
()
=
default
;
StorageManager
::~
StorageManager
()
=
default
;
...
...
paddle/phi/api/include/tensor.h
浏览文件 @
30a02d27
...
@@ -53,7 +53,7 @@ using IntArray = experimental::IntArray;
...
@@ -53,7 +53,7 @@ using IntArray = experimental::IntArray;
class
AbstractAutogradMeta
{
class
AbstractAutogradMeta
{
public:
public:
// No AbstractAutogradMeta should be created
// No AbstractAutogradMeta should be created
virtual
~
AbstractAutogradMeta
()
{}
virtual
~
AbstractAutogradMeta
()
=
default
;
};
};
/**
/**
...
...
paddle/phi/api/lib/tensor.cc
浏览文件 @
30a02d27
...
@@ -403,12 +403,7 @@ void Tensor::reset() {
...
@@ -403,12 +403,7 @@ void Tensor::reset() {
/* Part 6: Operator overloading */
/* Part 6: Operator overloading */
Tensor
&
Tensor
::
operator
=
(
const
Tensor
&
x
)
&
{
Tensor
&
Tensor
::
operator
=
(
const
Tensor
&
x
)
&
=
default
;
impl_
=
x
.
impl_
;
autograd_meta_
=
x
.
autograd_meta_
;
name_
=
x
.
name_
;
return
*
this
;
}
Tensor
&
Tensor
::
operator
=
(
Tensor
&&
x
)
&
{
Tensor
&
Tensor
::
operator
=
(
Tensor
&&
x
)
&
{
impl_
=
std
::
move
(
x
.
impl_
);
impl_
=
std
::
move
(
x
.
impl_
);
...
...
paddle/phi/backends/dynload/dynamic_loader.cc
浏览文件 @
30a02d27
...
@@ -109,7 +109,7 @@ namespace phi {
...
@@ -109,7 +109,7 @@ namespace phi {
namespace
dynload
{
namespace
dynload
{
struct
PathNode
{
struct
PathNode
{
PathNode
()
{}
PathNode
()
=
default
;
std
::
string
path
=
""
;
std
::
string
path
=
""
;
};
};
...
...
paddle/phi/backends/gpu/gpu_context.cc
浏览文件 @
30a02d27
...
@@ -66,7 +66,7 @@ class EigenGpuStreamDevice : public Eigen::StreamInterface {
...
@@ -66,7 +66,7 @@ class EigenGpuStreamDevice : public Eigen::StreamInterface {
EigenGpuStreamDevice
()
:
scratch_
(
nullptr
),
semaphore_
(
nullptr
)
{
EigenGpuStreamDevice
()
:
scratch_
(
nullptr
),
semaphore_
(
nullptr
)
{
Eigen
::
initializeDeviceProp
();
Eigen
::
initializeDeviceProp
();
}
}
~
EigenGpuStreamDevice
()
override
{}
~
EigenGpuStreamDevice
()
override
=
default
;
void
Reinitialize
(
gpuStream_t
cuda_stream
,
void
Reinitialize
(
gpuStream_t
cuda_stream
,
Allocator
*
allocator
,
Allocator
*
allocator
,
...
...
paddle/phi/backends/onednn/onednn_context.cc
浏览文件 @
30a02d27
...
@@ -95,7 +95,7 @@ struct OneDNNContext::Impl {
...
@@ -95,7 +95,7 @@ struct OneDNNContext::Impl {
p_mutex_
.
reset
(
new
std
::
mutex
());
p_mutex_
.
reset
(
new
std
::
mutex
());
}
}
~
Impl
()
{}
~
Impl
()
=
default
;
void
ResetBlobMap
(
void
*
ptr
)
{
void
ResetBlobMap
(
void
*
ptr
)
{
VLOG
(
4
)
<<
OneDNNContext
::
tls
().
get_curr_exec
()
<<
" "
<<
ptr
;
VLOG
(
4
)
<<
OneDNNContext
::
tls
().
get_curr_exec
()
<<
" "
<<
ptr
;
...
...
paddle/phi/kernels/cpu/multiclass_nms3_kernel.cc
浏览文件 @
30a02d27
...
@@ -27,7 +27,7 @@ template <class T>
...
@@ -27,7 +27,7 @@ template <class T>
class
Point_
{
class
Point_
{
public:
public:
// default constructor
// default constructor
Point_
()
{}
Point_
()
=
default
;
Point_
(
T
_x
,
T
_y
)
{}
Point_
(
T
_x
,
T
_y
)
{}
Point_
(
const
Point_
&
pt
UNUSED
)
{}
Point_
(
const
Point_
&
pt
UNUSED
)
{}
...
...
paddle/phi/kernels/cpu/rnn_grad_kernel.cc
浏览文件 @
30a02d27
...
@@ -53,7 +53,7 @@ void CreateLstmGrad(phi::funcs::LstmMetaGrad<T>* lstm_grad) {
...
@@ -53,7 +53,7 @@ void CreateLstmGrad(phi::funcs::LstmMetaGrad<T>* lstm_grad) {
template
<
typename
T
>
template
<
typename
T
>
struct
GradCell
{
struct
GradCell
{
virtual
~
GradCell
()
{}
virtual
~
GradCell
()
=
default
;
virtual
void
operator
()(
const
CPUContext
&
dev_ctx
UNUSED
,
virtual
void
operator
()(
const
CPUContext
&
dev_ctx
UNUSED
,
DenseTensor
*
gate_tensor
UNUSED
,
DenseTensor
*
gate_tensor
UNUSED
,
DenseTensor
*
state_tensor
UNUSED
,
DenseTensor
*
state_tensor
UNUSED
,
...
@@ -355,7 +355,7 @@ struct LSTMGradCell : GradCell<T> {
...
@@ -355,7 +355,7 @@ struct LSTMGradCell : GradCell<T> {
template
<
typename
T
,
typename
GradCellType
>
template
<
typename
T
,
typename
GradCellType
>
struct
GradLayer
{
struct
GradLayer
{
explicit
GradLayer
(
const
GradCellType
&
cell
)
:
cell_
(
cell
)
{}
explicit
GradLayer
(
const
GradCellType
&
cell
)
:
cell_
(
cell
)
{}
virtual
~
GradLayer
()
{}
virtual
~
GradLayer
()
=
default
;
void
run_rnn_grad_function
(
void
run_rnn_grad_function
(
const
CPUContext
&
dev_ctx
,
const
CPUContext
&
dev_ctx
,
const
DenseTensor
*
input
,
const
DenseTensor
*
input
,
...
@@ -690,7 +690,7 @@ struct SingleGradLayer : GradLayer<T, GradCellType> {
...
@@ -690,7 +690,7 @@ struct SingleGradLayer : GradLayer<T, GradCellType> {
// explicit SingleGradLayer(GradCellType& cell) : cell_(cell) {}
// explicit SingleGradLayer(GradCellType& cell) : cell_(cell) {}
explicit
SingleGradLayer
(
const
GradCellType
&
cell
)
explicit
SingleGradLayer
(
const
GradCellType
&
cell
)
:
GradLayer
<
T
,
GradCellType
>
(
cell
)
{}
:
GradLayer
<
T
,
GradCellType
>
(
cell
)
{}
~
SingleGradLayer
()
override
{}
~
SingleGradLayer
()
override
=
default
;
void
operator
()(
const
CPUContext
&
dev_ctx
,
void
operator
()(
const
CPUContext
&
dev_ctx
,
const
DenseTensor
*
input
,
const
DenseTensor
*
input
,
const
DenseTensor
*
output
,
const
DenseTensor
*
output
,
...
@@ -802,7 +802,7 @@ template <typename T, typename GradCellType>
...
@@ -802,7 +802,7 @@ template <typename T, typename GradCellType>
struct
BidirGradLayer
:
GradLayer
<
T
,
GradCellType
>
{
struct
BidirGradLayer
:
GradLayer
<
T
,
GradCellType
>
{
explicit
BidirGradLayer
(
const
GradCellType
&
cell
)
explicit
BidirGradLayer
(
const
GradCellType
&
cell
)
:
GradLayer
<
T
,
GradCellType
>
(
cell
)
{}
:
GradLayer
<
T
,
GradCellType
>
(
cell
)
{}
~
BidirGradLayer
()
override
{}
~
BidirGradLayer
()
override
=
default
;
void
operator
()(
const
CPUContext
&
dev_ctx
,
void
operator
()(
const
CPUContext
&
dev_ctx
,
const
DenseTensor
*
input
,
const
DenseTensor
*
input
,
const
DenseTensor
*
output
,
const
DenseTensor
*
output
,
...
...
paddle/phi/kernels/cpu/rnn_kernel.cc
浏览文件 @
30a02d27
...
@@ -34,7 +34,7 @@ namespace phi {
...
@@ -34,7 +34,7 @@ namespace phi {
template
<
typename
T
>
template
<
typename
T
>
struct
Cell
{
struct
Cell
{
virtual
~
Cell
()
{}
virtual
~
Cell
()
=
default
;
virtual
void
operator
()(
const
CPUContext
*
dev_ctx
UNUSED
,
virtual
void
operator
()(
const
CPUContext
*
dev_ctx
UNUSED
,
DenseTensor
*
input
UNUSED
,
DenseTensor
*
input
UNUSED
,
const
DenseTensor
*
weight_hh
UNUSED
,
const
DenseTensor
*
weight_hh
UNUSED
,
...
@@ -208,7 +208,7 @@ struct LSTMCell : Cell<T> {
...
@@ -208,7 +208,7 @@ struct LSTMCell : Cell<T> {
template
<
typename
T
,
typename
CellType
>
template
<
typename
T
,
typename
CellType
>
struct
Layer
{
struct
Layer
{
explicit
Layer
(
const
CellType
&
cell
)
:
cell_
(
cell
)
{}
explicit
Layer
(
const
CellType
&
cell
)
:
cell_
(
cell
)
{}
virtual
~
Layer
()
{}
virtual
~
Layer
()
=
default
;
void
preprocess
(
const
CPUContext
&
dev_ctx
,
void
preprocess
(
const
CPUContext
&
dev_ctx
,
const
DenseTensor
&
input
,
const
DenseTensor
&
input
,
const
DenseTensor
&
weight
,
const
DenseTensor
&
weight
,
...
...
paddle/phi/kernels/funcs/concat_and_split_functor.cu
浏览文件 @
30a02d27
...
@@ -65,7 +65,7 @@ struct PointerWrapper {
...
@@ -65,7 +65,7 @@ struct PointerWrapper {
const
void
*
ins_addr
[
Size
];
const
void
*
ins_addr
[
Size
];
__device__
inline
const
void
*
operator
[](
int
i
)
const
{
return
ins_addr
[
i
];
}
__device__
inline
const
void
*
operator
[](
int
i
)
const
{
return
ins_addr
[
i
];
}
PointerWrapper
()
{}
PointerWrapper
()
=
default
;
PointerWrapper
(
const
phi
::
GPUContext
&
ctx
,
PointerWrapper
(
const
phi
::
GPUContext
&
ctx
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
T
**
pre_alloced_host_ptr
)
{
const
T
**
pre_alloced_host_ptr
)
{
...
@@ -84,7 +84,7 @@ template <typename T, int Size>
...
@@ -84,7 +84,7 @@ template <typename T, int Size>
struct
PADDLE_ALIGN
(
256
)
AlignedPointerWrapper
struct
PADDLE_ALIGN
(
256
)
AlignedPointerWrapper
:
public
PointerWrapper
<
T
,
Size
>
{
:
public
PointerWrapper
<
T
,
Size
>
{
public:
public:
AlignedPointerWrapper
()
{}
AlignedPointerWrapper
()
=
default
;
AlignedPointerWrapper
(
const
phi
::
GPUContext
&
ctx
,
AlignedPointerWrapper
(
const
phi
::
GPUContext
&
ctx
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
T
**
pre_alloced_host_ptr
)
{
const
T
**
pre_alloced_host_ptr
)
{
...
@@ -98,7 +98,7 @@ struct PointerToPointer {
...
@@ -98,7 +98,7 @@ struct PointerToPointer {
void
**
ins_addr
{
nullptr
};
void
**
ins_addr
{
nullptr
};
__device__
inline
const
void
*
operator
[](
int
i
)
const
{
return
ins_addr
[
i
];
}
__device__
inline
const
void
*
operator
[](
int
i
)
const
{
return
ins_addr
[
i
];
}
PointerToPointer
()
{}
PointerToPointer
()
=
default
;
PointerToPointer
(
const
phi
::
GPUContext
&
ctx
,
PointerToPointer
(
const
phi
::
GPUContext
&
ctx
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
std
::
vector
<
phi
::
DenseTensor
>&
ins
,
const
T
**
pre_alloced_host_ptr
,
const
T
**
pre_alloced_host_ptr
,
...
@@ -186,9 +186,7 @@ struct PointerToPointerAndCol {
...
@@ -186,9 +186,7 @@ struct PointerToPointerAndCol {
template
<
int
MovSize
>
template
<
int
MovSize
>
struct
alignas
(
MovSize
)
Packed
{
struct
alignas
(
MovSize
)
Packed
{
__device__
Packed
()
{
__device__
Packed
()
=
default
;
// do nothing
}
union
{
union
{
char
buf
[
MovSize
];
char
buf
[
MovSize
];
};
};
...
@@ -621,7 +619,7 @@ struct PointerAndColArray
...
@@ -621,7 +619,7 @@ struct PointerAndColArray
public:
public:
funcs
::
ValueArray
<
IndexT
,
Size
>
val_array
;
funcs
::
ValueArray
<
IndexT
,
Size
>
val_array
;
PointerAndColArray
()
{}
PointerAndColArray
()
=
default
;
PointerAndColArray
(
const
phi
::
GPUContext
&
ctx
,
PointerAndColArray
(
const
phi
::
GPUContext
&
ctx
,
const
int
out_col_num
,
const
int
out_col_num
,
IndexT
*
out_cols
,
IndexT
*
out_cols
,
...
...
paddle/phi/kernels/gpu/masked_select_grad_kernel.cu
浏览文件 @
30a02d27
...
@@ -32,7 +32,7 @@ namespace phi {
...
@@ -32,7 +32,7 @@ namespace phi {
template
<
typename
MT
,
typename
InT
,
typename
OutT
>
template
<
typename
MT
,
typename
InT
,
typename
OutT
>
struct
MaskedSelectGradFunctor
{
struct
MaskedSelectGradFunctor
{
HOSTDEVICE
MaskedSelectGradFunctor
()
{}
HOSTDEVICE
MaskedSelectGradFunctor
()
=
default
;
HOSTDEVICE
inline
void
operator
()(
OutT
*
out
,
HOSTDEVICE
inline
void
operator
()(
OutT
*
out
,
const
MT
*
mask
,
const
MT
*
mask
,
...
...
paddle/phi/kernels/gpu/masked_select_kernel.cu
浏览文件 @
30a02d27
...
@@ -30,7 +30,7 @@ namespace phi {
...
@@ -30,7 +30,7 @@ namespace phi {
template
<
typename
MT
,
typename
InT
,
typename
OutT
>
template
<
typename
MT
,
typename
InT
,
typename
OutT
>
struct
MaskedSelectFunctor
{
struct
MaskedSelectFunctor
{
HOSTDEVICE
MaskedSelectFunctor
()
{}
HOSTDEVICE
MaskedSelectFunctor
()
=
default
;
HOSTDEVICE
inline
void
operator
()(
OutT
*
out
,
HOSTDEVICE
inline
void
operator
()(
OutT
*
out
,
const
MT
*
mask
,
const
MT
*
mask
,
...
...
paddle/phi/kernels/gpu/p_norm_kernel.cu
浏览文件 @
30a02d27
...
@@ -63,7 +63,7 @@ __device__ __forceinline__ double inline_pow(double base, double exponent) {
...
@@ -63,7 +63,7 @@ __device__ __forceinline__ double inline_pow(double base, double exponent) {
template
<
typename
T
>
template
<
typename
T
>
struct
NonzeroFunctor
{
struct
NonzeroFunctor
{
HOSTDEVICE
explicit
inline
NonzeroFunctor
()
{}
HOSTDEVICE
explicit
inline
NonzeroFunctor
()
=
default
;
HOSTDEVICE
inline
T
operator
()(
const
T
x
)
const
{
HOSTDEVICE
inline
T
operator
()(
const
T
x
)
const
{
return
static_cast
<
T
>
(
static_cast
<
double
>
(
x
)
!=
0
);
return
static_cast
<
T
>
(
static_cast
<
double
>
(
x
)
!=
0
);
}
}
...
@@ -71,7 +71,7 @@ struct NonzeroFunctor {
...
@@ -71,7 +71,7 @@ struct NonzeroFunctor {
template
<
typename
T
>
template
<
typename
T
>
struct
AbsFunctor
{
struct
AbsFunctor
{
HOSTDEVICE
explicit
inline
AbsFunctor
()
{}
HOSTDEVICE
explicit
inline
AbsFunctor
()
=
default
;
HOSTDEVICE
inline
T
operator
()(
const
T
x
)
const
{
HOSTDEVICE
inline
T
operator
()(
const
T
x
)
const
{
return
static_cast
<
T
>
(
inline_abs
(
x
));
return
static_cast
<
T
>
(
inline_abs
(
x
));
}
}
...
...
paddle/phi/kernels/gpu/rms_norm_kernel.cu
浏览文件 @
30a02d27
...
@@ -177,9 +177,7 @@ typename std::enable_if<HasCanPackAs<T>::value == false, bool>::type CanPackAs(
...
@@ -177,9 +177,7 @@ typename std::enable_if<HasCanPackAs<T>::value == false, bool>::type CanPackAs(
template
<
typename
T
,
int
N
>
template
<
typename
T
,
int
N
>
struct
alignas
(
sizeof
(
T
)
*
N
)
Pack
{
struct
alignas
(
sizeof
(
T
)
*
N
)
Pack
{
__device__
Pack
()
{
__device__
Pack
()
=
default
;
// do nothing
}
T
elem
[
N
];
T
elem
[
N
];
};
};
...
...
test/cpp/fluid/fused/cudnn_bn_add_relu_test.cc
浏览文件 @
30a02d27
...
@@ -375,7 +375,7 @@ class CudnnBNAddReluTester {
...
@@ -375,7 +375,7 @@ class CudnnBNAddReluTester {
SetUp
();
SetUp
();
}
}
~
CudnnBNAddReluTester
()
{}
~
CudnnBNAddReluTester
()
=
default
;
void
CheckForward
(
float
diff
,
bool
is_relative_atol
=
false
)
{
void
CheckForward
(
float
diff
,
bool
is_relative_atol
=
false
)
{
LOG
(
INFO
)
<<
"[CheckForward, diff="
<<
diff
LOG
(
INFO
)
<<
"[CheckForward, diff="
<<
diff
...
...
test/cpp/fluid/fused/cudnn_norm_conv_test.cc
浏览文件 @
30a02d27
...
@@ -235,7 +235,7 @@ class CudnnNormConvolutionTester {
...
@@ -235,7 +235,7 @@ class CudnnNormConvolutionTester {
SetUp
();
SetUp
();
}
}
~
CudnnNormConvolutionTester
()
{}
~
CudnnNormConvolutionTester
()
=
default
;
void
CheckForward
(
float
diff
,
bool
is_relative_atol
=
false
)
{
void
CheckForward
(
float
diff
,
bool
is_relative_atol
=
false
)
{
phi
::
GPUContext
*
ctx
=
static_cast
<
phi
::
GPUContext
*>
(
phi
::
GPUContext
*
ctx
=
static_cast
<
phi
::
GPUContext
*>
(
...
...
test/cpp/fluid/fused/fused_dropout_act_bias_test.cu
浏览文件 @
30a02d27
...
@@ -89,7 +89,7 @@ struct TestFusedDropoutActBias {
...
@@ -89,7 +89,7 @@ struct TestFusedDropoutActBias {
ctx
=
reinterpret_cast
<
phi
::
GPUContext
*>
(
devicectx
);
ctx
=
reinterpret_cast
<
phi
::
GPUContext
*>
(
devicectx
);
}
}
~
TestFusedDropoutActBias
()
{}
~
TestFusedDropoutActBias
()
=
default
;
void
SetUp
()
{
void
SetUp
()
{
const
int
n
=
rows
*
cols
;
const
int
n
=
rows
*
cols
;
...
...
test/cpp/fluid/fused/fused_layernorm_residual_dropout_bias_test.cu
浏览文件 @
30a02d27
...
@@ -95,7 +95,7 @@ struct TestFusedLayernormResidualDropoutBias {
...
@@ -95,7 +95,7 @@ struct TestFusedLayernormResidualDropoutBias {
ctx
=
reinterpret_cast
<
phi
::
GPUContext
*>
(
devicectx
);
ctx
=
reinterpret_cast
<
phi
::
GPUContext
*>
(
devicectx
);
}
}
~
TestFusedLayernormResidualDropoutBias
()
{}
~
TestFusedLayernormResidualDropoutBias
()
=
default
;
void
SetUp
()
{
void
SetUp
()
{
using
U
=
LayerNormParamType
<
T
>
;
using
U
=
LayerNormParamType
<
T
>
;
...
...
test/cpp/inference/api/analyzer_dam_tester.cc
浏览文件 @
30a02d27
...
@@ -35,7 +35,7 @@ struct DataRecord {
...
@@ -35,7 +35,7 @@ struct DataRecord {
size_t
batch_size
{
1
};
size_t
batch_size
{
1
};
size_t
num_samples
;
// total number of samples
size_t
num_samples
;
// total number of samples
DataRecord
()
{
DataRecord
()
{
// NOLINT
turns
=
new
std
::
vector
<
std
::
vector
<
turns
=
new
std
::
vector
<
std
::
vector
<
int64_t
>>
[
FLAGS_max_turn_num
];
// turns data : FLAGS_max_turn_num
int64_t
>>
[
FLAGS_max_turn_num
];
// turns data : FLAGS_max_turn_num
turns_mask
=
new
std
::
vector
<
std
::
vector
<
turns_mask
=
new
std
::
vector
<
std
::
vector
<
...
@@ -48,7 +48,7 @@ struct DataRecord {
...
@@ -48,7 +48,7 @@ struct DataRecord {
Load
(
path
);
Load
(
path
);
}
}
~
DataRecord
()
{
~
DataRecord
()
{
// NOLINT
delete
[]
turns
;
delete
[]
turns
;
delete
[]
turns_mask
;
delete
[]
turns_mask
;
}
}
...
...
test/cpp/inference/api/api_tester.cc
浏览文件 @
30a02d27
...
@@ -50,7 +50,7 @@ class DemoPredictor : public PaddlePredictor {
...
@@ -50,7 +50,7 @@ class DemoPredictor : public PaddlePredictor {
return
nullptr
;
return
nullptr
;
}
}
~
DemoPredictor
()
override
{}
~
DemoPredictor
()
override
=
default
;
};
};
template
<
>
template
<
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录