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: 0 additions & 8 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,6 @@ suppport = 'suppport'
SWTICH = 'SWTICH'
Swith = 'Swith'
sysyem = 'sysyem'
targt = 'targt'
Taget = 'Taget'
templat = 'templat'
temporaily = 'temporaily'
temporily = 'temporily'
Temperarily = 'Temperarily'
temporaly = 'temporaly'
Temperary = 'Temperary'
tenosr = 'tenosr'
iterm = 'iterm'
termiante = 'termiante'
Expand Down
12 changes: 6 additions & 6 deletions paddle/cinn/hlir/dialect/operator/transforms/pd_to_cinn_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ using paddle::dialect::FullOp;

namespace {

template <typename TagetOpT, typename SourceOpT>
template <typename TargetOpT, typename SourceOpT>
bool IsDefinedBy(const SourceOpT &op, const size_t idx) {
const pir::Operation *defined_op = op->operand_source(idx).defining_op();
return defined_op && defined_op->isa<TagetOpT>();
return defined_op && defined_op->isa<TargetOpT>();
}

template <typename TagetOpT, typename SourceOpT>
TagetOpT CastDefinedTo(const SourceOpT &op, const size_t idx) {
PADDLE_ENFORCE_EQ(IsDefinedBy<TagetOpT>(op, idx),
template <typename TargetOpT, typename SourceOpT>
TargetOpT CastDefinedTo(const SourceOpT &op, const size_t idx) {
PADDLE_ENFORCE_EQ(IsDefinedBy<TargetOpT>(op, idx),
true,
::common::errors::PreconditionNotMet(
"Required defined op shall not be nullptr and can cast "
"to target type."));
pir::Operation *defined_op = op->operand_source(idx).defining_op();
return defined_op->dyn_cast<TagetOpT>();
return defined_op->dyn_cast<TargetOpT>();
}

template <typename T = int>
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/framework/pir/fusion_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ std::ostream& operator<<(std::ostream& os, const FusionInfo& fusion_info) {

std::vector<const ::pir::Operation*> TopologySort(
const OpLoweringGroup& group) {
// NOTE(Aurelius84): Use simplest one-by-one order temporaly.
// NOTE(Aurelius84): Use simplest one-by-one order temporarily.
auto* block = group.GetParentBlock();
std::vector<const ::pir::Operation*> ops;
ops.reserve(block->size());
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/pe/schedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int GetArrayPackingFactor(int shape,
const cinn::common::Target &target) {
int split_base = GetBasicFactor(type, target);
int split_factor = 1;
// temporily use shape-1 instead of shape for isl wrong for1 elimination
// temporarily use shape-1 instead of shape for isl wrong for1 elimination
int i = split_base * split_base < shape ? split_base * split_base : shape;
for (; i > 1; i--) {
if (shape % i == 0) {
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/ir_adaptor/translator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(sparse_op_yaml
${PADDLE_SOURCE_DIR}/paddle/phi/ops/yaml/sparse_ops.yaml,${PADDLE_SOURCE_DIR}/paddle/phi/ops/yaml/sparse_backward.yaml
)
set(op_compat_source_file ${PD_PROGRAM_TRANSLATOR_SOURCE_DIR}/op_compat_info.cc)
set(op_compat_templat_file
set(op_compat_template_file
${PD_PROGRAM_TRANSLATOR_SOURCE_DIR}/op_compat_info.cc.j2)

add_custom_command(
Expand All @@ -17,7 +17,7 @@ add_custom_command(
${PYTHON_EXECUTABLE} ${op_gen_file} --op_compat_yaml_file
${op_compat_yaml_file} --sparse_op_yaml ${sparse_op_yaml}
--output_source_file ${op_compat_source_file}
DEPENDS ${op_gen_file} ${op_compat_yaml_file} ${op_compat_templat_file}
DEPENDS ${op_gen_file} ${op_compat_yaml_file} ${op_compat_template_file}
VERBATIM)
file(GLOB PD_PROGRAM_TRANSLATOR_SRCS "*.cc")

Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/segmented_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct PointerArraySetter : public ArraySetterBase<Context> {

// need_alloc : tensor data needs extra buffer or not.
// use_cuda_graph: tensor data shall be captured by cuda_graph or not.
// pre_alloc_host_buf: tensor data is temporaily stored by pinned memory or
// pre_alloc_host_buf: tensor data is temporarily stored by pinned memory or
// not.
PointerArraySetter(const Context& ctx,
std::vector<DenseTensor*>* t,
Expand Down
8 changes: 4 additions & 4 deletions python/paddle/nn/functional/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -4510,9 +4510,9 @@ def adaptive_log_softmax_with_loss(
Tensor(shape=[], dtype=float32, place=Place(cpu), stop_gradient=True,
1.14779019)
"""
targt_dim = label.dim()
target_dim = label.dim()

if targt_dim == 1:
if target_dim == 1:
if input.shape[0] != label.shape[0]:
raise ValueError(
'Input and label should have the same size '
Expand All @@ -4523,7 +4523,7 @@ def adaptive_log_softmax_with_loss(
'1D label tensor expects 2D input tensors, '
f'but found inputs with size {input.shape}'
)
elif targt_dim == 0:
elif target_dim == 0:
if input.dim() != 1:
raise ValueError(
'0D label tensor expects 1D input tensors, '
Expand All @@ -4534,7 +4534,7 @@ def adaptive_log_softmax_with_loss(
'0D or 1D label tensor expected, ' 'multi-label not supported'
)

is_batched = targt_dim > 0
is_batched = target_dim > 0
input = input if is_batched else input.unsqueeze(0)
label = label if is_batched else label.unsqueeze(0)

Expand Down
2 changes: 1 addition & 1 deletion test/dygraph_to_static/test_break_continue.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def init_dygraph_func(self):
def test_transformed_static_result(self):
self.init_dygraph_func()
dygraph_res = self.run_dygraph_mode()
# NOTE(SigureMo): Temperary run the test in sequential run mode to avoid dependency
# NOTE(SigureMo): Temporarily run the test in sequential run mode to avoid dependency
# on the execution order of the test cases.
if use_pir_api():
with exe_sequential_run_guard(True):
Expand Down
2 changes: 1 addition & 1 deletion test/sot/test_step_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def forward(self, x):


class TestStepProfilerSmokeTest(unittest.TestCase):
# Temperarily disable this test
# Temporarily disable this test
# @sot_step_profiler_guard(True)
@strict_mode_guard(False)
def test_step_profiler_smoke(self):
Expand Down