Thanks for sending a feature request! Please fill in the following template. 感谢提交功能需求!请填写以下模板。
说明:仓库根目录无 third_party/ 实体目录、无 .gitmodules;third_party/makeself 由 CMake FetchContent 在打包阶段按需下载(见 cmake/third_party/makeself-fetch.cmake)。C++ 源码(src/)经全量扫描未发现任何非标准库三方头文件引用。
third_party/
.gitmodules
third_party/makeself
FetchContent
cmake/third_party/makeself-fetch.cmake
src/
import yaml
classify_rule.yaml
setup.py
setup.cfg
pyproject.toml
wheel
import decorator
import sympy
import attrs
import attr
pkg_parser.py
attrs
test_helper.py
gen_data.py
compare_data.py
np.fromfile
np.empty
torch.fft.fft/fft2/rfft/irfft
.run
cmake/package.cmake
makeself_built_in.cmake
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
install_deps.sh
requirements.txt
以上 6 项均为「声明未用」,删除声明即可,零代码改动、零风险。删除后 requirements.txt 仅保留实际使用的 numpy、torch(需补充声明)。
gensub
pigz
gzip
torch.fft.*
*.py
import
Third_Party_Open_Source_Software_List.yaml
build.sh
当前已梳理依赖组件,消除优化中。
Thanks for sending a feature request! Please fill in the following template.
感谢提交功能需求!请填写以下模板。
Feature Description / 功能描述
ops-fft 三方依赖必要性分析与消减报告
概览
依赖分析表
import yaml,classify_rule.yaml等 YAML 文件未被 Python 读取;声明未用setup.py/setup.cfg/pyproject.toml,Python 脚本均为独立工具脚本,未做 Python 包打包;声明未用wheel未被任何脚本 import;声明未用import decorator,未使用其能力;声明未用import sympy;声明未用import attrs/import attr;pkg_parser.py中attrs仅为普通变量名,非库引用;声明未用test_helper.py、各算子gen_data.py/compare_data.py深度使用np.fromfile/np.empty等;事实标准数值库test_helper.py、各gen_data.py使用torch.fft.fft/fft2/rfft/irfft作为 golden,使用面集中但不可替代(FFT 参考实现).run安装包cmake/package.cmake/makeself_built_in.cmake打包阶段使用,非运行时;来源为受控 URL+SHA256 校验,非 vendored 源码CMakeLists.txt声明cmake_minimum_required(VERSION 3.16)install_deps.sh/打包脚本使用 awk 解析版本;系统通常自带 awk,gawk 为显式依赖install_deps.sh中安装失败可忽略(非致命),使用面窄install_deps.sh强制安装,但仓库内未见显式调用脚本;疑似遗留依赖消减结论
高优先级消减项(建议消除,低工作量、高收益)
import yaml,声明未用,直接从requirements.txt删除。import decorator,声明未用,删除。import sympy,声明未用,删除。import attrs/import attr(pkg_parser.py中为变量名),声明未用,删除。待评估依赖(建议评估可消除性)
install_deps.sh强制安装 gawk,但脚本中 awk 用法多为 POSIX 兼容(版本解析、字段切分)。需确认是否有用到 gawk 专有扩展(如gensub、多维数组),若无可改用系统自带 awk,去除强制安装。pigz,若可改用系统gzip则从主依赖链移除。install_deps.sh强制安装且失败即退出,但仓库内未见显式调用。需确认是否有隐藏调用(如打包脚本中换行符处理),无则移除。需保留的核心依赖
torch.fft.*),不可替代。当前未在 requirements.txt 声明,建议补充声明,可标注为测试/开发依赖。.run自解压包的必需工具,已为受控下载+SHA256 校验,保留。附:分析依据
requirements.txt(pyyaml、setuptools、wheel、decorator、sympy、attrs)。*.py的import扫描,实际使用 numpy、torch(均未声明)。Third_Party_Open_Source_Software_List.yaml与cmake/third_party/makeself-fetch.cmake;无third_party/实体目录、无.gitmodules。install_deps.sh(gawk、python3、gcc、cmake、make、pigz、dos2unix)、CMakeLists.txt、build.sh。src/全量头文件扫描,仅引用 C++ 标准库与 CANN SDK 头文件,无额外三方 C++ 库。Use Case / 应用场景
Expected Behavior / 期望行为
Additional Information / 附加信息