Add: benchmark paged attention unroll on host build graph - #1784
Conversation
Port Case1 and Case2 with the same parameters, signatures, and golden as the tensormap-and-ringbuffer scene. Reuse the existing orchestration and incore sources so both runtimes execute the same graph. Case3 remains excluded because the shared head_dim=256 kernels fail golden on both runtimes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an A2A3 host-build-graph paged-attention unroll benchmark. The test registers kernel bindings, defines two bfloat16 cases, builds task arguments, computes golden results, and executes the module. ChangesPaged-attention unroll benchmark
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SceneTestCase
participant generate_args
participant TaskArgsBuilder
participant paged_attention_utilities
SceneTestCase->>generate_args: create benchmark arguments
generate_args->>TaskArgsBuilder: add TensorArg and Scalar values
SceneTestCase->>paged_attention_utilities: compute golden result
paged_attention_utilities-->>SceneTestCase: return expected tensor values
SceneTestCase->>SceneTestCase: run_module
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
host_build_graphcounterpart ofpaged_attention_unrollCase1 and Case2.head_dim=256kernels fail golden on both runtimes.This is one workload-sized part of #1727.
Performance
Measured on one locked a2a3 NPU through
task-submit: eight adjacent TMR/HBG pairs, alternating order, ten rounds per process and case, with each case's first round excluded (72 steady samples per runtime/case).Paired device-wall changes (95% CI): Case1
-8.53%(-10.50%to-6.51%); Case2-12.55%(-16.01%to-8.96%). HBG is consistently faster on device; the measured host increase is in bind and validation.These measurements used simpler base
7a1b9b11and PTO-ISA pin0cefc9a5a1c24c62655cc345d408559595a8af32. Main later merged #1763, which removes redundant HBG arena initialization and explicitly leaves device time unchanged; the device comparison remains representative, while the host/bind values above are conservative pre-#1763 measurements.Performance job:
task_20260811_003357_606081246(NPU 3, exit 0).Testing
task_20260811_003020_385776328006