Skip to content

Commit

Permalink
[CodeStyle][Typos][E-[21-27]] Fix typos(execuate, exsit, exsits
Browse files Browse the repository at this point in the history
…, `expaned`, `epxand`, `Expexted`, `expolitation`) (#70458)
  • Loading branch information
enkilee authored Dec 26, 2024
1 parent 53e65a0 commit 9e55fcd
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 64 deletions.
7 changes: 0 additions & 7 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,6 @@ doubel = 'doubel'
dobule = 'dobule'
Dowloading = 'Dowloading'
downsteram = 'downsteram'
execuate = 'execuate'
exsit = 'exsit'
exsits = 'exsits'
expaned = 'expaned'
epxand = 'epxand'
Expexted = 'Expexted'
expolitation = 'expolitation'
faild = 'faild'
Flase = 'Flase'
featue = 'featue'
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function(windows_symbolic TARGET)
if(NOT EXISTS ${final_path}/${src}.cc OR NOT EXISTS ${final_path}/${src}.cu)
message(
FATAL
" ${src}.cc and ${src}.cu must exsits, and ${src}.cu must be symbolic file."
" ${src}.cc and ${src}.cu must exists, and ${src}.cu must be symbolic file."
)
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ bool CustomGenericPlugin::supportsFormatCombination(
PADDLE_ENFORCE_EQ(input_num + output_num,
format_combination.size(),
common::errors::InvalidArgument(
"Expexted %d format_combination, but got %d.",
"Expected %d format_combination, but got %d.",
input_num + output_num,
format_combination.size()));
format_combinations.emplace_back(format_combination);
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/backends/gpu/gpu_primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ CUDA_ATOMIC_WRAPPER(Add, phi::dtype::float16) {
}
#else
CUDA_ATOMIC_WRAPPER(Add, phi::dtype::float16) {
// concrete packed float16 value may exsits in lower or higher 16bits
// concrete packed float16 value may exist in lower or higher 16bits
// of the 32bits address.
uint32_t *address_as_ui = reinterpret_cast<uint32_t *>(
reinterpret_cast<char *>(address) -
Expand Down Expand Up @@ -347,7 +347,7 @@ CUDA_ATOMIC_WRAPPER(Add, phi::dtype::bfloat16) {
}
#else
CUDA_ATOMIC_WRAPPER(Add, phi::dtype::bfloat16) {
// concrete packed bfloat16 value may exsits in lower or higher 16bits
// concrete packed bfloat16 value may exist in lower or higher 16bits
// of the 32bits address.
uint32_t *address_as_ui = reinterpret_cast<uint32_t *>(
reinterpret_cast<char *>(address) -
Expand Down
8 changes: 4 additions & 4 deletions paddle/phi/kernels/cpu/masked_select_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ void MaskedSelectGradKernel(const Context& dev_ctx,
// x_grad.size() == x.size()
// x.size() == mask.size(), no broadcast, expand_mask = false, expand_x =
// false x.size() < mask.size(), x broadcast to mask, expand_mask = false,
// expand_x = true x.size() > mask.size(), mask broadcast to x, epxand_mask =
// expand_x = true x.size() > mask.size(), mask broadcast to x, expand_mask =
// true, expand_x = false
DenseTensor mask_expand;
DenseTensor x_grad_expand;
bool expand_x = false;

auto expanded_size = funcs::MatrixGetBroadcastBatchPortion(
common::vectorize(x_grad->dims()), common::vectorize(mask.dims()));
auto expaned_dims = common::make_ddim(expanded_size);
auto expanded_dims = common::make_ddim(expanded_size);

if (mask.dims() != expaned_dims) {
if (mask.dims() != expanded_dims) {
ExpandKernel<bool, Context>(
dev_ctx, mask, IntArray(expanded_size), &mask_expand);
} else {
mask_expand = mask;
}

if (x_grad->dims() != expaned_dims) {
if (x_grad->dims() != expanded_dims) {
x_grad_expand = Empty<T, Context>(dev_ctx, IntArray(expanded_size));
expand_x = true;
} else {
Expand Down
8 changes: 4 additions & 4 deletions paddle/phi/kernels/gpu/masked_select_grad_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,24 @@ void MaskedSelectGradKernel(const Context& dev_ctx,
// x_grad.size() == x.size()
// x.size() == mask.size(), no broadcast, expand_mask = false, expand_x =
// false x.size() < mask.size(), x broadcast to mask, expand_mask = false,
// expand_x = true x.size() > mask.size(), mask broadcast to x, epxand_mask =
// expand_x = true x.size() > mask.size(), mask broadcast to x, expand_mask =
// true, expand_x = false
DenseTensor mask_expand;
DenseTensor x_grad_expand;
bool expand_x = false;

auto expanded_size = funcs::MatrixGetBroadcastBatchPortion(
common::vectorize(x_grad->dims()), common::vectorize(mask.dims()));
auto expaned_dims = common::make_ddim(expanded_size);
auto expanded_dims = common::make_ddim(expanded_size);

if (mask.dims() != expaned_dims) {
if (mask.dims() != expanded_dims) {
ExpandKernel<bool, Context>(
dev_ctx, mask, IntArray(expanded_size), &mask_expand);
} else {
mask_expand = mask;
}

if (x_grad->dims() != expaned_dims) {
if (x_grad->dims() != expanded_dims) {
x_grad_expand = Empty<T, Context>(dev_ctx, IntArray(expanded_size));
expand_x = true;
} else {
Expand Down
6 changes: 3 additions & 3 deletions paddle/phi/kernels/gpu/masked_select_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ void MaskedSelectKernel(const Context& dev_ctx,
auto expanded_size = funcs::MatrixGetBroadcastBatchPortion(
common::vectorize(x.dims()), common::vectorize(mask.dims()));

DDim epxand_dims = common::make_ddim(expanded_size);
if (mask.dims() != epxand_dims) {
DDim expand_dims = common::make_ddim(expanded_size);
if (mask.dims() != expand_dims) {
phi::ExpandKernel<bool, Context>(
dev_ctx, mask, IntArray(expanded_size), &mask_expand);
} else {
mask_expand = mask;
}

if (x.dims() != epxand_dims) {
if (x.dims() != expand_dims) {
phi::ExpandKernel<T, Context>(
dev_ctx, x, IntArray(expanded_size), &x_expand);
} else {
Expand Down
72 changes: 36 additions & 36 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ EOF
exec_times=0
exec_time_array=('first' 'second' 'third')
exec_retry_threshold=10
is_retry_execuate=0
is_retry_execute=0
if [ -n "$failed_test_lists" ];then
mactest_error=1
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(" | sed 's/(//' | sed 's/- //' )
Expand Down Expand Up @@ -768,7 +768,7 @@ EOF
done
else
# There are more than 10 failed unit tests, so no unit test retry
is_retry_execuate=1
is_retry_execute=1
fi

fi
Expand Down Expand Up @@ -868,7 +868,7 @@ set +x
exec_time_array=('first' 'second' 'third' 'fourth')
parallel_failed_tests_exec_retry_threshold=120
exec_retry_threshold=30
is_retry_execuate=0
is_retry_execute=0
rerun_ut_startTime_s=`date +%s`
if [ -n "$failed_test_lists" ];then
EXIT_CODE=1
Expand All @@ -883,21 +883,21 @@ set +x
do
if [[ "${exec_times}" == "0" ]] ;then
if [ $need_retry_ut_count -lt $parallel_failed_tests_exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
elif [[ "${exec_times}" == "1" ]] ;then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
fi
if [[ "$is_retry_execuate" == "0" ]];then
if [[ "$is_retry_execute" == "0" ]];then
set +e
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
Expand Down Expand Up @@ -1788,7 +1788,7 @@ set +x
exec_time_array=('first' 'second' 'third' 'fourth')
parallel_failed_tests_exec_retry_threshold=120
exec_retry_threshold=30
is_retry_execuate=0
is_retry_execute=0
rerun_ut_startTime_s=`date +%s`
if [ -n "$failed_test_lists" ];then
if [ ${TIMEOUT_DEBUG_HELP:-OFF} == "ON" ];then
Expand All @@ -1802,21 +1802,21 @@ set +x
do
if [[ "${exec_times}" == "0" ]] ;then
if [ $need_retry_ut_count -lt $parallel_failed_tests_exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
elif [[ "${exec_times}" == "1" ]] ;then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
fi
if [[ "$is_retry_execuate" == "0" ]];then
if [[ "$is_retry_execute" == "0" ]];then
set +e
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
Expand Down Expand Up @@ -1964,15 +1964,15 @@ function show_ut_retry_result() {
else
exec_retry_threshold_count=80
fi
if [[ "$is_retry_execuate" != "0" ]] && [[ "${exec_times}" == "0" ]] ;then
if [[ "$is_retry_execute" != "0" ]] && [[ "${exec_times}" == "0" ]] ;then
failed_test_lists_ult=`echo "${failed_test_lists}" | grep -Po '[^ ].*$'`
echo "========================================="
echo "There are more than ${exec_retry_threshold_count} failed unit tests in parallel test, so no unit test retry!!!"
echo "========================================="
echo "The following tests FAILED: "
echo "${failed_test_lists_ult}"
exit 8;
elif [[ "$is_retry_execuate" != "0" ]] && [[ "${exec_times}" == "1" ]];then
elif [[ "$is_retry_execute" != "0" ]] && [[ "${exec_times}" == "1" ]];then
failed_test_lists_ult=`echo "${failed_test_lists}" | grep -Po '[^ ].*$'`
echo "========================================="
echo "There are more than 10 failed unit tests, so no unit test retry!!!"
Expand Down Expand Up @@ -2443,7 +2443,7 @@ set +x
exec_times=0
exec_time_array=('first' 'second' 'third' 'fourth')
exec_retry_threshold=10
is_retry_execuate=0
is_retry_execute=0
if [ -n "$failed_test_lists" ];then
xputest_error=1
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(" | sed 's/(//' | sed 's/- //' )
Expand Down Expand Up @@ -2488,7 +2488,7 @@ set +x
done
else
# There are more than 10 failed unit tests, so no unit test retry
is_retry_execuate=1
is_retry_execute=1
fi

fi
Expand Down Expand Up @@ -2588,7 +2588,7 @@ set +x
exec_time_array=('first' 'second' 'third' 'fourth')
parallel_failed_tests_exec_retry_threshold=120
exec_retry_threshold=30
is_retry_execuate=0
is_retry_execute=0
rerun_ut_startTime_s=`date +%s`
if [ -n "$failed_test_lists" ];then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
Expand All @@ -2599,21 +2599,21 @@ set +x
do
if [[ "${exec_times}" == "0" ]] ;then
if [ $need_retry_ut_count -lt $parallel_failed_tests_exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
elif [[ "${exec_times}" == "1" ]] ;then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
fi
if [[ "$is_retry_execuate" == "0" ]];then
if [[ "$is_retry_execute" == "0" ]];then
set +e
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
Expand Down Expand Up @@ -2989,7 +2989,7 @@ set +x
exec_time_array=('first' 'second' 'third' 'fourth')
parallel_failed_tests_exec_retry_threshold=120
exec_retry_threshold=30
is_retry_execuate=0
is_retry_execute=0
rerun_ut_startTime_s=`date +%s`
if [ -n "$failed_test_lists" ];then
if [ ${TIMEOUT_DEBUG_HELP:-OFF} == "ON" ];then
Expand All @@ -3003,21 +3003,21 @@ set +x
do
if [[ "${exec_times}" == "0" ]] ;then
if [ $need_retry_ut_count -lt $parallel_failed_tests_exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
elif [[ "${exec_times}" == "1" ]] ;then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
fi
if [[ "$is_retry_execuate" == "0" ]];then
if [[ "$is_retry_execute" == "0" ]];then
set +e
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
Expand Down Expand Up @@ -3110,7 +3110,7 @@ set +x
exec_time_array=('first' 'second' 'third' 'fourth')
parallel_failed_tests_exec_retry_threshold=120
exec_retry_threshold=30
is_retry_execuate=0
is_retry_execute=0
rerun_ut_startTime_s=`date +%s`
if [ -n "$failed_test_lists" ];then
if [ ${TIMEOUT_DEBUG_HELP:-OFF} == "ON" ];then
Expand All @@ -3124,21 +3124,21 @@ set +x
do
if [[ "${exec_times}" == "0" ]] ;then
if [ $need_retry_ut_count -lt $parallel_failed_tests_exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
elif [[ "${exec_times}" == "1" ]] ;then
need_retry_ut_str=$(echo "$failed_test_lists" | grep -oEi "\-.+\(.+\)" | sed 's/(.\+)//' | sed 's/- //' )
need_retry_ut_arr=(${need_retry_ut_str})
need_retry_ut_count=${#need_retry_ut_arr[@]}
if [ $need_retry_ut_count -lt $exec_retry_threshold ];then
is_retry_execuate=0
is_retry_execute=0
else
is_retry_execuate=1
is_retry_execute=1
fi
fi
if [[ "$is_retry_execuate" == "0" ]];then
if [[ "$is_retry_execute" == "0" ]];then
set +e
retry_unittests_record="$retry_unittests_record$failed_test_lists"
failed_test_lists_ult=`echo "${failed_test_lists}" |grep -Po '[^ ].*$'`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _create_job_list(self):
# TODO(luchang): Fix the graident explosion issue when num_model_chunks(accumulate steps) > pp_degree
assert (
num_micro_batches <= pp_degree
), "zbvpp now only supports accumulate steps <= pp degree. It will cause gradient expolitation when accumulate steps > pp degree."
), "zbvpp now only supports accumulate steps <= pp degree. It will cause gradient exploitation when accumulate steps > pp degree."

program_runtimes = self.get_attr("program_runtimes")

Expand Down
4 changes: 2 additions & 2 deletions test/cpp/pir/cinn/file_tile_config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ void RemoveDir(const cinn::common::Target target,
if (PathExists(test_path)) {
std::string full_test_name = test_path + file_name;
std::remove(full_test_name.c_str());
LOG(INFO) << "File exsit.";
LOG(INFO) << "File exist.";
} else {
LOG(INFO) << "File doesn't exsit.";
LOG(INFO) << "File doesn't exist.";
}
};
std::string root_path = FLAGS_cinn_tile_config_filename_label;
Expand Down
Loading

0 comments on commit 9e55fcd

Please sign in to comment.