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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,7 @@ Regiter = 'Regiter'
Runing = 'Runing'
runing = 'runing'
setted = 'setted'
shoule = 'shoule'
shoud = 'shoud'
Singal = 'Singal'
Similiar = 'Similiar'
simular = 'simular'
Simle = 'Simle'
signle = 'signle'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这咋多出来一行,后面删掉

Skiped = 'Skiped'
skiped = 'skiped'
smll = 'smll'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ ShardableAxesSignature CreateSignatureForTranspose(pir::Operation* op) {

std::vector<int32_t> perm =
GetInt32ArrayAttributeData(op->attributes().at("perm"));
PADDLE_ENFORCE_LE(
perm.size(),
input_axes.size(),
::common::errors::PreconditionNotMet(
"The size of perm shoud be equal to or less than the input rank. But "
"received perm size is %d, input rank is %d",
perm.size(),
input_axes.size()));
PADDLE_ENFORCE_LE(perm.size(),
input_axes.size(),
::common::errors::PreconditionNotMet(
"The size of perm should be equal to or less than the "
"input rank. But "
"received perm size is %d, input rank is %d",
perm.size(),
input_axes.size()));
std::vector<std::string> output_axes = input_axes;
for (size_t i = 0; i < perm.size(); ++i) {
output_axes[i] = input_axes[perm[i]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ void Main() {
PADDLE_ENFORCE_LE(fabs(max_score - 0.99981),
1e-4,
common::errors::InvalidArgument(
"Required fabs(max_score - 0.99981) shoule "
"be less than or euqal to 1e-4. "));
"Required fabs(max_score - 0.99981) should "
"be less than or equal to 1e-4. "));
}

} // namespace demo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,7 @@ bool PixelShuffleOpInferSymbolicShape(

const bool channel_last = (data_format == "NHWC");

// the number of channels shoule be able to be divided by the upscale_factor
// the number of channels should be able to be divided by the upscale_factor
// ^ 2.
// TODO(Lans1ot, Buaa): add constrain for the channel number and
// upscale_factor
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/backends/xpu/xpu_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void XPUContext::CheckValidStreamId(int i) const {
PADDLE_ENFORCE_LT(
i,
GetStreamNum(),
errors::InvalidArgument("The stream index shoule be less than the number "
errors::InvalidArgument("The stream index should be less than the number "
"of stream used (%d), but got %d",
GetStreamNum(),
i));
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/infermeta/spmd_rules/add_n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ SpmdInfo AddNInferSpmd(
input_ndim,
ndim,
common::errors::InvalidArgument("AddNInferSpmd, The all input's rank "
"shoule be the same as first input."));
"should be the same as first input."));
PADDLE_ENFORCE_EQ(ndim,
input_dims_mapping.size(),
common::errors::InvalidArgument(
"AddNInferSpmd, The all input's dimmapping size "
"shoule be the same as first input."));
"should be the same as first input."));
tensor_axes_to_dim_pairs.push_back(
std::make_pair(axes, input_dims_mapping));
}
Expand Down
3 changes: 2 additions & 1 deletion paddle/phi/infermeta/ternary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,8 @@ void ScatterInferMeta(const MetaTensor& x,
index_dims[0],
updates_dims[0],
common::errors::InvalidArgument(
"The first dimension size of Input(Index) shoud be no greater than "
"The first dimension size of Input(Index) should be no greater "
"than "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format 后这行只有一个词不太好看,后面可以和其他行拼在一起

"Input(Updates), but received first dimension size of Input(Index) "
"is %d, Input(Updates) is %d.",
index_dims[0],
Expand Down
10 changes: 5 additions & 5 deletions paddle/phi/kernels/funcs/fused_gate_attention.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace phi {
namespace funcs {

template <typename T>
__global__ void SimleScaleKernel(int64_t numel, float scale, T* inout) {
__global__ void SimpleScaleKernel(int64_t numel, float scale, T* inout) {
CUDA_KERNEL_LOOP_TYPE(i, numel, int64_t) {
inout[i] = static_cast<T>(scale * static_cast<float>(inout[i]));
}
Expand Down Expand Up @@ -1247,10 +1247,10 @@ class FlashAttnWithGating {

auto gpu_config =
phi::backends::gpu::GetGpuLaunchConfig1D(dev_ctx_, numel, 1);
SimleScaleKernel<T><<<gpu_config.block_per_grid,
gpu_config.thread_per_block,
0,
dev_ctx_.stream()>>>(numel, scale, ptr);
SimpleScaleKernel<T><<<gpu_config.block_per_grid,
gpu_config.thread_per_block,
0,
dev_ctx_.stream()>>>(numel, scale, ptr);
}

const phi::GPUContext& dev_ctx_;
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/unsqueeze.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ inline DDim GetUnsqueezeShape(const std::vector<int64_t> unsqz_dims,
PADDLE_ENFORCE_LE(cur,
cur_output_rank,
common::errors::InvalidArgument(
"The insert dimension value shoule not be larger "
"The insert dimension value should not be larger "
"than the dimension size of input tensor"));
// Move old axis, and insert new axis
for (int i = cur_output_rank; i >= cur; --i) {
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/fusion/onednn/fusion_gru_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ void FusionGRUKernel(const Context& dev_ctx,
mkldnn_data_type) != mkldnn_data_type_list.end(),
true,
common::errors::InvalidArgument(
"The mkldnn_data_type shoule be [float32, "
"The mkldnn_data_type should be [float32, "
"int8, bfloat16], but found %s.",
mkldnn_data_type.c_str()));
const float scale_data =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void CheckInferSymWithInferMeta(
<< " [id:" << op->id() << "] "
<< " carefully! "
<< "shape[" << i
<< "] of infer_sym_shape shoule be int64_t NOT a symbol!";
<< "] of infer_sym_shape should be int64_t NOT a symbol!";
LOG(ERROR) << print_stream.str();
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/distributed/communication/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def scatter_object_list(
) -> None:
"""

Scatter picklable objects from the source to all others. Similiar to scatter(), but python object can be passed in.
Scatter picklable objects from the source to all others. Similar to scatter(), but python object can be passed in.

Args:
out_object_list (list): The list of objects to store the scattered objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def collect_var_name(var_name_list, persistable_var_names, op_type):
op._set_attr("op_namescope", "skip_quant")

op_type = op.type
# skip quant form simular conv1d_transpose
# skip quant form similar conv1d_transpose
if op_type == 'conv2d_transpose':
in_name = op.input("Filter")[0]
for _op in self._program.blocks[block_id].ops:
Expand Down
2 changes: 1 addition & 1 deletion test/auto_parallel/pir/test_op_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


class TestOpRole(unittest.TestCase):
def test_signle(self):
def test_single(self):
paddle.enable_static()
with paddle.pir_utils.IrGuard():
main_program = paddle.base.Program()
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/eager/data_structure_tests/autograd_meta_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST(AutogradMeta, MemberFunction) {
VLOG(6) << "Test Grad";
PADDLE_ENFORCE_EQ(tmp_auto->Grad().defined(),
false,
common::errors::Fatal("grad shoule not be defined now"));
common::errors::Fatal("grad should not be defined now"));
auto* grad_t = tmp_auto->MutableGrad();
phi::DenseTensorMeta meta =
phi::DenseTensorMeta(phi::DataType::FLOAT32, common::make_ddim({1, 2}));
Expand Down
2 changes: 1 addition & 1 deletion test/legacy_test/test_imperative_signal_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __handler__(signum, frame):
signal.signal(signal.SIGCHLD, __handler__)


class DygraphDataLoaderSingalHandler(unittest.TestCase):
class DygraphDataLoaderSignalHandler(unittest.TestCase):
def test_child_process_exit_with_error(self):
def __test_process__():
core._set_process_signal_handler()
Expand Down