Closed
[Documentation|文档反馈]: Torch 扩展构建说明没有注明两种命令各自的执行目录 #7713
daishuangshuangAdd on 23 days agoClosed at 18 days ago
23 days ago Assign chenqi317 as responsible person
yuning_chen
23 days ago Comments:
23 days ago Comments:
yuning_chen
23 days ago Comments:
23 days ago Comments:
您好,该问题已收到,当前问题 @chenqi317 正在处理中


22 days ago changed custom category from 任务 to 缺陷
22 days ago Assign fanqirui as responsible person, remove original responsible person: chenqi317
22 days ago Assign fanqirui as responsible person, remove original responsible person: chenqi317
yuning_chen
22 days ago Comments:
22 days ago Comments:
您好,该问题已收到,当前问题 @fanqirui 正在处理中


19 days ago Assign cong-jiyu as responsible person
19 days ago Removed responsible person fanqirui
18 days ago Associated pull request
18 days ago Deleted associated pull request: torch补充资料
18 days ago Associated pull request
18 days ago Deleted associated pull request: torch补充资料
18 days ago Associated pull request
18 days ago Close issue
18 days ago Added label: resolved
chenjiayi_
10 days ago Comments:
10 days ago Comments:
补充说明本问题的修复结果:
结论:两种构建方式各自的执行目录与产物目录已写入 README,按文档顺序执行不再需要手动推测目录。
修复内容(文档):
torch_extension/README.md方式一:新增「执行目录:仓库根目录(build.sh位于根目录,产物输出到build_out/)」。- 方式二:新增「执行目录:
torch_extension/(打包配置setup.py位于该目录,仓库根目录下无法执行;产物输出到torch_extension/dist/)」,并在命令块首行补cd torch_extension。 - 安装章节:区分两种产物路径,方式二用
dist/*.whl,方式一用build_out/cann_ops_nn*.whl。 - 目录结构树:
build.sh由torch_extension/下移到仓库根目录,与实际位置一致。
验证:
- 按修改后的文档逐条核对:方式一在仓库根目录执行、产物在
build_out/;方式二在torch_extension/执行、产物在torch_extension/dist/;安装命令路径与上述产物目录对应。
该 issue 已随修复合入关闭。


4 days ago changed custom state from 待办的 to 已完成
1)标题
Torch 扩展构建说明没有注明两种命令各自的执行目录
2)文档链接
torch_extension/README.md(第 19 行起)
3)问题文档片段
第 19—23 行:
第 55—65 行:
4)存在的问题(选填)
方式一的
build.sh位于仓库根目录,方式二所需的打包配置则位于torch_extension目录。文档没有提醒读者在两种方式之间切换目录,因此无法在同一个工作目录下直接照抄全部命令。如果沿用方式一的仓库根目录执行
python3 -m build --wheel -n,该目录没有setup.py或pyproject.toml;如果一开始就在torch_extension目录,方式一又找不到那里的build.sh。建议明确写出:方式一从仓库根目录执行;方式二先执行
cd torch_extension,再安装依赖和打包,并说明相应的产物目录。可对照根目录构建脚本和扩展打包配置核实。