为 Torch 版本 MegaKernel 增加运行时 Profiling 能力,用于观测单个融合 Kernel 内部各 AIC/AIV worker 的任务执行过程,解决常规 CANN/Torch Profiling 只能看到整个 MegaKernel 边界、无法定位内部等待和计算瓶颈的问题。
all_event_counters
profile_buffer
RuntimeConfigC
droppedCount
desc_id
task_id
stage_task_index
owner_id
stage_names
owner_label
mega_kernel_profile()
traceEvents
无
本身为DFX功能的一部分
multicore_profiler.schedule()/multicore_profiler.mega_kernel_profile()/profiler.step()
不影响对外API,会要求MegaKernel入参必须包含profiling_buffer一项
Thanks for contributing 🎉!
🚀 功能描述
为 Torch 版本 MegaKernel 增加运行时 Profiling 能力,用于观测单个融合 Kernel 内部各 AIC/AIV worker
的任务执行过程,解决常规 CANN/Torch Profiling 只能看到整个 MegaKernel 边界、无法定位内部等待和计算瓶颈的问题。
1. 使用场景
all_event_counters或内部profile_buffer。Chrome Trace Viewer 或其他兼容工具打开。
融合保持三个独立职责。
2. 功能需求
RuntimeConfigC独立决定是否采样,默认关闭droppedCountdesc_id、task_id、stage_task_index、owner_id等公共字段stage_names和owner_label时使用公共兜底,不影响采集和导出mega_kernel_profile()接口保持统一traceEvents兼容 Chromium Trace Event Format现有替代方案
无
与DFX相关性DF
本身为DFX功能的一部分
提议的新API
multicore_profiler.schedule()/multicore_profiler.mega_kernel_profile()/profiler.step()
是否影响现有API
不影响对外API,会要求MegaKernel入参必须包含profiling_buffer一项
补充信息
Thanks for contributing 🎉!