Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodeStyle][Typos][P-[34-41]] Fix typos(precending,Prepration,Prepar,preprocesser,priorites,probabalistic,processer,proccess) #70987

Merged
merged 1 commit into from
Jan 26, 2025
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: 0 additions & 8 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ ouput = 'ouput'
outpout = 'outpout'
ouptut = 'ouptut'
Ouput = 'Ouput'
precending = 'precending'
Prepration = 'Prepration'
Prepar = 'Prepar'
preprocesser = 'preprocesser'
priorites = 'priorites'
probabalistic = 'probabalistic'
processer = 'processer'
proccess = 'proccess'
producted = 'producted'
progam = 'progam'
progrss = 'progrss'
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/framework/pir/compilation_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void GroupCompilationContext::PrepareModuleBuilder() {
PADDLE_ENFORCE_EQ(predicates_.size(),
priorities_.size(),
::common::errors::InvalidArgument(
"The size of predicates and priorites should be "
"The size of predicates and priorities should be "
"the same."));
for (const ir::Expr& predicate : predicates_) {
module_builder_.AddPredicate(predicate);
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/details/nccl_op_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class NCCLOpHandleBase : public OpHandleBase {
1,
common::errors::InvalidArgument(
"HierarchicalAllReduce can only run "
"one proccess with one card mode, but got %d cards.",
"one process with one card mode, but got %d cards.",
places_.size()));

for (auto& p : places_) {
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pir/dialect/op_generator/op_build_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def GenBuildOutputs(
meta_{name}.push_back(&vec_meta_{name}[i]);
}}
"""
# Prepar input type
# Prepare input type
for idx in range(len(op_input_name_list)):
# is a vector<Tensor>
if 'pir::VectorType' in op_input_type_list[idx]:
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/gpu/unique_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ UniqueFlattenedCUDATensor(const Context& context,
bool return_inverse,
bool return_counts,
int64_t num_input) {
// 0. Prepration
// 0. Preparation
auto equal = thrust::equal_to<InT>();
auto not_equal = thrust::not_equal_to<InT>();
DenseTensor in_hat;
Expand Down
48 changes: 24 additions & 24 deletions test/dygraph_to_static/transformer_dygraph_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,31 +203,31 @@ def __init__(
):
super().__init__()

self.preprocesser1 = PrePostProcessLayer(
self.preprocessor1 = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)
self.self_attn = MultiHeadAttention(
d_key, d_value, d_model, n_head, attention_dropout
)
self.postprocesser1 = PrePostProcessLayer(
self.postprocessor1 = PrePostProcessLayer(
postprocess_cmd, d_model, prepostprocess_dropout
)

self.preprocesser2 = PrePostProcessLayer(
self.preprocessor2 = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)
self.ffn = FFN(d_inner_hid, d_model, relu_dropout)
self.postprocesser2 = PrePostProcessLayer(
self.postprocessor2 = PrePostProcessLayer(
postprocess_cmd, d_model, prepostprocess_dropout
)

def forward(self, enc_input, attn_bias):
attn_output = self.self_attn(
self.preprocesser1(enc_input), None, None, attn_bias
self.preprocessor1(enc_input), None, None, attn_bias
)
attn_output = self.postprocesser1(attn_output, enc_input)
ffn_output = self.ffn(self.preprocesser2(attn_output))
ffn_output = self.postprocesser2(ffn_output, attn_output)
attn_output = self.postprocessor1(attn_output, enc_input)
ffn_output = self.ffn(self.preprocessor2(attn_output))
ffn_output = self.postprocessor2(ffn_output, attn_output)
return ffn_output


Expand Down Expand Up @@ -267,7 +267,7 @@ def __init__(
),
)
)
self.processer = PrePostProcessLayer(
self.processor = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)

Expand All @@ -276,7 +276,7 @@ def forward(self, enc_input, attn_bias):
enc_output = encoder_layer(enc_input, attn_bias)
enc_input = enc_output

return self.processer(enc_output)
return self.processor(enc_output)


class Embedder(Layer):
Expand Down Expand Up @@ -378,50 +378,50 @@ def __init__(
):
super().__init__()

self.preprocesser1 = PrePostProcessLayer(
self.preprocessor1 = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)
self.self_attn = MultiHeadAttention(
d_key, d_value, d_model, n_head, attention_dropout
)
self.postprocesser1 = PrePostProcessLayer(
self.postprocessor1 = PrePostProcessLayer(
postprocess_cmd, d_model, prepostprocess_dropout
)
self.preprocesser2 = PrePostProcessLayer(
self.preprocessor2 = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)
self.cross_attn = MultiHeadAttention(
d_key, d_value, d_model, n_head, attention_dropout
)
self.postprocesser2 = PrePostProcessLayer(
self.postprocessor2 = PrePostProcessLayer(
postprocess_cmd, d_model, prepostprocess_dropout
)
self.preprocesser3 = PrePostProcessLayer(
self.preprocessor3 = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)
self.ffn = FFN(d_inner_hid, d_model, relu_dropout)
self.postprocesser3 = PrePostProcessLayer(
self.postprocessor3 = PrePostProcessLayer(
postprocess_cmd, d_model, prepostprocess_dropout
)

def forward(
self, dec_input, enc_output, self_attn_bias, cross_attn_bias, cache=None
):
self_attn_output = self.self_attn(
self.preprocesser1(dec_input), None, None, self_attn_bias, cache
self.preprocessor1(dec_input), None, None, self_attn_bias, cache
)
self_attn_output = self.postprocesser1(self_attn_output, dec_input)
self_attn_output = self.postprocessor1(self_attn_output, dec_input)
cross_attn_output = self.cross_attn(
self.preprocesser2(self_attn_output),
self.preprocessor2(self_attn_output),
enc_output,
enc_output,
cross_attn_bias,
)
cross_attn_output = self.postprocesser2(
cross_attn_output = self.postprocessor2(
cross_attn_output, self_attn_output
)
ffn_output = self.ffn(self.preprocesser3(cross_attn_output))
ffn_output = self.postprocesser3(ffn_output, cross_attn_output)
ffn_output = self.ffn(self.preprocessor3(cross_attn_output))
ffn_output = self.postprocessor3(ffn_output, cross_attn_output)
return ffn_output


Expand Down Expand Up @@ -461,7 +461,7 @@ def __init__(
),
)
)
self.processer = PrePostProcessLayer(
self.processor = PrePostProcessLayer(
preprocess_cmd, d_model, prepostprocess_dropout
)

Expand All @@ -482,7 +482,7 @@ def forward(
None if caches is None else caches[i],
)
dec_input = dec_output
return self.processer(dec_output)
return self.processor(dec_output)


class WrapDecoder(Layer):
Expand Down
8 changes: 4 additions & 4 deletions test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_check_grad(self):


class TestSigmoidCrossEntropyWithLogitsOp2(OpTest):
"""Test sigmoid_cross_entropy_with_logit_op with probabalistic label"""
"""Test sigmoid_cross_entropy_with_logit_op with probabilistic label"""

def setUp(self):
self.op_type = "sigmoid_cross_entropy_with_logits"
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_check_grad(self):


class TestSigmoidCrossEntropyWithLogitsOp3(OpTest):
"""Test sigmoid_cross_entropy_with_logit_op with probabalistic label"""
"""Test sigmoid_cross_entropy_with_logit_op with probabilistic label"""

def setUp(self):
self.op_type = "sigmoid_cross_entropy_with_logits"
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_check_grad(self):


class TestSigmoidCrossEntropyWithLogitsOp4(OpTest):
"""Test sigmoid_cross_entropy_with_logit_op with probabalistic label"""
"""Test sigmoid_cross_entropy_with_logit_op with probabilistic label"""

def setUp(self):
self.op_type = "sigmoid_cross_entropy_with_logits"
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_check_grad(self):


class TestSigmoidCrossEntropyWithLogitsOp5(OpTest):
"""Test sigmoid_cross_entropy_with_logit_op with probabalistic label"""
"""Test sigmoid_cross_entropy_with_logit_op with probabilistic label"""

def setUp(self):
self.op_type = "sigmoid_cross_entropy_with_logits"
Expand Down
2 changes: 1 addition & 1 deletion tools/cinn/gen_c++_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def h3(self, title: str):
self.add_line('### ' + title)

def code_block(self, lang: str, block: list[str]):
# drop the precending and tailing empty lines to make code block more compact
# drop the preceding and tailing empty lines to make code block more compact
pre_valid_offset = 0
tail_valid_offset = 0
for x in block:
Expand Down
4 changes: 2 additions & 2 deletions tools/gen_ut_cmakelists.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _process_conditions(conditions):
return [c.strip() for c in conditions]


def _proccess_archs(arch):
def _process_archs(arch):
"""
desc:
Input archs options and warp it with 'WITH_', 'OR' and '()' in cmakelist grammar.
Expand Down Expand Up @@ -451,7 +451,7 @@ def _parse_line(self, line, curdir):

envs = _process_envs(envs)
conditions = _process_conditions(conditions)
archs = _proccess_archs(archs)
archs = _process_archs(archs)
os_ = _process_os(os_)
run_serial = _process_run_serial(run_serial)

Expand Down
10 changes: 5 additions & 5 deletions tools/sampcd_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,12 @@ def _execute_xdoctest(
if self._use_multiprocessing:
_ctx = multiprocessing.get_context('spawn')
result_queue = _ctx.Queue()
exec_processer = functools.partial(_ctx.Process, daemon=True)
exec_processor = functools.partial(_ctx.Process, daemon=True)
else:
result_queue = queue.Queue()
exec_processer = functools.partial(threading.Thread, daemon=True)
exec_processor = functools.partial(threading.Thread, daemon=True)

processer = exec_processer(
processor = exec_processor(
target=self._execute_with_queue,
args=(
result_queue,
Expand All @@ -557,11 +557,11 @@ def _execute_xdoctest(
),
)

processer.start()
processor.start()
result = result_queue.get(
timeout=directives.get('timeout', TEST_TIMEOUT)
)
processer.join()
processor.join()

return result

Expand Down
Loading