| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
恢复run包构建 Co-authored-by: taoyuan_guo<guotaoyuan1@h-partners.com> # message auto-generated for no-merge-commit merge: !233 merge run_package into dev 恢复run包构建 Created-by: changetheway Commit-by: changetheway;taoyuan_guo Merged-by: ascend-robot Description: 修改方案: 1)将setup.py和原本的build.sh解耦,原来的算子编译和plugin编译在build.sh中执行,setup.py需要调用build.sh 2)build.sh改成两步:运行setup.py生成whl包、构建run包所需的tar.gz包 这样,既可以使用现在的python setup.py bdist_wheel构建whl包,也可以执行bash build.sh恢复run包构建 See merge request: Ascend/MindIE-SD!233 | 3 个月前 | |
[Feature][ops]迁移 fused infer attention score 算子到 MindIE-SD Co-authored-by: HAAZZZEEEE<wang-taicheng@qq.com> # message auto-generated for no-merge-commit merge: !407 merge haze/mig_fia_to_mindiesd into dev [Feature][ops]迁移 fused infer attention score 算子到 MindIE-SD Created-by: HAAZZZEEEE Commit-by: HAAZZZEEEE Merged-by: lanwangli Description: # Which issue(s) this PR fixes or accomplishes Fix part of #ISSUE 198 # Purpose 本 PR 将 fused infer attention score 算子迁移到 MindIE-SD。 主要变更: - 新增 csrc/ops/fused_infer_attention_score/ 下的算子实现,包括 op api、op host tiling/checker、op kernel、fallback graph 路径和 UT 框架。 - 新增 csrc/ops/common/、csrc/ops/incre_flash_attention/、csrc/ops/prompt_flash_attention/ 下的 FIA/flash-attention 公共 host 与 kernel 工具。 - 接入 fused infer attention score plugin,并更新相关 CMake/build 脚本。 - 新增 Python 层入口 mindiesd/layers/flash_attn/fused_infer_attention_score.py。 - 新增 tests/ops/fused_infer_attention_score/ 下的测试入口和 UT 脚本。 - 同步更新中英文 quantization 文档。 # Test Plan - 编译算子组件: - bash build/build_ops.sh - bash build/build_ascendc_ops.sh - 运行 fused infer attention score UT: - bash tests/ops/fused_infer_attention_score/run_fia_arch35_ut.sh - 运行 Python 侧 fused infer attention score 测试: - pytest tests/ops/fused_infer_attention_score/test_fused_infer_attention_score_v2.py - Wan2.2 5B TI2V w8a8f8推理测试 # Test Report 待补充: - bash build/build_ops.sh: ok - bash build/build_ascendc_ops.sh: ok - bash tests/ops/fused_infer_attention_score/run_fia_arch35_ut.sh: passed - pytest tests/ops/fused_infer_attention_score/test_fused_infer_attention_score_v2.py: passed - Wan2.2 5B TI2V w8a8f8推理测试正常 See merge request: Ascend/MindIE-SD!407 | 29 天前 | |
[Feature][build]支持多 torch 版本 wheel 打包 Co-authored-by: guowenna1<guowenna1@huawei.com> # message auto-generated for no-merge-commit merge: !342 merge pypi into dev [Feature][build]支持多 torch 版本 wheel 打包 Created-by: guowenna1 Commit-by: guowenna1 Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes https://gitcode.com/Ascend/MindIE-SD/issues/180 # Purpose 本 PR 支持构建一个可适配多个 torch 版本的 MindIE-SD wheel 包,同时保留原有固定 torch 版本构建方式。 主要变更: - 新增 MINDIESD_WHEEL_MODE=multi_torch 打包模式。 - 默认仍保持原有固定 torch 版本构建方式不变。 - 运行时根据当前 torch.__version__ 自动选择对应的 libPTAExtensionOPS.so。 - 支持在同一个 wheel 中包含 torch 2.6、2.7、2.8、2.9、2.10 对应的 plugin 动态库。 - 新增 build/build_multi_torch_wheel.sh,用于从已准备好的 torch 容器中编译并收集多版本 plugin。 - 更新 package data 规则,支持打包 plugin/torchXX/*.so。 - 将 distribution 标记为二进制包,便于后续通过 auditwheel 修复为 PyPI 可接受的 manylinux wheel。 - 支持通过 ASCEND_OP_NAME 和 ASCEND_COMPUTE_UNIT 配置 Ascend ops 构建范围。 # Test Plan 可按以下方式验证: 1. 检查 Python 和 shell 语法: ``bash python3 -m py_compile setup.py mindiesd/layers/register_ops.py bash -n build/build_ops.sh bash -n build/build_multi_torch_wheel.sh 构建多 torch 版本 wheel: bash bash build/build_multi_torch_wheel.sh 检查 wheel 中是否包含多版本 plugin: bash python3 - <<'PY' import zipfile from pathlib import Path wheel = Path("dist/mindiesd-3.0.0-cp311-cp311-linux_aarch64.whl") with zipfile.ZipFile(wheel) as zf: libs = sorted(name for name in zf.namelist() if name.endswith("libPTAExtensionOPS.so")) print("\n".join(libs)) PY 修复为 PyPI 可接受的 manylinux wheel: bash python3 -m auditwheel repair \ --plat manylinux_2_34_aarch64 \ -w dist/repaired \ dist/mindiesd-3.0.0-cp311-cp311-linux_aarch64.whl 检查上传包元数据: bash python3 -m twine check dist/repaired/*.whl Test Report 已执行以下检查: bash python3 -m py_compile setup.py mindiesd/layers/register_ops.py bash -n build/build_ops.sh bash -n build/build_multi_torch_wheel.sh 结果:通过。 已在以下容器中验证 multi-torch wheel 构建流程: lala_torch26 lala_torch27 lala_torch28 lala_torch29 lala_torch210 生成的 wheel 包含以下 plugin: mindiesd/plugin/torch26/libPTAExtensionOPS.so mindiesd/plugin/torch27/libPTAExtensionOPS.so mindiesd/plugin/torch28/libPTAExtensionOPS.so mindiesd/plugin/torch29/libPTAExtensionOPS.so mindiesd/plugin/torch210/libPTAExtensionOPS.so PyPI 上传包检查: bash python3 -m twine check dist/repaired/mindiesd-3.0.0-cp311-cp311-manylinux_2_34_aarch64.whl 结果:通过。 补充说明: 1. **变更类别** 功能增强 / 构建与发布 2. **影响文件** setup.py、pyproject.toml、mindiesd/layers/register_ops.py、build/build_ops.sh、build/build_multi_torch_wheel.sh`、quant flash attention 相关 opdef 文件。 See merge request: Ascend/MindIE-SD!342 | 1 个月前 | |
[Feature][ops]Add mul_add fused operator support Co-authored-by: wangwei<daviwang2026@qq.com> # message auto-generated for no-merge-commit merge: !481 merge feature/mul_add_ops_dev into dev [Feature][ops]Add mul_add fused operator support Created-by: daviwang Commit-by: wangwei Merged-by: ascend-robot Description: # Purpose 新增 mul_add 融合算子,支持在昇腾 NPU 上执行融合乘加计算: - 算子接口:mindiesd::mul_add(a, b, c) -> y - 计算公式:y = a + b * c - 输入 shape:a/b = [batch, seq_len, hidden_size],c = [batch, 1, hidden_size] - 支持数据类型:FP16、BF16 - 支持计算平台:ascend910b、ascend910_93、ascend950 主要变更: 1. 在 csrc/ops/mul_add/ 下新增算子定义(OpDef)、shape/dtype 推导(proto)、tiling 计算及 AscendC kernel 实现。 2. 在 csrc/plugin/ 下新增 mul_add PTA plugin,并在 register_ops.cpp 中注册到 mindiesd torch 库。 3. 更新 csrc/CMakeLists.txt,将 mul_add.cpp 加入 PTAExtensionOPS 编译。 4. 更新 build/build_ops.sh 默认算子列表,确保默认构建包含 mul_add。 5. 在 tests/ops/mul_add/ 下新增单元测试,覆盖基础 shape、典型 LLM shape、小 shape 边界及 FP16 精度场景。 # Test Plan > 设计了哪些测试内容,指导他人如何对你的PR进行测试\ > Apply information to show others your test design and how to test your Pull Request 1. 编译 AscendC 算子: bash cd build bash build_ops.sh 2. 编译 PTA plugin: bash cd build bash build_plugin.sh 3. 运行 mul_add 单元测试(需在 NPU 环境): bash cd tests/ops/mul_add python test_mul_add.py 4. 可选:通过环境变量指定 NPU 卡号: ``bash MINDIESD_TEST_NPU_ID=7 python test_mul_add.py # Test Report • 测试覆盖: • 基础小 shape:(1, 4, 128) • 典型 LLM shape:(1, 7200, 4608)、(1, 256, 4608)、(1, 7200, 3072)、(1, 256, 3072) • 多组小 shape 边界:(1, 1, 64) ~ (1, 64, 1024) • FP16 精度:(1, 256, 3072) • 参考实现:ref = a.float() + b.float() * c.float() • 精度阈值:rtol=1e-2, atol=1e-2 - 运行环境:CANN 9.1.T560, Ascend950PR NPU, Python 3.11, aarch64 - 所有新增测试用例均通过: - test_mul_add_basic PASSED - test_mul_add_typical PASSED - test_mul_add_small_shapes PASSED - test_mul_add_fp16` PASSED - 最大误差:BF16 < 1e-2,FP16 < 1e-2 See merge request: Ascend/MindIE-SD!481 | 6 天前 | |
[Refactor][build]Preserve cmake build dirs to enable incremental compilation Co-authored-by: changetheway<guotaoyuan1@h-partners.com> # message auto-generated for no-merge-commit merge: !304 merge incremental_build_1 into dev [Refactor][build]Preserve cmake build dirs to enable incremental compilation Created-by: changetheway Commit-by: changetheway Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes > Fix #131 # Purpose 本次修改旨在支持 cmake 增量编译,避免每次构建时删除构建目录导致缓存失效: 1. build/build_ascendc_ops.sh:移除 clean() 中的 rm -rf ${BUILD_DIR},删除冗余的 clean_build_dirs 死代码,改为直接保存 compile_commands.json 2. build/build_plugin.sh:移除 rm -rf build,将 plugin 构建目录从 build 独立为 plugin_build,避免与 ops 共用目录 3. setup.py:clean_build_dirs() 改为仅保存 compile_commands.json,不再删除 bdist.linux-*、custom_project_tik、lib、output 等目录;同步更新 plugin 相关路径为 plugin_build 4. .gitignore:新增 build/plugin_build/、build/bdist.linux-*/、build/lib/ 及 build/plugin_build/compile_commands.json 的忽略规则 # Test Plan - [x] 首次全量编译通过 - [x] 修改 csrc/ops/sparse_block_estimate 源码后再次编译,验证仅触发增量编译 - [x] 对比全量编译与增量编译耗时差异 # Test Report - 全量编译耗时:约 100s - 增量编译耗时:约30s See merge request: Ascend/MindIE-SD!304 | 2 个月前 | |
[Bugfix][build] Skip TIK operator build when CMake >= 4.1.0 Co-authored-by: changetheway<guotaoyuan1@h-partners.com> # message auto-generated for no-merge-commit merge: !298 merge fatik_build into dev [Bugfix][build] Skip TIK operator build when CMake >= 4.1.0 Created-by: changetheway Commit-by: changetheway Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes Fixes #[97] # Purpose 在 build_tik_ops.sh 中增加 CMake 版本检查。当检测到 CMake >= 4.1.0 时,跳过 TIK 算子构建并给出提示信息,避免链接失败。 # Test Plan - [x] CMake 3.28 环境:TIK 算子正常构建 - [x] CMake 4.3 环境:TIK 算子被跳过,输出警告信息,整体构建不中断 See merge request: Ascend/MindIE-SD!298 | 2 个月前 | |
[dev]同步最新代码 Co-authored-by: mazhixin00_00<mazhixin7@huawei.com> | 8 个月前 | |
feat: quant_flash_attn and quant_flash_attn_metadata operators Co-authored-by: lijinxi<lijinxi2@huawei.com> # message auto-generated for no-merge-commit merge: !313 merge dev into dev feat: quant_flash_attn and quant_flash_attn_metadata operators Created-by: weixin_44144262 Commit-by: lijinxi Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes > Fix part of #136 # Purpose 新增mxfp4的fa算子,配套的还有一个aicpu的metadata算子 # Test Plan 运行tests/ops/quant_flash_attn/quant_flash_attn_golden.py测试单算子精度 # Test Report  See merge request: Ascend/MindIE-SD!313 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 29 天前 | ||
| 1 个月前 | ||
| 6 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 8 个月前 | ||
| 1 个月前 |