Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
bafc3469
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
未验证
提交
bafc3469
编写于
5月 09, 2023
作者:
G
Galaxy1458
提交者:
GitHub
5月 09, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove some [-Wunused-parameter]warning (#53617)
* test,test=develop * test,test=develop * test,test=develop * test,test=develop
上级
e588f2d9
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
40 addition
and
37 deletion
+40
-37
paddle/fluid/distributed/collective/process_group_custom.cc
paddle/fluid/distributed/collective/process_group_custom.cc
+1
-1
paddle/fluid/distributed/ps/service/brpc_ps_server.h
paddle/fluid/distributed/ps/service/brpc_ps_server.h
+4
-2
paddle/fluid/distributed/ps/service/communicator/communicator.h
.../fluid/distributed/ps/service/communicator/communicator.h
+10
-10
paddle/fluid/distributed/ps/service/coordinator_client.h
paddle/fluid/distributed/ps/service/coordinator_client.h
+2
-2
paddle/fluid/framework/ir/generate_pass.cc
paddle/fluid/framework/ir/generate_pass.cc
+1
-1
paddle/fluid/framework/trainer.h
paddle/fluid/framework/trainer.h
+1
-1
paddle/fluid/operators/fused/mkldnn/fusion_rnn_mkldnn.h
paddle/fluid/operators/fused/mkldnn/fusion_rnn_mkldnn.h
+5
-5
paddle/fluid/pybind/process_group_utils.h
paddle/fluid/pybind/process_group_utils.h
+2
-2
paddle/phi/backends/onednn/onednn_helper.h
paddle/phi/backends/onednn/onednn_helper.h
+2
-1
paddle/phi/backends/onednn/onednn_reuse.h
paddle/phi/backends/onednn/onednn_reuse.h
+1
-1
paddle/phi/kernels/autotune/cache_base.h
paddle/phi/kernels/autotune/cache_base.h
+1
-1
paddle/phi/kernels/cpu/viterbi_decode_kernel.cc
paddle/phi/kernels/cpu/viterbi_decode_kernel.cc
+1
-1
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/matmul_kernel_impl.h
paddle/phi/kernels/impl/matmul_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/searchsorted_kernel_impl.h
paddle/phi/kernels/impl/searchsorted_kernel_impl.h
+4
-4
paddle/phi/kernels/impl/split_kernel_impl.h
paddle/phi/kernels/impl/split_kernel_impl.h
+1
-1
paddle/phi/kernels/sparse/cpu/full_kernel.cc
paddle/phi/kernels/sparse/cpu/full_kernel.cc
+1
-1
paddle/phi/kernels/sparse/sparse_utils_kernel.h
paddle/phi/kernels/sparse/sparse_utils_kernel.h
+1
-1
未找到文件。
paddle/fluid/distributed/collective/process_group_custom.cc
浏览文件 @
bafc3469
...
...
@@ -189,7 +189,7 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupCustom::Collective(
std
::
vector
<
phi
::
DenseTensor
>&
outputs
,
Fn
fn
,
CommType
op_type
,
bool
sync_op
,
bool
sync_op
UNUSED
,
bool
use_calc_stream
)
{
const
auto
places
=
GetPlaceList
(
inputs
);
const
auto
key
=
GetKeyFromPlaces
(
places
);
...
...
paddle/fluid/distributed/ps/service/brpc_ps_server.h
浏览文件 @
bafc3469
...
...
@@ -227,8 +227,10 @@ class DownpourPServerBrpcClosure : public PServerClosure {
PsRequestMessage
*
request
(
size_t
i
)
{
return
&
_requests
[
i
];
}
PsResponseMessage
*
response
(
size_t
i
)
{
return
&
_responses
[
i
];
}
brpc
::
Controller
*
cntl
(
size_t
i
)
{
return
_cntls
[
i
].
get
();
}
int
check_response
(
size_t
request_idx
,
int
cmd_id
)
{
return
1
;
}
int
check_save_response
(
size_t
request_idx
,
int
cmd_id
)
{
return
1
;
}
int
check_response
(
size_t
request_idx
UNUSED
,
int
cmd_id
UNUSED
)
{
return
1
;
}
int
check_save_response
(
size_t
request_idx
UNUSED
,
int
cmd_id
UNUSED
)
{
return
1
;
}
private:
std
::
atomic
<
int32_t
>
_waiting_num
;
...
...
paddle/fluid/distributed/ps/service/communicator/communicator.h
浏览文件 @
bafc3469
...
...
@@ -287,10 +287,10 @@ class Communicator {
return
{};
}
virtual
void
SaveFLStrategy
(
const
std
::
unordered_map
<
uint32_t
,
std
::
string
>
&
fl_strategy
)
{}
const
std
::
unordered_map
<
uint32_t
,
std
::
string
>
&
fl_strategy
UNUSED
)
{}
virtual
void
StartCoordinator
(
const
std
::
string
&
self_endpoint
,
const
std
::
vector
<
std
::
string
>
&
trainer_endpoints
)
{}
const
std
::
string
&
self_endpoint
UNUSED
,
const
std
::
vector
<
std
::
string
>
&
trainer_endpoints
UNUSED
)
{}
virtual
~
Communicator
()
{}
virtual
void
RpcProfilerControl
();
...
...
@@ -337,13 +337,13 @@ class Communicator {
virtual
void
BarrierTriggerDecrement
()
{}
virtual
void
BarrierTriggerReset
(
int
init_counter
)
{}
virtual
void
BarrierTriggerReset
(
int
init_counter
UNUSED
)
{}
virtual
void
InitEnvs
()
=
0
;
virtual
void
InitImpl
(
const
RpcCtxMap
&
send_varname_to_ctx
,
const
RecvCtxMap
&
recv_varname_to_ctx
,
Scope
*
recv_scope
)
{}
virtual
void
InitImpl
(
const
RpcCtxMap
&
send_varname_to_ctx
UNUSED
,
const
RecvCtxMap
&
recv_varname_to_ctx
UNUSED
,
Scope
*
recv_scope
UNUSED
)
{}
static
Communicator
*
GetInstance
()
{
return
communicator_
.
get
();
}
...
...
@@ -682,9 +682,9 @@ class FLCommunicator : public GeoCommunicator {
virtual
void
InitBrpcClient
(
const
std
::
string
&
dist_desc
,
const
std
::
vector
<
std
::
string
>
&
host_sign_list
);
void
InitImpl
(
const
RpcCtxMap
&
send_varname_to_ctx
,
const
RecvCtxMap
&
recv_varname_to_ctx
,
Scope
*
recv_scope
)
{}
void
InitImpl
(
const
RpcCtxMap
&
send_varname_to_ctx
UNUSED
,
const
RecvCtxMap
&
recv_varname_to_ctx
UNUSED
,
Scope
*
recv_scope
UNUSED
)
{}
void
StartCoordinatorClient
(
const
std
::
vector
<
std
::
string
>
&
trainer_endpoints
);
...
...
paddle/fluid/distributed/ps/service/coordinator_client.h
浏览文件 @
bafc3469
...
...
@@ -151,8 +151,8 @@ class CoordinatorService : public PsService {
::
google
::
protobuf
::
Closure
*
done
);
int32_t
SaveFLClientInfo
(
const
CoordinatorReqMessage
&
request
,
CoordinatorResMessage
*
response
,
brpc
::
Controller
*
cntl
)
{
CoordinatorResMessage
*
response
UNUSED
,
brpc
::
Controller
*
cntl
UNUSED
)
{
_coordinator_service_handle
->
SaveFLClientInfo
(
request
);
return
0
;
}
...
...
paddle/fluid/framework/ir/generate_pass.cc
浏览文件 @
bafc3469
...
...
@@ -26,7 +26,7 @@ class element_visitor {
explicit
element_visitor
(
int
index
)
:
index_
(
index
)
{}
template
<
typename
T
>
Attribute
operator
()(
const
T
&
attr
)
const
{
Attribute
operator
()(
const
T
&
attr
UNUSED
)
const
{
PADDLE_THROW
(
platform
::
errors
::
Unimplemented
(
"Unimplemented operand."
));
}
...
...
paddle/fluid/framework/trainer.h
浏览文件 @
bafc3469
...
...
@@ -70,7 +70,7 @@ class TrainerBase {
virtual
Scope
*
GetWorkerScope
(
int
thread_id
)
=
0
;
virtual
void
InitDumpEnv
()
=
0
;
virtual
void
DumpWork
(
int
tid
);
virtual
void
ResetDataset
(
Dataset
*
dataset_ptr
)
{}
virtual
void
ResetDataset
(
Dataset
*
dataset_ptr
UNUSED
)
{}
protected:
virtual
std
::
string
GetDumpPath
(
int
tid
)
=
0
;
...
...
paddle/fluid/operators/fused/mkldnn/fusion_rnn_mkldnn.h
浏览文件 @
bafc3469
...
...
@@ -30,12 +30,12 @@ class RNNMKLDNNHandler : public phi::funcs::OneDNNHandlerT<T, T_alg> {
public:
RNNMKLDNNHandler
(
const
paddle
::
framework
::
ExecutionContext
&
ctx
,
const
phi
::
OneDNNContext
&
dev_ctx
,
const
dnnl
::
engine
onednn_engine
,
const
dnnl
::
engine
onednn_engine
UNUSED
,
platform
::
Place
cpu_place
,
const
phi
::
DenseTensor
*
input
,
const
phi
::
DenseTensor
*
weight_h
,
const
phi
::
DenseTensor
*
h0
,
const
bool
is_reverse
,
const
phi
::
DenseTensor
*
input
UNUSED
,
const
phi
::
DenseTensor
*
weight_h
UNUSED
,
const
phi
::
DenseTensor
*
h0
UNUSED
,
const
bool
is_reverse
UNUSED
,
const
int64_t
N
,
const
int64_t
Ti
,
const
int64_t
IC
,
...
...
paddle/fluid/pybind/process_group_utils.h
浏览文件 @
bafc3469
...
...
@@ -56,7 +56,7 @@ struct ConcatDenseTensor<platform::CustomDeviceContext, T> {
void
operator
()(
const
platform
::
CustomDeviceContext
&
context
,
const
std
::
vector
<
phi
::
DenseTensor
>
&
in
,
phi
::
DenseTensor
*
out
,
int
axis
=
0
)
{
int
axis
UNUSED
=
0
)
{
auto
*
out_data
=
out
->
data
<
T
>
();
auto
*
device
=
phi
::
DeviceManager
::
GetDeviceWithPlace
(
context
.
GetPlace
());
size_t
offset
=
0
;
...
...
@@ -80,7 +80,7 @@ struct SplitDenseTensor<platform::CustomDeviceContext, T> {
void
operator
()(
const
platform
::
CustomDeviceContext
&
context
,
const
phi
::
DenseTensor
&
in
,
std
::
vector
<
phi
::
DenseTensor
*>
*
out
,
int
axis
=
0
)
{
int
axis
UNUSED
=
0
)
{
auto
*
in_data
=
in
.
data
<
T
>
();
auto
*
device
=
phi
::
DeviceManager
::
GetDeviceWithPlace
(
context
.
GetPlace
());
size_t
offset
=
0
;
...
...
paddle/phi/backends/onednn/onednn_helper.h
浏览文件 @
bafc3469
...
...
@@ -191,7 +191,8 @@ inline void AppendKey(std::string* key, const std::vector<T>& dims) {
}
template
<
typename
...
ArgTypes
>
inline
std
::
string
CreateKey
(
const
OneDNNContext
&
dev_ctx
,
ArgTypes
&&
...
args
)
{
inline
std
::
string
CreateKey
(
const
OneDNNContext
&
dev_ctx
UNUSED
,
ArgTypes
&&
...
args
)
{
std
::
string
key
;
key
.
reserve
(
64
);
using
expand_type
=
int
[];
...
...
paddle/phi/backends/onednn/onednn_reuse.h
浏览文件 @
bafc3469
...
...
@@ -676,7 +676,7 @@ class OneDNNHandlerNoCachingT {
const
dnnl
::
memory
::
desc
&
user_md
,
const
dnnl
::
memory
::
desc
&
target_md
,
void
*
ptr
,
bool
is_persistent
=
false
,
bool
is_persistent
UNUSED
=
false
,
std
::
function
<
std
::
shared_ptr
<
F
>
(
const
F
*
)
>
custom_reorder_func
=
{})
{
std
::
shared_ptr
<
dnnl
::
memory
>
target_memory_p
;
if
(
custom_reorder_func
)
{
...
...
paddle/phi/kernels/autotune/cache_base.h
浏览文件 @
bafc3469
...
...
@@ -24,7 +24,7 @@
DECLARE_int32
(
search_cache_max_number
);
inline
void
HashCombine
(
std
::
size_t
*
seed
)
{}
inline
void
HashCombine
(
std
::
size_t
*
seed
UNUSED
)
{}
// combine hash value
// https://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x
...
...
paddle/phi/kernels/cpu/viterbi_decode_kernel.cc
浏览文件 @
bafc3469
...
...
@@ -127,7 +127,7 @@ template <typename Context,
class
BinaryFunctor
,
typename
T
>
struct
BinaryOperation
{
void
operator
()(
const
Context
&
dev_ctx
,
void
operator
()(
const
Context
&
dev_ctx
UNUSED
,
const
DenseTensor
&
lhs
,
const
DenseTensor
&
rhs
,
DenseTensor
*
output
)
{
...
...
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
浏览文件 @
bafc3469
...
...
@@ -38,7 +38,7 @@ struct LogsumexpGradFunctor {
DX
*
dx
,
DY
*
dy
,
const
Dim
&
dim
,
int
size
)
{
int
size
UNUSED
)
{
using
MT
=
typename
phi
::
dtype
::
MPTypeTrait
<
T
>::
Type
;
auto
x_mt
=
(
*
x
).
template
cast
<
MT
>();
auto
y_mt
=
(
*
y
).
template
cast
<
MT
>();
...
...
paddle/phi/kernels/impl/matmul_kernel_impl.h
浏览文件 @
bafc3469
...
...
@@ -103,7 +103,7 @@ void MatMulFunctionImplWithBlas(
bool
trans_x
,
bool
trans_y
,
bool
flag
=
false
,
phi
::
funcs
::
MatmulPlanner
*
matmul_planner
=
nullptr
)
{
phi
::
funcs
::
MatmulPlanner
*
matmul_planner
UNUSED
=
nullptr
)
{
const
int
x_ndim
=
x_dims
.
size
();
const
int
y_ndim
=
y_dims
.
size
();
...
...
paddle/phi/kernels/impl/searchsorted_kernel_impl.h
浏览文件 @
bafc3469
...
...
@@ -39,8 +39,8 @@ class GpuAndCpuSearchSortedCompute {
return
std
::
isnan
(
x
);
#endif
}
static
HOSTDEVICE
bool
IsNan
(
int
x
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsNan
(
int64_t
x
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsNan
(
int
x
UNUSED
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsNan
(
int64_t
x
UNUSED
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsInf
(
float
x
)
{
#ifdef __NVCC__
...
...
@@ -56,8 +56,8 @@ class GpuAndCpuSearchSortedCompute {
return
std
::
isinf
(
x
);
#endif
}
static
HOSTDEVICE
bool
IsInf
(
int
x
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsInf
(
int64_t
x
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsInf
(
int
x
UNUSED
)
{
return
false
;
}
static
HOSTDEVICE
bool
IsInf
(
int64_t
x
UNUSED
)
{
return
false
;
}
HOSTDEVICE
GpuAndCpuSearchSortedCompute
(
const
T1
*
sequence_data
,
const
T2
*
value_data
,
...
...
paddle/phi/kernels/impl/split_kernel_impl.h
浏览文件 @
bafc3469
...
...
@@ -25,7 +25,7 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
void
SplitKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
IntArray
&
sections
,
const
IntArray
&
sections
UNUSED
,
const
Scalar
&
axis_scalar
,
std
::
vector
<
DenseTensor
*>
outs
)
{
std
::
vector
<
const
DenseTensor
*>
shape_refer
;
...
...
paddle/phi/kernels/sparse/cpu/full_kernel.cc
浏览文件 @
bafc3469
...
...
@@ -54,7 +54,7 @@ template <typename T, typename Context>
void
FullLikeCsrKernel
(
const
Context
&
dev_ctx
,
const
SparseCsrTensor
&
x
,
const
Scalar
&
val
,
DataType
dtype
,
DataType
dtype
UNUSED
,
SparseCsrTensor
*
out
)
{
phi
::
Copy
<
Context
>
(
dev_ctx
,
x
.
non_zero_crows
(),
...
...
paddle/phi/kernels/sparse/sparse_utils_kernel.h
浏览文件 @
bafc3469
...
...
@@ -158,7 +158,7 @@ void ValuesCsrKernel(const Context& dev_ctx UNUSED,
}
template
<
typename
T
,
typename
Context
>
void
IndicesCooKernel
(
const
Context
&
dev_ctx
,
void
IndicesCooKernel
(
const
Context
&
dev_ctx
UNUSED
,
const
SparseCooTensor
&
x
,
DenseTensor
*
out
)
{
*
out
=
x
.
indices
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录