Skip to content
Closed
Show file tree
Hide file tree
Changes from 105 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
48f0a93
Add FlyDSL decode TopK kernels
samremes Jun 25, 2026
555569b
Optimize FlyDSL TopK row barrier
samremes Jun 25, 2026
72c7745
Tune FlyDSL TopK long-row cap
samremes Jun 26, 2026
5152d4d
Clean up FlyDSL TopK tiered path
samremes Jun 26, 2026
b3a0d97
Generalize FlyDSL decode TopK tiered kernel to all K and expose works…
RElbers Jul 12, 2026
c0b6909
Update params to include gfx950. Added asm kernel to rocprof bench sc…
RElbers Jul 13, 2026
01741ab
Add tests and support for non pow2 K. Import constants from kernel m…
RElbers Jul 13, 2026
755df3b
Add arg to include zero-kernel in rocprof bench script
RElbers Jul 13, 2026
c06b8db
Update comments
RElbers Jul 13, 2026
135ebca
Add parameter to mask out non-inf values in the kernel.
RElbers Jul 13, 2026
c278797
Refactor tiered:bool into tier_mode:str and added env vars to force s…
RElbers Jul 15, 2026
f42bb80
Clean up env-var in rocprof driver
RElbers Jul 15, 2026
4abc985
Round blocks_per_row and short_max_rows to the next power of 2 to red…
RElbers Jul 15, 2026
c6c30d8
Add topk kernel to the AOT script.
RElbers Jul 15, 2026
d2d2ad6
Port gfx950 short_max + dead_block_trim (dispatch-only) onto Robin base
Jul 22, 2026
5383b16
Port gfx950 short_max + dead_block_trim (dispatch-only) onto Robin base
JH-Leon-KIM-AMD Jul 22, 2026
d783300
Port gfx950 dispatch tuning (short_max + dead_block_trim + midbatch c…
JH-Leon-KIM-AMD Jul 22, 2026
2fc5ddc
Port gfx950 kernel B0: relax blocks_per_row floor to 1 for short tier…
JH-Leon-KIM-AMD Jul 22, 2026
a87146d
Port gfx950 kernel B1: row_proportional_parts
JH-Leon-KIM-AMD Jul 22, 2026
197eda0
Port gfx950 dispatch B2: batch_coresident_cap (grid=1 fold)
JH-Leon-KIM-AMD Jul 22, 2026
4d6a066
Port gfx950 C2: strengthen topk decode correctness harness
JH-Leon-KIM-AMD Jul 22, 2026
6f7042a
Port gfx950 C1: fix CUDA-event timing IndexError in decode top-k bench
JH-Leon-KIM-AMD Jul 22, 2026
d839939
Port gfx950 B3: early_stop (skip final radix pass, num_rows<=1)
JH-Leon-KIM-AMD Jul 22, 2026
e7dde59
Fix gfx950 midbatch cap: restore rows>63 L<=65536 fold to bpr=1
JH-Leon-KIM-AMD Jul 22, 2026
3a488b8
Doc gfx950 C2: add public usage examples to topk decode correctness d…
JH-Leon-KIM-AMD Jul 23, 2026
3d37fc2
style(gfx950): apply repo black formatting to ported decode top-k files
JH-Leon-KIM-AMD Jul 23, 2026
a89b0a6
Merge branch 'main' of github.com:ROCm/aiter into jeongkim/silotiger-…
JH-Leon-KIM-AMD Jul 23, 2026
8e16f13
style(topk): drop unused F841 locals in decode radix kernel
JH-Leon-KIM-AMD Jul 24, 2026
bb4dd6e
style(topk): drop vestigial shebangs to clear ruff EXE001
JH-Leon-KIM-AMD Jul 24, 2026
b84efb7
style(topk): use math.isnan for NaN cell check (ruff PLR0124)
JH-Leon-KIM-AMD Jul 24, 2026
362cc2e
style(topk): f-string for the summary header (ruff UP031)
JH-Leon-KIM-AMD Jul 24, 2026
666ddb0
fix(topk): close rocprof CSVs + drop duplicate cmd echo
JH-Leon-KIM-AMD Jul 24, 2026
db9933c
fix(topk): set explicit subprocess check=False + black-format driver
JH-Leon-KIM-AMD Jul 24, 2026
844573d
fix(topk): gate rocprof runner FlyDSL paths on a built _mlir extension
JH-Leon-KIM-AMD Jul 24, 2026
e9cf08c
style(topk): use collections.abc imports and dict literals
JH-Leon-KIM-AMD Jul 24, 2026
78e49f5
style(aot): sort the flydsl common import block
JH-Leon-KIM-AMD Jul 27, 2026
380f155
style(flydsl): sort the top-level relative imports
JH-Leon-KIM-AMD Jul 27, 2026
f2875f4
style(topk): sort kernel imports and apply black
JH-Leon-KIM-AMD Jul 27, 2026
5acaa9e
style(topk): sort remaining imports and drop unused noqa
JH-Leon-KIM-AMD Jul 27, 2026
fd09445
fix(topk): key the deadlock guard CU count on the target arch
JH-Leon-KIM-AMD Jul 27, 2026
23c6224
style(topk): drop the dead constant ops left behind by the unused-var…
JH-Leon-KIM-AMD Jul 28, 2026
8800b92
style(topk): document the blind except around the arch label lookup
JH-Leon-KIM-AMD Jul 28, 2026
ebe709a
style(topk): document the blind excepts guarding the kernel probes
JH-Leon-KIM-AMD Jul 28, 2026
3a7830d
style(topk): document the blind except around the flydsl symbol lookup
JH-Leon-KIM-AMD Jul 28, 2026
77966fd
fix(topk): bind the per-kernel state into the timing closure
JH-Leon-KIM-AMD Jul 28, 2026
52875d0
style(topk): document the blind except wrapping the timed run
JH-Leon-KIM-AMD Jul 28, 2026
7ac5423
style(topk): report the exception type when an AOT config fails to co…
JH-Leon-KIM-AMD Jul 28, 2026
a6a78d4
style(topk): document the fx.Stream default on the launcher signature
JH-Leon-KIM-AMD Jul 28, 2026
015f6f1
style(topk): document the blind except behind the CU-count fallback
JH-Leon-KIM-AMD Jul 28, 2026
0432c41
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Jul 28, 2026
a657bab
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Jul 29, 2026
c28e819
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Jul 29, 2026
135c871
fix: include SiTUv2 in FlyDSL MoE AOT act mapping
Copilot Jul 29, 2026
a0e8b2c
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Jul 30, 2026
de9bd26
topk dispatcher implementing
JH-Leon-KIM-AMD Jul 30, 2026
cf80910
tighten gfx950 FlyDSL decode top-k gate to the no-loss window
JH-Leon-KIM-AMD Jul 30, 2026
71c361b
Add opt-in decode top-k dispatch counters for benchmark A/B
JH-Leon-KIM-AMD Jul 30, 2026
b49aace
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 3, 2026
c0f3dff
set the gfx942 decode top-k gate from measurement
JH-Leon-KIM-AMD Aug 4, 2026
58f88b4
Merge remote-tracking branch 'origin/jeongkim/silotiger-699-gfx950-port'
JH-Leon-KIM-AMD Aug 4, 2026
e5061a4
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 4, 2026
6dee62e
take buffer_ops and vector from aiter's shims, not flydsl.expr
JH-Leon-KIM-AMD Aug 5, 2026
72dfd83
Merge remote-tracking branch 'origin/jeongkim/silotiger-699-gfx950-port'
JH-Leon-KIM-AMD Aug 5, 2026
83ff8a8
bound the decode Top-K buffer descriptors to the real allocation
JH-Leon-KIM-AMD Aug 5, 2026
eb6ac01
zero the decode Top-K workspace when there is no short tier
JH-Leon-KIM-AMD Aug 5, 2026
59b6e9f
require packed indices, seqLens and workspace for decode Top-K
JH-Leon-KIM-AMD Aug 6, 2026
3873560
key the decode Top-K launcher cache on the target arch
JH-Leon-KIM-AMD Aug 6, 2026
a0b8fb5
rank non-finite decode Top-K values the way HIP and torch do
JH-Leon-KIM-AMD Aug 6, 2026
964ed03
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 7, 2026
f34c0db
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 7, 2026
5a15143
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 10, 2026
ecf7fda
resolve decode Top-K config overrides before deriving blocks_per_row
JH-Leon-KIM-AMD Aug 10, 2026
f3daab7
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 11, 2026
561724b
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 11, 2026
12a5188
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 11, 2026
48c1e53
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 11, 2026
91cdbb9
drop the rocprof profiling scripts from op_tests
JH-Leon-KIM-AMD Aug 12, 2026
777c6bf
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 12, 2026
b6d9997
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 13, 2026
b7a30da
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 13, 2026
b6ceb28
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 13, 2026
4691a88
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 20, 2026
7b77e47
Fix buffer_ops aux operand so the kernels compile from a cold cache
JH-Leon-KIM-AMD Aug 20, 2026
425b608
Drop the deprecated FlyDSL cast helpers from the decode top-k kernels
JH-Leon-KIM-AMD Aug 20, 2026
7a7d2ed
Slim the decode top-k tests down to runtime correctness
JH-Leon-KIM-AMD Aug 20, 2026
679c60d
Tighten the four longest comments in the decode top-k path
JH-Leon-KIM-AMD Aug 20, 2026
d97bb08
Make the decode workspace keyword-only to keep stable positional
JH-Leon-KIM-AMD Aug 20, 2026
2e35857
Address the remaining review findings on the decode dispatcher
JH-Leon-KIM-AMD Aug 20, 2026
62644c3
Default the tiered builder's non-finite mask off
JH-Leon-KIM-AMD Aug 20, 2026
803caf6
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 20, 2026
30519f5
Pick the ROCDL aux form from the generated signature
JH-Leon-KIM-AMD Aug 20, 2026
01d17b8
Drop this branch's buffer_ops divergence
JH-Leon-KIM-AMD Aug 21, 2026
131c46f
Key the decode CU count on the device it describes
JH-Leon-KIM-AMD Aug 21, 2026
2810533
Cover the gfx950 gate window in the decode routing tests
JH-Leon-KIM-AMD Aug 21, 2026
16a9a8d
Widen the gfx942 decode row window to 16
JH-Leon-KIM-AMD Aug 21, 2026
1702c00
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 24, 2026
2d3c4db
Size the decode workspace from the device the kernel runs on
JH-Leon-KIM-AMD Aug 24, 2026
9d4e730
Densify a column-strided decode input instead of misreading it
JH-Leon-KIM-AMD Aug 24, 2026
4055e75
Format the strided-input test with black
JH-Leon-KIM-AMD Aug 24, 2026
8a4c1c5
Pin the gfx942 rows threshold to 18 with a dense probe
JH-Leon-KIM-AMD Aug 24, 2026
0f415fe
Regate the gfx950 decode TopK window from a symmetric re-measurement
JH-Leon-KIM-AMD Aug 24, 2026
b7b123d
Cut the decode TopK comments down to their constraints
JH-Leon-KIM-AMD Aug 24, 2026
3b8e242
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 24, 2026
6131c97
Make the decode TopK row cap depend on width
JH-Leon-KIM-AMD Aug 25, 2026
6616c47
Build AOT decode Top-K kernels for the CSV's CU count, not the build …
JH-Leon-KIM-AMD Aug 25, 2026
da93b23
Add the missing SPDX header to the tiered decode Top-K kernel
JH-Leon-KIM-AMD Aug 25, 2026
ef2d0a5
Reject a wrong decode Top-K dtype or device before the gate runs
JH-Leon-KIM-AMD Aug 25, 2026
f6877fa
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 25, 2026
fb39f84
Add ordered stable decode Top-K emit for FlyDSL path.
JH-Leon-KIM-AMD Aug 29, 2026
e9f4fde
Merge branch 'main' into jeongkim/silotiger-699-gfx950-port
JH-Leon-KIM-AMD Aug 29, 2026
8ab30e5
Apply Black 26.5.1 formatting to the decode Top-K files
JH-Leon-KIM-AMD Aug 29, 2026
f19d30a
topk(compact): add the tiered compact decode kernel
JH-Leon-KIM-AMD Sep 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions aiter/aot/flydsl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class OpKind(enum.Enum):
GEMM = "gemm"
GROUPED_MOE = "grouped_moe"
CHUNK_GDN_H = "chunk_gdn_h"
TOPK = "topk"


@dataclass(frozen=True)
Expand Down Expand Up @@ -146,6 +147,8 @@ def _collect_aot_jobs_for(kind: OpKind) -> list[dict[str, Any]]:
from .grouped_moe import DEFAULT_CSVS, parse_csv
elif kind is OpKind.CHUNK_GDN_H:
from .chunk_gdn_h import DEFAULT_CSVS, parse_csv
elif kind is OpKind.TOPK:
from .topk import DEFAULT_CSVS, parse_csv
else:
raise ValueError(f"unknown FlyDSL AOT kind: {kind!r}")
return collect_aot_jobs(DEFAULT_CSVS, parse_csv)
Expand All @@ -162,6 +165,8 @@ def _compile_one_config_for(kind: OpKind) -> Callable[..., dict[str, Any]]:
from .grouped_moe import compile_one_config
elif kind is OpKind.CHUNK_GDN_H:
from .chunk_gdn_h import compile_one_config
elif kind is OpKind.TOPK:
from .topk import compile_one_config
elif kind is OpKind.GROUPED_MOE:
# grouped_moe AOT not wired up yet (no jobs are ever collected); keep a
# trivial stub so the dispatch is total.
Expand Down
249 changes: 249 additions & 0 deletions aiter/aot/flydsl/topk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.

"""AOT pre-compilation for the FlyDSL decode Top-K-per-row kernel.

The launcher is JIT-specialized on two axes, both baked into the kernel: batch size
(via short_max) and context length (via blocks_per_row, derived from the
logits width). Both are bucketed to powers of two in the runtime config, so the
distinct-kernel count collapses to ~36 per arch across the whole (num_rows, context)
range. This module enumerates those and compiles them into the FlyDSL cache so a
serving worker never pays the first-call JIT compile at runtime for these shapes.

Usage:
# Compile all distinct Top-K kernels from the default CSV
python -m aiter.aot.flydsl.topk

# Custom CSV file(s)
python -m aiter.aot.flydsl.topk --csv /path/to/config.csv

Environment variables:
FLYDSL_RUNTIME_CACHE_DIR Cache directory (default: ~/.flydsl/cache).
ARCH / GPU_ARCHS Target GPU architecture(s) (e.g. gfx942, gfx950).
"""

from __future__ import annotations

import argparse
import csv
import os
import sys
import time
from typing import Any

import flydsl.expr as fx

from aiter.aot.flydsl.common import (
collect_aot_jobs,
compile_only_env,
cu_num_to_arch,
override_env,
)

_CONFIG_DIR = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
"configs",
)
DEFAULT_CSVS = [os.path.join(_CONFIG_DIR, "topk_decode_aot.csv")]
TOPK_AOT_ARCH_DEFAULT = "gfx942"


def parse_csv(csv_path: str) -> list[dict[str, Any]]:
"""One job per *distinct* compiled Top-K kernel for each CSV row.

Each row is (k, max_model_len, max_num_seqs, cu_num). The kernel is specialized
on two drift axes: num_rows (via short_max + caps) and blocks_per_row (via the
context length). We sweep both -- num_rows 1..max_num_seqs and every distinct
blocks_per_row 2..min(32, ceil(max_model_len/items_per_block)) -- and dedupe by
the runtime _kernel_config (evaluated for the row's target arch), so exactly
one job per distinct compiled kernel is emitted. A representative context length
per blocks_per_row suffices because the kernel is context-length-agnostic within
a blocks_per_row (contexts sharing a bpr reuse one kernel)."""
from aiter.ops.flydsl.topk_per_row_decode import (
_TIERED_BLOCK_THREADS,
_TIERED_LOAD_VEC,
_kernel_config,
)

items_per_block = _TIERED_LOAD_VEC * _TIERED_BLOCK_THREADS

jobs: list[dict[str, Any]] = []
seen: set = set()
with open(csv_path, newline="") as f:
for row in csv.DictReader(f):
k = int(row["k"])
mml = int(row["max_model_len"])
max_seqs = int(row.get("max_num_seqs") or 128)
cu = int(row.get("cu_num") or 0)
arch = cu_num_to_arch(cu, default=TOPK_AOT_ARCH_DEFAULT)
# blocks_per_row = min(32, max(2, ceil(L / items_per_block))); sweep every
# distinct value up to the row's max context via a representative L.
max_bpr = min(32, max(2, -(-mml // items_per_block)))
# Both target values come from the CSV row, never from the build host:
# the CU count picks bits_per_pass and the tier caps.
with override_env("FLYDSL_GPU_ARCH", arch):
for bpr in range(2, max_bpr + 1):
rep_l = min(bpr * items_per_block, mml)
for num_rows in range(1, max_seqs + 1):
cfg = _kernel_config(
num_rows, rep_l, arch=arch, cu_count=cu or None
)
ident = (k, arch, tuple(sorted(cfg.items())))
Comment thread
JH-Leon-KIM-AMD marked this conversation as resolved.
if ident in seen:
continue
seen.add(ident)
jobs.append(
{
"kernel_name": (
f"topk_per_row_decode_k{k}_nr{num_rows}"
f"_bpr{cfg['blocks_per_row']}_{arch}"
),
"k": k,
"num_rows": num_rows,
"max_model_len": rep_l,
"cu_num": cu,
}
)
return jobs


def compile_one_config(
kernel_name: str,
k: int,
num_rows: int,
max_model_len: int,
cu_num: int = 0,
**kwargs,
) -> dict:
"""Compile one Top-K kernel configuration into the FlyDSL cache."""
del kwargs

import torch
from torch._subclasses.fake_tensor import FakeTensorMode

from aiter.ops.flydsl.topk_per_row_decode import (
_build_launcher,
_required_seq_rows,
)

aot_arch = cu_num_to_arch(cu_num, default=TOPK_AOT_ARCH_DEFAULT)
result = {
"kernel_name": kernel_name,
"shape": kernel_name,
"compile_time": None,
"compile_arch": aot_arch,
}

t0 = time.time()
try:
with (
override_env("ARCH", aot_arch),
override_env("FLYDSL_GPU_ARCH", aot_arch),
FakeTensorMode(),
):
# Both are in the launcher cache key, and must match what parse_csv
# deduped on or a job's kernel_name stops describing its kernel.
launcher, ws_slots, _ = _build_launcher(
k, num_rows, max_model_len, aot_arch, cu_count=cu_num or None
)
Comment thread
Copilot marked this conversation as resolved.

dev = torch.device("cpu")
next_n = 1
logits = torch.empty(
(num_rows, max_model_len), dtype=torch.float32, device=dev
)
seq = torch.empty(
(max(_required_seq_rows(next_n, num_rows), 1),),
dtype=torch.int32,
device=dev,
)
idx = torch.empty((num_rows, k), dtype=torch.int32, device=dev)
ws = torch.empty((max(ws_slots, 1),), dtype=torch.int32, device=dev)
stream = fx.Stream(0)

# Call the launcher directly (like the GEMM/MoE AOT), NOT via
# _run_compiled/flyc.compile. Under COMPILE_ONLY the JitFunction.__call__
# writes the disk cache under the runtime cache key and returns before
# engine init / launch; flyc.compile instead builds a runnable
# CompiledFunction, which loads the code object even under COMPILE_ONLY --
# loading a cross-arch object faults the GPU. Same cache key either way.
# Fake tensors give create_buffer_resource its descriptors; COMPILE_ONLY
# skips the launch, so no tensor data is read.
with compile_only_env():
launcher(
logits,
next_n,
seq,
idx,
ws,
num_rows,
int(logits.stride(0)),
int(logits.stride(1)),
stream,
)

elapsed = time.time() - t0
result["compile_time"] = elapsed
print(f" [OK] compile {elapsed:6.1f}s {kernel_name} arch={aot_arch}")
except Exception as e: # noqa: BLE001 - one config must not stop the batch
print(
f" [FAIL] compile {kernel_name} arch={aot_arch}: "
f"{type(e).__name__}: {e}"
)

return result


def main() -> None:
ap = argparse.ArgumentParser(
description="AOT pre-compile FlyDSL decode Top-K kernels from a config CSV",
formatter_class=argparse.RawTextHelpFormatter,
)
ap.add_argument("--csv", type=str, nargs="+", default=DEFAULT_CSVS)
args = ap.parse_args()

csv_paths = [os.path.abspath(p) for p in args.csv]
for p in csv_paths:
if not os.path.isfile(p):
print(f"Error: CSV not found: {p}")
sys.exit(1)

cache_dir = os.path.expanduser(
os.environ.get("FLYDSL_RUNTIME_CACHE_DIR", "~/.flydsl/cache")
)
arch = os.environ.get("ARCH") or os.environ.get("GPU_ARCHS") or "(from cu_num)"
jobs = collect_aot_jobs(csv_paths, parse_csv)

print("=" * 72)
print("FlyDSL Top-K AOT Pre-compilation")
print("=" * 72)
for csv_path in csv_paths:
print(f" CSV: {csv_path}")
print(f" Total jobs: {len(jobs)}")
print(f" Cache dir: {cache_dir}")
print(f" Target arch: {arch}")
print("=" * 72)

total_t0 = time.time()
results = []
for i, job in enumerate(jobs, 1):
print(f"\n[{i}/{len(jobs)}] ", end="")
results.append(compile_one_config(**job))

ok = sum(1 for r in results if r["compile_time"] is not None)
fail = sum(1 for r in results if r["compile_time"] is None)

print("\n" + "=" * 72)
print(f" Total time: {time.time() - total_t0:.1f}s")
print(f" Compiled: {ok} ok, {fail} failed")
print(f" Cache dir: {cache_dir}")
print()
if fail > 0:
print("Some compilations failed. Check output above for details.")
sys.exit(1)
print("All compilations succeeded. Cache is ready.")
sys.exit(0)


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions aiter/configs/topk_decode_aot.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
k,max_model_len,max_num_seqs,cu_num
256,263168,128,304
512,263168,128,304
1024,263168,128,304
2048,263168,128,304
256,263168,128,256
512,263168,128,256
1024,263168,128,256
2048,263168,128,256
6 changes: 6 additions & 0 deletions aiter/ops/flydsl/__init__.py
Comment thread
JH-Leon-KIM-AMD marked this conversation as resolved.
Comment thread
JH-Leon-KIM-AMD marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
from .kernels.qk_norm_rope_quant import flydsl_qk_norm_rope_quant
from .mla_reduce_kernels import flydsl_mla_reduce_v1
from .moe_kernels import flydsl_moe_stage1, flydsl_moe_stage2
from .topk_per_row_decode import (
flydsl_top_k_per_row_decode,
flydsl_top_k_per_row_decode_workspace_size,
)

# from .linear_attention_kernels import flydsl_gdr_decode

Expand All @@ -77,5 +81,7 @@
"flydsl_pa_mqa_logits_fp4_varqlen",
"flydsl_preshuffle_gemm_a8",
"flydsl_qk_norm_rope_quant",
"flydsl_top_k_per_row_decode",
"flydsl_top_k_per_row_decode_workspace_size",
# "flydsl_gdr_decode",
]
Loading
Loading