Skip to content

[KDA][AMD]for kda kernel,fix core dump on AMD GPU and tune the config for AMD branch#869

Open
binding7012 wants to merge 5 commits into
fla-org:mainfrom
binding7012:kda_rocm2
Open

[KDA][AMD]for kda kernel,fix core dump on AMD GPU and tune the config for AMD branch#869
binding7012 wants to merge 5 commits into
fla-org:mainfrom
binding7012:kda_rocm2

Conversation

@binding7012

@binding7012 binding7012 commented Apr 29, 2026

Copy link
Copy Markdown

Original code run on AMD gpu would core dump. this pr fix it, and also tune the config for AMD gpu

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces AMD GPU support by adjusting autotune configurations and implementing Python-level state transposition to meet hardware constraints. It also includes a bug fix in the fused recurrent KDA kernel to properly mask memory loads. The review feedback suggests refactoring duplicated kernel launch logic to improve maintainability, avoiding performance issues caused by sequence length specialization on AMD, and maintaining consistency in autotune keys across platforms. Additionally, the reviewer recommends clarifying the impact of disabling transposed layouts for KDA on ROCm.

Comment thread fla/ops/kda/gate.py Outdated
Comment thread fla/ops/common/chunk_delta_h.py Outdated
Comment thread fla/ops/common/chunk_delta_h.py Outdated
Comment thread fla/ops/common/chunk_delta_h.py Outdated
Comment thread fla/ops/common/intracard_cp.py Outdated
Comment thread fla/ops/kda/chunk.py Outdated
Comment thread fla/ops/kda/gate.py Outdated
@binding7012 binding7012 changed the title [AMD]for kda kernel, add rocm support and tune the config for ROCM branch [draft][AMD]for kda kernel, add rocm support and tune the config for ROCM branch Apr 29, 2026
@binding7012 binding7012 changed the title [draft][AMD]for kda kernel, add rocm support and tune the config for ROCM branch [KDA][AMD]for kda kernel, add rocm support and tune the config for ROCM branch Apr 29, 2026
@binding7012

Copy link
Copy Markdown
Author

Hi @yzhangcs pls help to review this PR, thanks~

@binding7012 binding7012 changed the title [KDA][AMD]for kda kernel, add rocm support and tune the config for ROCM branch [KDA][AMD]for kda kernel,fix core dump on AMD GPU and tune the config for AMD branch Apr 29, 2026
@zhiyuan1i

Copy link
Copy Markdown
Collaborator

Thanks for the PR! ROCm support is definitely on our radar. We're currently working on a more unified backend abstraction design to avoid scattering hardware-specific branches across kernels. We'd prefer to land KDA's AMD support through that framework rather than merging this directly. Let's keep this open as a reference for now?

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