Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
在 autofuse/ascir/reg_func/ 目录下,头文件 defalut_reg_func.h 的文件名存在拼写错误:
autofuse/ascir/reg_func/
defalut_reg_func.h
default_reg_func.h
单词 default 被误写成了 defalut(字母 l 与 a 的位置颠倒)。
default
defalut
l
a
该头文件被至少 38 个文件 #include 引用,主要影响:
#include
default_reg_func.cpp
引用该头文件的主要文件包括:
abs.cpp
argmax.cpp
cast.cpp
pad.cpp
split.cpp
autofuse/ascir/generator/v1_ascir_codegen_impl.h
autofuse/v35/ascir/generator/v2_ascir_codegen_impl.h
autofuse/v35/ascir/reg_func/exp2_v2.cpp
pow_v2.cpp
autofuse/tests/ut/ascir/reg_func/
sh build.sh -u --module=autofuse_ascendc_api -c -j 8
在仓库根目录执行以下命令,查看 reg_func 目录下的头文件名:
reg_func
ls autofuse/ascir/reg_func/
可以看到存在 defalut_reg_func.h 文件。
搜索该拼写错误被引用的范围:
grep -rl "defalut_reg_func.h" --include='*.cpp' --include='*.h' --include='*.cc' .
返回至少 38 个引用该错误文件名的文件。
对比同目录实现文件:
ls autofuse/ascir/reg_func/ | grep reg_func
可看到实现文件名为 default_reg_func.cpp(拼写正确),而头文件名为 defalut_reg_func.h(拼写错误),两者命名不一致。
#include "defalut_reg_func.h"
#include "default_reg_func.h"
无运行时错误日志(本问题为静态代码命名缺陷,不影响编译和运行)。
可通过以下命令确认缺陷存在:
# 确认头文件错误命名 ls autofuse/ascir/reg_func/defalut_reg_func.h # 确认同目录实现文件命名正确 ls autofuse/ascir/reg_func/default_reg_func.cpp # 确认错误命名的引用范围(返回 38+ 文件) grep -rl "defalut_reg_func.h" --include='*.cpp' --include='*.h' --include='*.cc' .
建议的修复步骤:
git mv autofuse/ascir/reg_func/defalut_reg_func.h autofuse/ascir/reg_func/default_reg_func.h
grep -rl 'defalut_reg_func.h' --include='*.cpp' --include='*.h' --include='*.cc' . | \ xargs sed -i 's/defalut_reg_func\.h/default_reg_func.h/g'
优先级:低(不影响功能,仅影响代码质量与可读性)。
待分析处理
简单任务,已放共建任务清单中,欢迎开源小伙伴领取,熟悉代码上库流程
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
在
autofuse/ascir/reg_func/目录下,头文件defalut_reg_func.h的文件名存在拼写错误:defalut_reg_func.hdefault_reg_func.h单词
default被误写成了defalut(字母l与a的位置颠倒)。该头文件被至少 38 个文件
#include引用,主要影响:#include语句中;default_reg_func.h而找不到文件;default_reg_func.cpp(拼写正确),但头文件却是defalut_reg_func.h(拼写错误),两者命名不一致,极易混淆。引用该头文件的主要文件包括:
autofuse/ascir/reg_func/下 34 个算子实现文件(如abs.cpp、argmax.cpp、cast.cpp、pad.cpp、split.cpp、default_reg_func.cpp等)autofuse/ascir/generator/v1_ascir_codegen_impl.hautofuse/v35/ascir/generator/v2_ascir_codegen_impl.hautofuse/v35/ascir/reg_func/exp2_v2.cpp、pow_v2.cppautofuse/tests/ut/ascir/reg_func/下的测试文件Environment / 环境信息 (Mandatory / 必填)
sh build.sh -u --module=autofuse_ascendc_api -c -j 8Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
在仓库根目录执行以下命令,查看
reg_func目录下的头文件名:ls autofuse/ascir/reg_func/可以看到存在
defalut_reg_func.h文件。搜索该拼写错误被引用的范围:
grep -rl "defalut_reg_func.h" --include='*.cpp' --include='*.h' --include='*.cc' .返回至少 38 个引用该错误文件名的文件。
对比同目录实现文件:
ls autofuse/ascir/reg_func/ | grep reg_func可看到实现文件名为
default_reg_func.cpp(拼写正确),而头文件名为defalut_reg_func.h(拼写错误),两者命名不一致。Describe the expected behavior / 预期结果 (Mandatory / 必填)
default_reg_func.h(拼写正确);#include "defalut_reg_func.h"应更新为#include "default_reg_func.h";default_reg_func.cpp的命名保持一致;Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
无运行时错误日志(本问题为静态代码命名缺陷,不影响编译和运行)。
可通过以下命令确认缺陷存在:
# 确认头文件错误命名 ls autofuse/ascir/reg_func/defalut_reg_func.h # 确认同目录实现文件命名正确 ls autofuse/ascir/reg_func/default_reg_func.cpp # 确认错误命名的引用范围(返回 38+ 文件) grep -rl "defalut_reg_func.h" --include='*.cpp' --include='*.h' --include='*.cc' .Special notes for this issue/备注 (Optional / 选填)
建议的修复步骤:
git mv autofuse/ascir/reg_func/defalut_reg_func.h autofuse/ascir/reg_func/default_reg_func.hgrep -rl 'defalut_reg_func.h' --include='*.cpp' --include='*.h' --include='*.cc' . | \ xargs sed -i 's/defalut_reg_func\.h/default_reg_func.h/g'sh build.sh -u --module=autofuse_ascendc_api -c -j 8优先级:低(不影响功能,仅影响代码质量与可读性)。