Skip to content

Updated AOTI benchmarks - #448

Merged
shijieliu merged 7 commits into
NVIDIA:mainfrom
geoffreyQiu:aoti_benchmark
Aug 6, 2026
Merged

shijieliu merged 7 commits into
NVIDIA:mainfrom
geoffreyQiu:aoti_benchmark

Conversation

@geoffreyQiu

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@geoffreyQiu
geoffreyQiu marked this pull request as ready for review August 6, 2026 07:59
@geoffreyQiu geoffreyQiu changed the title Aoti benchmark Updated AOTI benchmarks Aug 6, 2026
@geoffreyQiu

Copy link
Copy Markdown
Collaborator Author

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds AOTI/Triton benchmarking and export-aligned serving support while optimizing HSTU KV-cache lookup, allocation, token stripping, and benchmark reporting.

  • Adds an export-aligned Triton Python backend and latency/correctness client.
  • Extends AOTI export, replay, and benchmark tooling for dynamic batch sizes.
  • Adds KV-cache fast paths and replaces allocation-stream host synchronization with event-based GPU ordering.
  • Adds an optimized fixed-feature-order implementation of cached-token stripping.

Confidence Score: 4/5

The PR should not merge until KV-cache allocation preserves the lifetime and contents of its host staging data through completion of the asynchronous copies.

Event-based GPU ordering protects downstream CUDA consumers, but it does not stop a later CPU allocation from overwriting the single pinned metadata buffer while the prior H2D transfer is still pending, allowing request metadata and KV page operations to become corrupted.

Files Needing Attention: corelib/recsys_kvcache_manager/src/gpu_kvcache_manager_impl.cpp

Important Files Changed

Filename Overview
corelib/recsys_kvcache_manager/src/gpu_kvcache_manager_impl.cpp Adds allocation fast paths and event-based cross-stream ordering, but permits the shared pinned metadata staging buffer to be reused before its prior asynchronous copy completes.
corelib/recsys_kvcache_manager/src/runtime/export_kvcache_runtime.cpp Optimizes CPU-side lookup and full-GPU-hit onboarding while preserving the runtime's CPU tensor placement contract.
examples/commons/ops/cuda_ops/csrc/kjt_aux_op.cpp Adds a vectorized cached-token stripping path for identity feature order and retains the general fallback.
examples/hstu/inference/triton/hstu_export_aligned/model.py Adds a validated, deployment-configured Triton Python backend aligned with the non-KV AOTI model conversion.
examples/hstu/inference_aoti/export_inference_gr_ranking_kvcache.py Updates dynamic-shape export and output handling for the logits-only no-offload model.
examples/hstu/inference_aoti/test_tritonserver_aoti_hstu_model.py Expands Triton benchmark and correctness coverage across supported dynamic batch sizes.

Sequence Diagram

sequenceDiagram
  participant Request as Triton/AOTI request
  participant Runtime as Export KV runtime
  participant Manager as GPU KV manager
  participant Alloc as Allocation CUDA stream
  participant Model as Model CUDA stream
  Request->>Runtime: lookup and allocate
  Runtime->>Manager: allocate metadata and pages
  Manager->>Alloc: async copy page table and metadata
  Manager->>Alloc: record completion event
  Manager->>Model: wait for completion event
  Manager-->>Runtime: return without host synchronization
  Runtime->>Model: onboard, append, and inference
  Model-->>Request: logits
Loading

Reviews (1): Last reviewed commit: "Fix default batch size" | Re-trigger Greptile

@shijieliu
shijieliu merged commit 3118b5f into NVIDIA:main Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants