Skip to content

[FlyDSL] Buffer ops refactoring - #5146

Closed
amd-nprotaso wants to merge 7 commits into
ROCm:mainfrom
amd-nprotaso:nprotaso/flydsl_buffer_ops_refactor
Closed

amd-nprotaso wants to merge 7 commits into
ROCm:mainfrom
amd-nprotaso:nprotaso/flydsl_buffer_ops_refactor

Conversation

@amd-nprotaso

Copy link
Copy Markdown

Replace old rocdl api ussage to new fx.

@amd-nprotaso
amd-nprotaso requested a review from a team August 31, 2026 10:52
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
multigpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 5146 --add-label <label>

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to opt this PR out.

@zufayu
zufayu requested a review from yadaish September 1, 2026 01:16
Comment thread aiter/ops/flydsl/kernels/buffer_ops.py Outdated
amd-nprotaso and others added 2 commits September 3, 2026 11:44
Conflict resolution:

- buffer_ops.py: took main's removal of extract_base_index (it has no
  remaining callers in-tree) on top of this branch's rewrite. main had
  also dropped BufferResourceDescriptor and extract_base_index from
  __all__; that hunk merged cleanly.
- small_m_hgemm.py / splitk_hgemm.py: accepted main's deletion. Both were
  replaced by kernels/gemm_a16w16_gfx950.py in ROCm#5145; this branch only
  touched them to thread rocdl.get_buffer_rsrc() through the raw
  raw_ptr_buffer_load_lds call sites, so the change dies with the files.
  The replacement uses fx.rocdl.make_buffer_tensor and needs no port.

Also ran black on buffer_ops.py, which was not format-clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
zufayu added a commit that referenced this pull request Sep 7, 2026
…y looked right

Pointing the FlyDSL collectors at $WORK/head was correct and insufficient: that
tree was populated only inside `if grep -q "invariant-removed\|api-signature"`.
On a PR deriving neither family it is an empty directory, and a collector that
reads files finds nothing to read.

#5207 has six buffer calls in its diff -- five bounded, one a bare
`make_buffer_tensor(W_scale, max_size=True)` -- and flydslbounds returned zero.
#5301, which the previous commit was verified against, deletes a guard and so
derives invariant-removed. That is the only reason the fix appeared to work. A
fixture cannot see this: every test here builds its own root and hands it over,
so the tree is always populated.

Materialising head is now unconditional; only the `evidence` call stays behind
the family test. The cost is a few `git show` calls against objects already
fetched at line 125.

On #5207 B8 now reports exactly one candidate and it is worth asking about:
`W_scale` is bound with `num_records_bytes=n_heads * self.n_per_head * 4` at
line 184 of the same file, and with `max_size=True` at line 92, inside a
BlockScale whose constructor already receives head and n_scale_cols. Same
tensor, two treatments, one of them unbounded.

Also verified silent for the right reason on #5146 (its one added buffer call
is buffer_ops.py forwarding variables, not a kernel binding a tensor) and on
#5282 (no buffer construction in the diff at all).
…so/flydsl_buffer_ops_refactor

# Conflicts:
#	aiter/ops/flydsl/kernels/fmha_gfx1250/fmha_kernel.py
@amd-nprotaso

Copy link
Copy Markdown
Author

Kernels will be refactor to use layout API, instead of use low level buffer operations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants