| Files | Last commit | Last update |
|---|---|---|
style(all): Remove trailing whitespace and add missing EOF newlines Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4916 merge style-cpp into master style(all): Remove trailing whitespace and add missing EOF newlines Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Remove trailing whitespace and add missing EOF newlines See merge request: cann/pypto!4916 | 4 months ago | |
feat(machine): Support ASCEND_RT_LAUNCH_BLOCKING for AICPU scheduling blocking Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5823 merge br_blocking into master feat(machine): Support ASCEND_RT_LAUNCH_BLOCKING for AICPU scheduling blocking Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: ## 修改意图 支持通过环境变量 ASCEND_RT_LAUNCH_BLOCKING=1 控制 AICPU 调度流阻塞下发,用于调试和时序问题排查场景。 ## 修改内容 ### 1. Adapter 层新增 API 加载 - AclRtNoBlockingLaunchBegin/End:从 libruntime.so 加载 aclrtNoBlockingLaunchBeginImpl/EndImpl(libascendcl.so 未导出这两个符号,实际实现位于 libruntime.so) - AclRtSetStreamAttribute:从 libascendcl.so 加载 aclrtSetStreamAttribute ### 2. 运行时阻塞控制 - common.h 新增 IsLaunchBlockingEnabled(),读取 ASCEND_RT_LAUNCH_BLOCKING 环境变量(static 缓存) - device_launcher.cpp 中 LaunchKernel:当 !IsCaptureMode() && IsLaunchBlockingEnabled() 时,用 AclRtNoBlockingLaunchBegin/End 包裹 sche stream 上的 AICPU 调度下发 ### 3. ST 测试用例 - 新增 test_blocking_launch.py,通过 spawn 子进程在 import torch 前继承环境变量验证功能 ## 改动文件 | 文件 | 说明 | |------|------| | framework/src/adapter/api/acl_api.cpp / acl_api.h | 新增 AclRtSetStreamAttribute、AclRtNoBlockingLaunchBegin/End 实现 | | framework/src/adapter/manager/types/acl_adapter_types.h | 新增 RtSetStreamAttribute 枚举与符号映射 | | framework/src/adapter/manager/types/runtime_adapter_types.h | 新增 NoBlockingLaunchBegin/End 枚举,映射到 aclrtNoBlockingLaunchBeginImpl/EndImpl | | framework/src/adapter/stubs/acl_stubs.cpp / acl_stubs.h | 新增 StubRtSetStreamAttribute stub | | framework/src/interface/utils/common.h | 新增 IsLaunchBlockingEnabled() | | framework/src/machine/runtime/launcher/device_launcher.cpp | LaunchKernel 中接入阻塞下发控制 | | python/tests/st/test_blocking_launch.py | 新增 ST 用例 | ## 验证 - 环境变量未设置时:行为不变(走原有 ring event / RunPreSync 同步) - ASCEND_RT_LAUNCH_BLOCKING=1 时:sche stream 非阻塞下发 - CANN 版本不兼容时(缺少符号)打印 warning 但不中断执行 Related Issue: #3188 See merge request: cann/pypto!5823 | 2 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago | |
fix(dfx): keep log time initialization dependency out of error header Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !6560 merge fix/log_localtime into 9.2.0 fix(dfx): keep log time initialization dependency out of error header Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: 性能用例批跑时,若线程在 libc 时间转换过程中持有 tzset_lock,此时被信号打断,TerminateHandler 回调打印日志会再次通过 std::localtime() 申请同一把锁,导致线程自我死锁。 修改内容 - 新增私有 log_time.h/.cpp,迁移 dlog 的整数日历换算算法。 - 在启动阶段初始化时区和夏令时配置,并在注册异常处理回调前显式确保初始化完成。 - 日志时间和文件名时间共用换算路径,运行期间不再调用 localtime/localtime_r/tzset。 - 保持原有日志格式、三位毫秒精度及文件名格式不变。 See merge request: cann/pypto!6560 | 2 months ago | |
fix(dfx): keep log time initialization dependency out of error header Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !6560 merge fix/log_localtime into 9.2.0 fix(dfx): keep log time initialization dependency out of error header Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: 性能用例批跑时,若线程在 libc 时间转换过程中持有 tzset_lock,此时被信号打断,TerminateHandler 回调打印日志会再次通过 std::localtime() 申请同一把锁,导致线程自我死锁。 修改内容 - 新增私有 log_time.h/.cpp,迁移 dlog 的整数日历换算算法。 - 在启动阶段初始化时区和夏令时配置,并在注册异常处理回调前显式确保初始化完成。 - 日志时间和文件名时间共用换算路径,运行期间不再调用 localtime/localtime_r/tzset。 - 保持原有日志格式、三位毫秒精度及文件名格式不变。 See merge request: cann/pypto!6560 | 2 months ago | |
fix(interface): Prevent dynamic kernel hash collision after reset Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !5617 merge 0822_hash into master fix(interface): Prevent dynamic kernel hash collision after reset Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 将DYNAMIC类型的Function magic与其他function分开管理,并且在复跑时不复用,避免在这一层计算哈希时哈希冲突 See merge request: cann/pypto!5617 | 3 months ago | |
fix(codegen): Propagate parallel task exceptions instead of swallowing them Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5266 merge compile_fix into master fix(codegen): Propagate parallel task exceptions instead of swallowing them Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: 1. 多线程 Codegen 确定性 Kernel 编译 Related Issue:[https://gitcode.com/cann/pypto/issues/2913](https://gitcode.com/cann/pypto/issues/2913) 2. Issue 背景:GenCode 内的 ExecuteParallelCompile 编译失败抛出 COMPILE_CODE_FAILED 被吞掉,leafDict[hash] = leaf 未执行,leafDict不完整。下游 ConstructCodeInfo → RunCompileAicoreKernelStage → RunEncodeStage 继续访问不完整的 leafDict,触发 std::unordered_map::at() 越界,抛出 F00003 RuntimeError: _Map_base::at 二次异常,掩盖了真实的编译错误 根因:codeGen在并行编译遇到错误抛出异常时,只记录日志,并不传播异常和终止剩余task,导致报错在第二现场F00003 RuntimeError: _Map_base::at处 解决方法:修改 ParallelExecuteAndWait,使其在 task 失败时记录错误、提前终止剩余 task、并在所有线程 join 后重新抛出首个 COMPILE_CODE_FAILED异常 修改前:  修改后:  See merge request: cann/pypto!5266 | 3 months ago | |
fix(codegen): Propagate parallel task exceptions instead of swallowing them Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5266 merge compile_fix into master fix(codegen): Propagate parallel task exceptions instead of swallowing them Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: 1. 多线程 Codegen 确定性 Kernel 编译 Related Issue:[https://gitcode.com/cann/pypto/issues/2913](https://gitcode.com/cann/pypto/issues/2913) 2. Issue 背景:GenCode 内的 ExecuteParallelCompile 编译失败抛出 COMPILE_CODE_FAILED 被吞掉,leafDict[hash] = leaf 未执行,leafDict不完整。下游 ConstructCodeInfo → RunCompileAicoreKernelStage → RunEncodeStage 继续访问不完整的 leafDict,触发 std::unordered_map::at() 越界,抛出 F00003 RuntimeError: _Map_base::at 二次异常,掩盖了真实的编译错误 根因:codeGen在并行编译遇到错误抛出异常时,只记录日志,并不传播异常和终止剩余task,导致报错在第二现场F00003 RuntimeError: _Map_base::at处 解决方法:修改 ParallelExecuteAndWait,使其在 task 失败时记录错误、提前终止剩余 task、并在所有线程 join 后重新抛出首个 COMPILE_CODE_FAILED异常 修改前:  修改后:  See merge request: cann/pypto!5266 | 3 months ago | |
refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago | |
feat(ir): Replace SourceLocation with ir::Span Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !3135 merge fix/span into master feat(ir): Replace SourceLocation with ir::Span Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. Fix CHECK macro compile conflict 2. Change Status to enum, this is part2 of compile conflict 3. Disable move constructor for logical_tensor 4. ir: Add fp64 dtype 5. ir: Add ScalarOpStmt, TensorOpStmt 6. ir: Add pybind for Add ScalarOpStmt, TensorOpStmt 7. ir: Rewrite span implement 8. Replace SourceLocation with ir::Span Related Issue: #1185 See merge request: cann/pypto!3135 | 6 months ago | |
Initial commit | 10 months ago | |
feat(indexing): Support A5 SIMT gather and index put Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !5404 merge feat/a5-simt-mixed into master feat(indexing): Support A5 SIMT gather and index put Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: gather indexput 支持的simt 实现,在离散场景下提升性能 当 Gather 的 source 位于 GM、indices 位于 UB 时,A5 Codegen 会选择 SIMT MGATHER 实现: 1. 使用 SIMD 批量计算 Gather 的元素偏移。 2. 使用 SIMT MGATHER 根据偏移直接从 GM source 读取数据。 3. source 位于 UB 时继续使用原有实现。 4. int64 indices 暂不使用 SIMT,回退到原有 Scalar 实现。 同时补充了 SIMT Kernel 的端到端识别与下发机制: 1. Pass 识别需要 SIMT 的 Gather,并设置 requiresSimt 属性。 2. 将 requiresSimt 信息传递到 Device Program 和编译流程。 3. 为包含 SIMT 的 A5 Kernel 生成相应的 ELF metadata。 4. Runtime 根据 Kernel 是否包含 SIMT,选择对应的 UB 配置。 5. SIMT Kernel 配置 216 KB 动态 UB,并为 DCache 预留 32 KB。 6. 纯 SIMD Kernel 保持原有 Runtime 下发方式和 UB 配置。 此外,完善了 GM GatherElement 在内存类型推导、动态参数注册、动态 valid shape 处理和 OoO 调度中的支持。 Related Issue: #3162 ``` 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!5404 | 2 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 6 months ago | ||
| 10 months ago | ||
| 2 months ago | ||
| 4 months ago |