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][O-22] Fix typo (outout,ouput,ouptut,outpout,Ouput) #70993

Merged
merged 3 commits into from
Feb 8, 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
5 changes: 0 additions & 5 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ vaccum = 'vaccum'
# These words need to be fixed
Operants = 'Operants'
operants = 'operants'
outout = 'outout'
ouput = 'ouput'
outpout = 'outpout'
ouptut = 'ouptut'
Ouput = 'Ouput'
setted = 'setted'
storeage = 'storeage'
sotring = 'sotring'
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/pe/nn.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ ir::Tensor DropoutInfer(
* out = true_value
* 2. condition expr = false
* out = false_value
* @param ouput_name : the name of the output tensor.
* @param output_name : the name of the output tensor.
*/
ir::Tensor Select(const ir::Tensor &condition,
const ir::Tensor &true_value,
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/pe/reduction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ std::vector<Tensor> WarpReduce(const ir::Tensor& A,
},
UniqName(output_name + "_" + reduce_type));

// compute ouput shape.
// compute output shape.
std::vector<Expr> out_shape(A->shape.begin(),
A->shape.begin() + shape_size_without_reduce_dim);
for (int idx = 0; idx < last_reduce_dim_num && keep_dim; ++idx) {
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/operator_fusion/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ std::vector<std::pair<size_t, size_t>> GetNonBroadCastDims(pir::Operation* op) {
PADDLE_ENFORCE_GE(output_rank,
input_rank,
::common::errors::PreconditionNotMet(
"[Error info] The ouput_rank should "
"[Error info] The output_rank should "
"be greater or equal to input_rank."));

// Compare axis one by one, from back to front.
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/framework/ir/graph_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ std::vector<ir::Node *> TopologySortGraphByDescOrder(const Graph &graph) {
return ret;
}

void RemoveControlDepInputAndOuput(OpDesc *op_desc) {
void RemoveControlDepInputAndOutput(OpDesc *op_desc) {
auto remove_control_dep_var = [](VariableNameMap *var_name_map) {
for (auto &pair : *var_name_map) {
std::vector<std::string> &var_names = pair.second;
Expand Down Expand Up @@ -736,7 +736,7 @@ static void GraphToBlock(const Graph &graph,
GetGraphOpDesc(nodes, block, &ops, graph, graph_idx);

for (auto &op : ops) {
RemoveControlDepInputAndOuput(&op);
RemoveControlDepInputAndOutput(&op);
block->add_ops()->MergeFrom(*op.Proto());
}
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/ir/graph_pattern_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4646,7 +4646,7 @@ PDNode *patterns::FusedFeedForwardBwd::operator()(
// other cases: may delete residual_add_grad, dropout1_grad, dropout2_grad
// operators

// intermediate input_grad, and final pattern ouput_grad
// intermediate input_grad, and final pattern output_grad
PDNode *out_grad = x_grad;
// LayerNorm: in["Mean", "Variance", "Scale", "Bias", "Y@GRAD"],
// out["X@GRAD", "Scale@GRAD", "Bias@GRAD"]
Expand Down
16 changes: 8 additions & 8 deletions paddle/fluid/inference/openvino/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ bool OpenVINOEngine::IsModelStatic() {
return isStatic;
}

ov::Shape OpenVINOEngine::GetOuputShape(const std::string& output_name,
int64_t index) {
ov::Shape OpenVINOEngine::GetOutputShape(const std::string& output_name,
int64_t index) {
auto ov_output_shape =
HaveOutputTensorName(output_name)
? infer_request_.get_tensor(output_name).get_shape()
: infer_request_.get_output_tensor(index).get_shape();
return ov_output_shape;
}

phi::DataType OpenVINOEngine::GetOuputType(const std::string& output_name,
int64_t index,
ov::element::Type ov_paddle_type) {
phi::DataType OpenVINOEngine::GetOutputType(const std::string& output_name,
int64_t index,
ov::element::Type ov_paddle_type) {
auto output_ov_type =
HaveOutputTensorName(output_name)
? infer_request_.get_tensor(output_name).get_element_type()
Expand All @@ -56,9 +56,9 @@ phi::DataType OpenVINOEngine::GetOuputType(const std::string& output_name,
return OVType2PhiType(output_ov_type);
}

void OpenVINOEngine::CopyOuputDataByName(const std::string& output_name,
int64_t index,
void* pd_data) {
void OpenVINOEngine::CopyOutputDataByName(const std::string& output_name,
int64_t index,
void* pd_data) {
auto ov_tensor = HaveOutputTensorName(output_name)
? infer_request_.get_tensor(output_name)
: infer_request_.get_output_tensor(index);
Expand Down
14 changes: 7 additions & 7 deletions paddle/fluid/inference/openvino/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ class OpenVINOEngine {
ov::Model* model() { return model_.get(); }
ov::CompiledModel compiled_model() { return complied_model_; }
ov::InferRequest infer_request() { return infer_request_; }
ov::Shape GetOuputShape(const std::string& name, int64_t index);
phi::DataType GetOuputType(const std::string& name,
int64_t index,
ov::element::Type ov_paddle_type);
void CopyOuputDataByName(const std::string& output_name,
int64_t index,
void* pd_data);
ov::Shape GetOutputShape(const std::string& name, int64_t index);
phi::DataType GetOutputType(const std::string& name,
int64_t index,
ov::element::Type ov_paddle_type);
void CopyOutputDataByName(const std::string& output_name,
int64_t index,
void* pd_data);
void Execute();

private:
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/operators/openvino/openvino_engine_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ class OpenVINOEngineOp : public framework::OperatorBase {
common::errors::NotFound(
"Output variable %s is not found in Openvino subgraph.", y));
auto *fluid_t = fluid_v->GetMutable<phi::DenseTensor>();
auto ov_output_shape = engine->GetOuputShape(output_names_[i], i);
auto phi_type = engine->GetOuputType(
auto ov_output_shape = engine->GetOutputShape(output_names_[i], i);
auto phi_type = engine->GetOutputType(
output_names_[i],
i,
inference::openvino::VarType2OVType(ori_var_type));
Expand All @@ -224,7 +224,7 @@ class OpenVINOEngineOp : public framework::OperatorBase {
ddim.push_back(ov_output_shape[j]);
}
fluid_t->Resize(common::make_ddim(ddim));
engine->CopyOuputDataByName(
engine->CopyOutputDataByName(
output_names_[i], i, fluid_t->mutable_data(dev_place, phi_type));
}
}
Expand Down
8 changes: 4 additions & 4 deletions paddle/phi/infermeta/spmd_rules/default_data_parallel.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ namespace phi {
namespace distributed {
/**
* A **hack** rule with a strong assumption that the first dimension of
* all the input and ouput tensors is the batch dimension (broadcast dimension),
* therefore, if any tensor's first dimension is sharded, the sharding would be
* propagating to all the other tensors (for tensor first dimension). All the
* other axes of tensors would be set as unshard (-1).
* all the input and output tensors is the batch dimension (broadcast
* dimension), therefore, if any tensor's first dimension is sharded, the
* sharding would be propagating to all the other tensors (for tensor first
* dimension). All the other axes of tensors would be set as unshard (-1).
*
*
* This rule is used to support emerging op for hybrid parallelism quickly, and
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/kernels/funcs/interpolate_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ struct FastDivModForInterpolate {

explicit HOSTDEVICE FastDivModForInterpolate(const int channels,
const int output_w,
const int outout_wc)
const int output_wc)
: channels_div(FastDivMod(channels)),
output_w_div(FastDivMod(output_w)),
output_wc_div(FastDivMod(outout_wc)) {}
output_wc_div(FastDivMod(output_wc)) {}
};

#endif
Expand Down
24 changes: 12 additions & 12 deletions paddle/phi/kernels/funcs/pooling.cu
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ __global__ void KernelPool2DGrad(const int nthreads,
int output_sub_idx =
channel_last ? tmp_idx * divmods.channel.divisor + c_offset
: tmp_idx;
T ouput_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
T output_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
pool_process.compute(input,
ouput_value,
output_value,
output_grad[output_sub_idx],
static_cast<T>(1.0 / pool_size),
&input_grad_data);
Expand Down Expand Up @@ -343,10 +343,10 @@ __global__ void KernelPool2DGrad(const int nthreads,
int output_sub_idx =
channel_last ? tmp_idx * divmods.channel.divisor + c_offset
: tmp_idx;
T ouput_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
T output_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
pool_process.compute(input,
ouput_value,
output_value,
output_grad[output_sub_idx],
static_cast<T>(1.0 / pool_size),
&input_grad_data);
Expand All @@ -360,10 +360,10 @@ __global__ void KernelPool2DGrad(const int nthreads,
int output_sub_idx =
channel_last ? tmp_idx * divmods.channel.divisor + c_offset
: tmp_idx;
T ouput_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
T output_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
pool_process.compute(input,
ouput_value,
output_value,
output_grad[output_sub_idx],
static_cast<T>(1.0 / pool_size),
&input_grad_data);
Expand Down Expand Up @@ -1267,10 +1267,10 @@ __global__ void KernelPool3DGrad(const int nthreads,
? ((pd * output_height + ph) * output_width + pw) * channels +
c_offset
: (pd * output_height + ph) * output_width + pw;
T ouput_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
T output_value = pool_process.use_x ? output_data[output_sub_idx]
: static_cast<T>(0);
pool_process.compute(input,
ouput_value,
output_value,
output_grad[output_sub_idx],
static_cast<T>(1.0 / pool_size),
&input_grad_data);
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/impl/bessel_grad_kernel_cuda_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct CudaI0GradFunctor {
using MT = typename phi::dtype::MPTypeTrait<T>::Type;
const MT mp_x = static_cast<MT>(_x);
const MT mp_out_grad = static_cast<MT>(_out_grad);
// get ouput of i1
// get output of i1
MT x = std::abs(mp_x);
if (x <= MT{8.0}) {
auto coeff_pair_A = ChebyshevCoefficientsI1e_A<MT>();
Expand Down
2 changes: 1 addition & 1 deletion paddle/pir/include/core/operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class IR_API alignas(8) Operation final
void *value_property(const std::string &key, size_t index) const;

///
/// \brief op ouput related public interfaces
/// \brief op output related public interfaces
///
uint32_t num_results() const { return num_results_; }
Value result(uint32_t index) const { return OpResult(op_result_impl(index)); }
Expand Down
6 changes: 3 additions & 3 deletions python/paddle/distributed/auto_parallel/static/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ def _initialize(self, mode, init_parameters=True):
self.program_helper.init_pir(
self._pir_dist_main_progs[mode], self._place
)
changed_ouput_op_list = []
changed_output_op_list = []
if self._executor is None:
self._executor = paddle.static.Executor(self._place)
startup_prog = self._startup_progs[mode].clone()
Expand Down Expand Up @@ -1436,7 +1436,7 @@ def _initialize(self, mode, init_parameters=True):
)
if src_value.persistable:
src_value.persistable = False
changed_ouput_op_list.append(op)
changed_output_op_list.append(op)
op.operand(0).set_source(reshard_var)
for del_op in del_ops:
del_op.erase()
Expand All @@ -1446,7 +1446,7 @@ def _initialize(self, mode, init_parameters=True):
paddle.base.libpaddle.pir.apply_dist2dense_pass(startup_prog)
remove_unuseful_comm_op_pass(startup_prog)

for op in changed_ouput_op_list:
for op in changed_output_op_list:
op.operand_source(0).persistable = True
self._executor.run(startup_prog)
if self._job_plan is not None:
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/jit/dy2static/program_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def check_view_api_used_by_inplace(program: paddle.pir.Program) -> None:
skipped_inplace_ops = [
"pd_op.set_value_",
"pd_op.set_value_with_tensor_",
# It willn't change tensor imdeiately,but it's ouput is dangerous.
# It willn't change tensor imdeiately,but it's output is dangerous.
"pd_op.share_data_",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def generate_scale_bias():
"Scale": ["affine_channel_scale"],
"Bias": ["affine_channel_bias"],
},
outputs={"Out": ["affine_channel_ouput"]},
outputs={"Out": ["affine_channel_output"]},
data_layout=data_format,
)
if has_bias:
Expand All @@ -121,7 +121,7 @@ def generate_scale_bias():
data_gen=partial(generate_scale_bias)
),
},
outputs=["affine_channel_ouput"],
outputs=["affine_channel_output"],
)
if has_bias:
program_config.weights["conv2d_bias"] = TensorConfig(
Expand Down