已开启
feat(profiler): add CPU-to-NPU correlation for ACLprof #46050
denis_g创建于 9月8日
feat(profiler): add CPU-to-NPU correlation for ACLprof #46050
已开启
合并受阻
9月8日 添加了label:stat/needs-squash
9月8日 添加了label:needs-issue
9月8日 添加了label:ascend-cla/yes
ascend-robot
9月8日 评论:
9月8日 评论:
Linking Issue Notice
@denis_g , the pull request must be linked to at least one issue.
If an issue has already been linked, but the needs-issue label remains, you can remove the label by commenting /check-issue .


此处折叠了50条消息 查看更多
7 天前 删除了label:docs-ci-pipeline-success
7 天前 添加了label:docs-ci-pipeline-running
ascend-robot
7 天前 评论:
7 天前 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


7 天前 删除了label:docs-ci-pipeline-running
7 天前 添加了label:docs-ci-pipeline-success
This PR is blocked by feat(profiler): implement ACLprof backend for Kineto NPU activities
【合入来源】
【修改方案】
This PR adds CPU-to-NPU activity correlation for the ACLprof Kineto backend introduced by the parent ACLprof backend PR. It does not change ACLprof collection, backend selection, or the default MSPTI behavior.
The implementation connects ACLprof device kernels to their originating Kineto CPU activities through the task-queue and CANN profiling data path:
The main changes are:
Capture Kineto correlation IDs through the NPU task queue
Qwith the originating Kineto correlation IDK.Build enqueue/dequeue intervals for correlation
Resolve ACLprof kernels through HostToDevice activity
start_infoand convert exported timeline timestamps to theCLOCK_MONOTONIC_RAWdomain used by task-queue events.Provide CANN correlation fallback
Link ACLprof kernels to Kineto CPU activities
Qto its captured Kineto correlationK.getLinkedActivity().GenericTraceActivity::linkedfield sotorch.profiler.events()exposes a validlinked_correlation_idfor correlated ACLprof kernels.Add hardware-free unit coverage
Unit tests cover the complete correlation path and important fail-closed cases, including:
start_info;The PR intentionally does not include structured correlation diagnostics or Stage-2 diagnostic tooling. Those are reserved for the follow-up diagnostics PR.
【资料变更】
Not involved.
【接口变更】
Not involved.
No new customer-facing API is introduced. The existing ACLprof backend selection remains unchanged. This PR extends the behavior of ACLprof-generated
PrivateUse1activities by linking device kernels to their originating CPU activities through the existing Kinetolinked_correlation_idmechanism.【功能验证】
The implementation was verified with both hardware-free unit tests and integration tests on a real Ascend device.
Hardware-free profiler unit tests
AclprofActivityProfilerTestcases and 17 PR2 correlation-specific test cases.ACLprof CPU-to-NPU correlation integration test
Two sequential ACLprof profiler sessions were executed with task queue enabled:
The workload contains separate
MATMUL,RELU,ADD, andSINCPU scopes. The second profiler session additionally inserts CPU-only events to change the CPU correlation-ID layout and verify that no correlation state is reused from the first session.ACLprof/MSPTI regression and backend-isolation validation
The existing robust backend acceptance sequence was executed on the PR2 build:
【CheckList】