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

[HEU][CodeStyle][Typos][B-[3-7]] Fix typo(befor, befores, begining,benfit,Betweent,betweeen,bindins) #69640

Merged
merged 8 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 0 additions & 7 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ builer = 'builer'
ontext = 'ontext'
Direcly = 'Direcly'
Keyward = 'Keyward'
begining = 'begining'
OLT = 'OLT'
complition = 'complition'
initalized = 'initalized'
Expand Down Expand Up @@ -97,11 +96,9 @@ lsit = 'lsit'
onces = 'onces'
defeine = 'defeine'
modifty = 'modifty'
befor = 'befor'
conect = 'conect'
satifies = 'satifies'
indexs = 'indexs'
betweeen = 'betweeen'
clen = 'clen'
splitted = 'splitted'
Intput = 'Intput'
Expand Down Expand Up @@ -178,7 +175,6 @@ fileds = 'fileds'
childs = 'childs'
initalize = 'initalize'
storeage = 'storeage'
Betweent = 'Betweent'
overrided = 'overrided'
smll = 'smll'
outpout = 'outpout'
Expand Down Expand Up @@ -243,7 +239,6 @@ suppport = 'suppport'
Neighboor = 'Neighboor'
starup = 'starup'
iy = 'iy'
bindins = 'bindins'
choses = 'choses'
rewrited = 'rewrited'
targt = 'targt'
Expand Down Expand Up @@ -425,7 +420,6 @@ parrent = 'parrent'
dimensinal = 'dimensinal'
fisrt = 'fisrt'
comsume = 'comsume'
befores = 'befores'
Converage = 'Converage'
serailize = 'serailize'
maping = 'maping'
Expand Down Expand Up @@ -468,7 +462,6 @@ nagative = 'nagative'
helpe = 'helpe'
TOOD = 'TOOD'
recive = 'recive'
benfit = 'benfit'
accurary = 'accurary'
featue = 'featue'
schduler = 'schduler'
Expand Down
6 changes: 3 additions & 3 deletions paddle/cinn/hlir/dialect/operator/ir/generate_shape_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ MakeGetterDimExpr4SymbolName(
const std::function<const symbol::ShapeOrDataDimExprs&(int in_tensor_idx)>&
DimExpr4InputDim) {
std::unordered_map<std::string, std::vector<SymbolBinding>>
symbol_name2symbol_bindins{};
symbol_name2symbol_bindings{};
for (const auto& symbol_binding : symbol_bindings) {
symbol_name2symbol_bindins[GetSymbolNameBySymbolBinding(symbol_binding)]
symbol_name2symbol_bindings[GetSymbolNameBySymbolBinding(symbol_binding)]
.emplace_back(symbol_binding);
}
return [map = std::move(symbol_name2symbol_bindins), DimExpr4InputDim](
return [map = std::move(symbol_name2symbol_bindings), DimExpr4InputDim](
const std::string& symbol_name) -> std::optional<DimExpr> {
const auto& iter = map.find(symbol_name);
if (iter == map.end()) return std::nullopt;
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/optim/lower_function_call_bind_vars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct LowerFunctionCallBindVarsMutator : public ir::IRMutator<> {
}
}

// insert the extra var arguments to the begining of the original call's
// insert the extra var arguments to the beginning of the original call's
// argument list.
node->read_args.insert(std::begin(op->read_args),
extra_var_args.begin(),
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/eager/general_grad.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ class GeneralGrad {
// Purify potentialstartup_ops, remove those nodes that are the same as
// input_target_nodes
PurifyPotentialStartUpNodes();
// Get Graph Info Betweent input target gradnode and outputs
// Get Graph Info Between input target gradnode and outputs
// Record the depending_nodes_ and potential_startup_nodes_
GetGraphInfoBetweenTargets(*queue);
// Update Graph Info, remove some nodes in
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/data_feed.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4182,7 +4182,7 @@ void GraphDataGenerator::DoSageForInfer() {
total_instance = 2;
d_type_keys = reinterpret_cast<uint64_t *>(
d_device_keys_[tensor_pair_idx][infer_cursor_[tensor_pair_idx]]
->ptr()); // copy from begining
->ptr()); // copy from beginning
} else {
d_type_keys += infer_node_start_[tensor_pair_idx];
infer_node_start_[tensor_pair_idx] += total_instance / 2;
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/fleet/ps_gpu_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ void PSGPUWrapper::BeginPass() {
common::errors::Fatal("[BeginPass] current task is not ended."));
}

debug_gpu_memory_info("befor build task");
debug_gpu_memory_info("before build task");
build_task();
debug_gpu_memory_info("after build task");
timer.Pause();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ void DependencyBuilderSimplify::GetAllbehind() {
};
for (size_t i = start_index_; i < op_num_; i++) {
auto& behinds = ops_behind_[i];
auto& befores = ops_before_[i];
for (auto before_op : befores) {
auto& before = ops_before_[i];
for (auto before_op : before) {
for (auto behind_op : behinds) {
Copy link
Member

Choose a reason for hiding this comment

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

从语义上来看,这里 befores 表示的是复数个 before 的 OP,因此可以将其命名改为 before_ops,确保一致性,behinds 也改为 behind_ops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

update_op_happen_before(before_op, behind_op);
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/inference/tensorrt/convert/tile_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TileOpConverter : public OpConverter {
itensors.push_back(input_shape_tensor);
input_shape_tensor = Concat(itensors);
// need reshape input to more dims.
input = Reshape(input, input_shape_tensor, "reshape_input_befor_slice");
input = Reshape(input, input_shape_tensor, "reshape_input_before_slice");
repeat_expand_tensor = repeat_tensor;
} else {
repeat_expand_tensor = repeat_tensor;
Expand Down
12 changes: 6 additions & 6 deletions paddle/fluid/pir/transforms/onednn/cpu_bfloat16_squash_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,20 @@ class CPUBf16QuantizeSquashPass : public pir::PatternRewritePass {

pir::RewritePatternSet InitializePatterns(pir::IrContext *context) override {
pir::RewritePatternSet ps(context);
uint32_t benfit = 100;
uint32_t benefit = 100;

auto q_dq_onednn_pattern = std::make_unique<DequantQuantBf16SquashPattern>(
context, benfit--, std::vector<std::string>{});
context, benefit--, std::vector<std::string>{});
ps.Add(std::move(q_dq_onednn_pattern));

auto q_dq_multi_onednn_pattern =
std::make_unique<DequantQuantBf16MultiUserPattern>(
context, benfit--, std::vector<std::string>{});
context, benefit--, std::vector<std::string>{});
ps.Add(std::move(q_dq_multi_onednn_pattern));

auto q_conv_onednn_pattern = std::make_unique<QuantConvBf16SquashPattern>(
context,
benfit--,
benefit--,
std::vector<std::string>{
paddle::onednn::dialect::FusedConv2dOp::name(),
});
Expand All @@ -418,14 +418,14 @@ class CPUBf16QuantizeSquashPass : public pir::PatternRewritePass {
auto q_fusedconv_onednn_pattern =
std::make_unique<QuantFusedConvBf16SquashPattern>(
context,
benfit--,
benefit--,
std::vector<std::string>{
paddle::onednn::dialect::FusedConv2dOp::name(),
});
ps.Add(std::move(q_fusedconv_onednn_pattern));

auto op_dq_onednn_pattern = std::make_unique<OpDequantBf16SquashPattern>(
context, benfit--, std::vector<std::string>{});
context, benefit--, std::vector<std::string>{});
ps.Add(std::move(op_dq_onednn_pattern));

return ps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ def set_process_mesh(block, op, process_mesh, var_to_process_mesh):
end_op_index = i
break

# all ops betweeen start_op_index and end_op_index should not be ignored
# all ops between start_op_index and end_op_index should not be ignored
for i in range(start_op_index, end_op_index + 1):
struct_name = ops[i].struct_name
m = regex.search(struct_name)
Expand Down
2 changes: 1 addition & 1 deletion test/legacy_test/test_array_read_write_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_array_backward(self):
feed={'d0': d},
fetch_list=[mean.name, d0.grad_name, mem_array.grad_name],
)
# this ans is wrong array is empty at begining ,so it no grad.
# this ans is wrong array is empty at beginning ,so it no grad.
np.testing.assert_allclose(res[2], [[0.1] * 10], rtol=1e-05)

mean = 0.6097253
Expand Down
2 changes: 1 addition & 1 deletion tools/check_file_diff_approvals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fi

HAS_MODIFIED_API_FW_BW_YAML=`git diff --name-only upstream/$BRANCH | grep -E "paddle/phi/ops/yaml/ops.yaml|paddle/phi/ops/yaml/backward.yaml" || true`
if [ "${HAS_MODIFIED_API_FW_BW_YAML}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="You must be approved by zyfncg or heavyrain-lzy for paddle/phi/ops/yaml/ops.yaml or paddle/phi/ops/yaml/backward.yaml changes, which manage the generated code for the C++ OP. You can only change them according to the specification at the begining of this two file.\n Recommend you obtain approval from gongshaotian or Hongqing-work, if only modified the InferSymbolicShapeInterface interfaces in the YAML file.\n"
echo_line="You must be approved by zyfncg or heavyrain-lzy for paddle/phi/ops/yaml/ops.yaml or paddle/phi/ops/yaml/backward.yaml changes, which manage the generated code for the C++ OP. You can only change them according to the specification at the beginning of this two file.\n Recommend you obtain approval from gongshaotian or Hongqing-work, if only modified the InferSymbolicShapeInterface interfaces in the YAML file.\n"
check_approval 1 zyfncg heavyrain-lzy gongshaotian Hongqing-work
fi

Expand Down