Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/phi/kernels/impl/reverse_kernel_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void ReverseKernel(const Context& dev_ctx,
break;
default:
PADDLE_THROW(common::errors::OutOfRange(
"The reserve operator does not support input tensors"
"The reserve operator does not support input tensors "
"whose ranks are greater than 6."));
}
}
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/kernels/impl/sequence_pool_kernel_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ void SequencePoolKernel(const Context& dev_ctx,
dims[0],
/*batch size = */ static_cast<int64_t>(lod[lod_level - 1].size() - 1),
errors::InvalidArgument(
"The first dimension of Input(X) must be large than batch size."
"But received first dimension of Input(X) is %d, while batch"
"The first dimension of Input(X) must be large than batch size. "
"But received first dimension of Input(X) is %d, while batch "
"size is %d.",
dims[0],
static_cast<int64_t>(lod[lod_level - 1].size() - 1)));
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/impl/sparse_momentum_kernel_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void InnerCompute(const Context& dev_ctx,
PADDLE_ENFORCE_GT(index->dims()[0],
0,
common::errors::InvalidArgument(
"The index of sparse_momentum_op should not be empty"
"The index of sparse_momentum_op should not be empty "
"when the index's rank is 1."));
} else if (index->dims().size() == 2) {
PADDLE_ENFORCE_EQ(index->dims()[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void LookupTableGradKernel(const Context &dev_ctx,
0,
common::errors::InvalidArgument(
"Variable value (input) of OP(fluid.layers.embedding) "
"expected >= 0 and < %ld, but got %ld. Please check input"
"expected >= 0 and < %ld, but got %ld. Please check input "
"value.",
N,
ids_data[i]));
Expand Down
6 changes: 3 additions & 3 deletions paddle/phi/kernels/xpu/beam_search_decode_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void BeamSearchDecodeXPUKernel(const Context& dev_ctx,
step_num,
0UL,
common::errors::InvalidArgument(
"beam search steps, which is the"
"beam search steps, which is the "
"size of Input(Ids) TensorArray. beam search steps should "
"be larger than 0, but received %d. ",
step_num));
Expand All @@ -42,9 +42,9 @@ void BeamSearchDecodeXPUKernel(const Context& dev_ctx,
source_num,
0UL,
common::errors::InvalidArgument(
"source_num is the sequence number of the"
"source_num is the sequence number of the "
"first decoding step, indicating by Input(Ids)[0].lod[0].size. "
"The number of source_num should be larger than"
"The number of source_num should be larger than "
"0, but received %d. ",
source_num));

Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/xpu/distribute_fpn_proposals_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void DistributeFpnProposalsKernel(
PADDLE_ENFORCE_EQ(
fpn_rois.lod().size(),
1UL,
errors::InvalidArgument("DistributeFpnProposalsOp needs LoD"
errors::InvalidArgument("DistributeFpnProposalsOp needs LoD "
"with one level"));
}
using XPUType = typename XPUTypeTrait<T>::Type;
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/xpu/instance_norm_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void InstanceNormGradKernel(const Context& dev_ctx,
common::errors::InvalidArgument(
"The `shape` in InstanceNormOp is invalid: "
"the size of scale's dimensions must be equal to 1. But "
"received: the size of scale's dimensions"
"received: the size of scale's dimensions "
"is [%d]",
scale_ptr->dims().size()));
PADDLE_ENFORCE_EQ(scale_ptr->dims()[0],
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/kernels/xpu/pool_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void Pool2dGradKernel(const Context& dev_ctx,
PADDLE_ENFORCE_EQ(
data_format,
"NCHW",
common::errors::InvalidArgument("The Pool2d_grad XPU OP only support"
common::errors::InvalidArgument("The Pool2d_grad XPU OP only support "
"data_format is 'NCHW', but received %s",
data_format));

Expand Down Expand Up @@ -213,7 +213,7 @@ void Pool3dGradKernel(const Context& dev_ctx,
PADDLE_ENFORCE_EQ(
data_format,
"NCDHW",
common::errors::InvalidArgument("The Pool3d_grad XPU OP only support"
common::errors::InvalidArgument("The Pool3d_grad XPU OP only support "
"data_format is 'NCDHW', but received %s",
data_format));
if (!dx) {
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/eager/task_tests/forward_autograd_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ TEST(Forward, LinearNodes) {
PADDLE_ENFORCE_EQ(node1_meta[0].GetEdge().GetGradNode(),
grad_node0,
common::errors::InvalidArgument(
"node1_meta[0].GetEdge().GetGradNode()"
"is not equal with grad_node0"
"the value of grad_node0 is %d"
"node1_meta[0].GetEdge().GetGradNode() "
"is not equal with grad_node0, "
"the value of grad_node0 is %d "
"and node1_meta[0].GetEdge().GetGradNode() is %d",
grad_node0,
node1_meta[0].GetEdge().GetGradNode()));
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/fluid/beam_search_decode_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ void GenerateExample(const std::vector<size_t>& level_0,
PADDLE_ENFORCE_EQ(level_0.back(),
level_1.size() - 1,
common::errors::InvalidArgument(
"source level is used to describe candidate set"
", so it's element should less than level_1 length. "
"And the value of source"
"source level is used to describe candidate set, "
"so it's element should less than level_1 length. "
"And the value of source "
"level is %d. ",
level_1.size() - 1));
PADDLE_ENFORCE_EQ(level_1.back(),
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/inference/api/analyzer_capi_gpu_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST(PD_AnalysisConfig, use_gpu) {
PADDLE_ENFORCE_EQ(
10,
num_thread,
common::errors::InvalidArgument("The num of thread should be"
common::errors::InvalidArgument("The num of thread should be "
"equal to 10, but got %d.",
num_thread));
PD_SwitchSpecifyInputNames(config, true);
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/inference/api/tester_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ std::shared_ptr<std::vector<PaddleTensor>> GetWarmupData(
all_test_data_size,
common::errors::InvalidArgument(
"The requested quantization warmup data size must be "
"lower or equal to the test data size. But received"
"lower or equal to the test data size. But received "
"warmup size is %d and test data size is %d. Please "
"use --warmup_batch_size parameter to set smaller "
"warmup batch size.",
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/inference/api/xpu_runtime_config_resnet50_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void RunPredictorWithRuntimeConfig(
PADDLE_ENFORCE_EQ(predictor->GetExecStream(),
runtime_config.stream,
common::errors::InvalidArgument(
"predictor->GetExecStream() is not equal with"
"predictor->GetExecStream() is not equal with "
"runtime_config.stream"));
}

Expand Down
2 changes: 1 addition & 1 deletion test/cpp/inference/test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void SetupTensor(phi::DenseTensor* input,
PADDLE_ENFORCE_EQ(common::product(dims),
static_cast<int64_t>(data.size()),
common::errors::InvalidArgument(
"common::product(dims) and data.size() are not equal"
"common::product(dims) and data.size() are not equal, "
"common::product(dims) is %d and data.size() is %d",
common::product(dims),
static_cast<int64_t>(data.size())));
Expand Down
4 changes: 2 additions & 2 deletions test/custom_op/custom_contiguous.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ static paddle::Tensor Transpose(const paddle::Tensor& t,
dim0 = dim0 >= 0 ? dim0 : len + dim0;
dim1 = dim1 >= 0 ? dim1 : len + dim1;
PD_CHECK(dim0 >= 0 && dim0 < len,
"dim0 not in range"
"dim0 not in range, "
"dim0:%d ,range:%d",
dim0,
len);
PD_CHECK(dim1 >= 0 && dim1 < len,
"dim1 not in range"
"dim1 not in range, "
"dim1:%d ,range:%d",
dim1,
len);
Expand Down
2 changes: 1 addition & 1 deletion test/xpu/cpp/beam_search_decode_op_xpu_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void GenerateXPUExample(const std::vector<size_t>& level_0,
common::errors::InvalidArgument(
"source level is used to describe candidate set"
", so it's element should less than level_1 length. "
"And the value of source"
"And the value of source "
"level is %d. ",
level_1.size() - 1));
PADDLE_ENFORCE_EQ(level_1.back(),
Expand Down
Loading