已关闭
[Bug-Report|缺陷反馈]: 修复 autofuse/ascir/reg_func/defalut_reg_func.h 文件名拼写错误 #223
Yeats_Liao创建于 8月2日关闭于 19 天前
8月2日 issue类型由 任务 改变为 缺陷
wei_shi
8月3日 评论:
8月3日 评论:
autofuse/ascir/reg_func/defalut_reg_func.h 文件名拼写确实存在错误,影响阅读体验,但是不影响功能,可以进行修改,修改方案明确


8月3日 将 wei_shi 设为负责人
wei_shi
8月3日 评论:
8月3日 评论:
简单任务,已放共建任务清单中,欢迎开源小伙伴领取,熟悉代码上库流程


20 天前 关联了pull request:fix: 修改文件名default拼写错误
19 天前 issue状态由 待办的 改变为 已完成
19 天前 关闭了 issue
19 天前 添加了label:resolved
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优先级:低(不影响功能,仅影响代码质量与可读性)。