Repository navigation
feat: sync AITER operators, build fixes, and public dependencies - #13
Merged
Merged
Conversation
… asm and triton backends.
…he max_size limit for custom Allreduce input tensor
Migrate the fused metadata op from the Lightop Triton implementation to a native HIP kernel and optimize it for paged-attention inference: - fuse Phase-1 prefix scan (cache_seqlens_int32 / cu_seqlens_k) and Phase-2 page-table gather (page_table / swa_page_table) into a single kernel launch - Phase 1: double-buffered LDS Hillis-Steele scan (B <= 64), row-group parallel scan with scalar group chain (B <= 1024), serial fallback for XL batches - Phase 2: three tile variants (2048 / 1024 / 256 pages per block) with host-side workgroup-count routing calibrated at the measured U-curve bottom (WG ~ 256); no runtime branches inside the kernels - zero-copy dtype dispatch over 8 int32/int64 combinations; USE_SWA and SHIFT (page_size = 1 vs > 1) resolved as template parameters - add module_kvcache jit module, pybind entry, python wrapper and correctness/benchmark tests (op_tests/test_fused_metadata.py) perf (12 configs, B=1..64, P=512..4096, page_size=1/32, swa on/off): - vs Triton: 0.060-0.073ms -> 0.007-0.009ms, avg 8.73x, max 9.56x - vs LightOP: (pre-migration): 0.008-0.012ms -> 0.007-0.009ms, avg 7.86x, max 9.07x
…operator and add operator documentation.
Document the fused_metadata operator (module_kvcache) and its three-way comparison benchmark. The operator prepares paged-attention KV cache metadata in a single kernel launch: cache_seqlens_int32, cu_seqlens_k exclusive prefix sum, page_table gather, and an optional SWA page table. - docs/fused_metadata.md: operator description, parameter contract, kernel variant routing and the AITER / LightOp / Triton perf report - aiter算子库说明.md: new chapter 9 "KVCache" covering the operator - op_tests/test_fused_metadata.py: group cases into v1-v6, add RuntimeError contract cases (invalid page_size, missing outputs, bad dtype/shape), and share one case definition between the pytest parametrization and the CLI Benchmark result: AITER passes all 56 cases; LightOp fails 12 configurations, so its kernel time is excluded from its speedup stats. Co-Authored-By: Claude Code <noreply@anthropic.com>
The fused_metadata report and its benchmark referred to the pre-migration reference implementation by that project's internal name. The name must not enter the open-sourced repository, so replace every mention with a neutral one: 原实现 in Chinese prose, origin in English comments and docstrings. - docs/fused_metadata.md: 27 mentions renamed, CJK spacing cleaned up, and the resulting "源实现/源测试" duplications collapsed - op_tests/test_fused_metadata.py: 9 mentions renamed; comments, docstrings and --case help text only, no identifier or import path affected, so behaviour and test semantics are unchanged - aiter算子库说明.md: unify the KVCache chapter wording with the report Text-only change. py_compile passes on the test module. Co-Authored-By: Claude Code <noreply@anthropic.com>
AI Review发现 1 个问题。 [P3] 索引按 int32 计算,超大张量下 offset 溢出导致越界访问
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates AITER sampling, top-k transforms, paged MQA logits, GDN, MoE, and collective communication paths. Includes gfx946 build fixes, W4A8 expert-parallel handling and configuration fixes, CI result reporting fixes, tuned configurations, and operator documentation.
Preserves the public GitHub Actions workflows and existing public CI customizations, including the current quality-gate workflow from main.
Dependencies
Validation