Skip to content

[CI] Flash Attention CK CI#2264

Draft
micmelesse wants to merge 1 commit intomainfrom
micmelesse/ck_ci
Draft

[CI] Flash Attention CK CI#2264
micmelesse wants to merge 1 commit intomainfrom
micmelesse/ck_ci

Conversation

@micmelesse
Copy link
Copy Markdown
Contributor

Motivation

This pr enables the flash attention ck backend tests. They only run for changes that affect the ck backend of flash attention.

Technical Details

Test Plan

Test Result

Submission Checklist

@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 (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:multi-gpu Multi-GPU op tests (8 GPU)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 2264 --add-label <label>

@micmelesse micmelesse force-pushed the micmelesse/ck_ci branch 2 times, most recently from 55798cd to 78a08e9 Compare March 16, 2026 17:31
@micmelesse micmelesse force-pushed the micmelesse/ck_ci branch 4 times, most recently from 509f0c8 to a1cc8d5 Compare March 17, 2026 17:09
@micmelesse micmelesse marked this pull request as ready for review March 17, 2026 17:11
@micmelesse micmelesse requested review from a team and Copilot March 17, 2026 17:11
@micmelesse
Copy link
Copy Markdown
Contributor Author

This needs to get merged for Dao-AILab/flash-attention#2364 to get merged.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables FlashAttention integration CI coverage for the CK backend by adding a CK “flash_attn_2” compatibility shim and updating packaging/CI gating so CK tests only run when CK-relevant paths change.

Changes:

  • Update setup.py packaging to include all aiter subpackages (and aiter_meta on non-editable installs).
  • Add CK FlashAttention v2 adapter module (aiter.ops.ck.flash_attn_ck_amd) mapping FA2 calling conventions to aiter.ops.mha.
  • Enable and gate CK backend integration tests + benchmarks in the FlashAttention integration workflow.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
setup.py Switches to find_packages(...) so subpackages are included in installs.
aiter/ops/ck/flash_attn_ck_amd/interface_v2.py New CK adapter implementing FA2-like fwd/bwd/varlen/*/kvcache APIs on top of mha_*.
aiter/ops/ck/flash_attn_ck_amd/init.py Exposes interface_v2 as flash_attn_2.
aiter/jit/core.py Adjusts blob generation execution to set PYTHONPATH for sibling imports.
.github/workflows/flash_attention_integration.yaml Adds CK path filters, enables CK job, runs CK pytest subset on PRs and uploads benchmark logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread aiter/ops/ck/flash_attn_ck_amd/interface_v2.py
Comment thread aiter/ops/ck/flash_attn_ck_amd/interface_v2.py
Comment thread aiter/ops/ck/flash_attn_ck_amd/interface_v2.py
Comment thread aiter/ops/ck/flash_attn_ck_amd/interface_v2.py
Comment thread aiter/jit/core.py
Comment on lines +762 to +767
cmd = blob_gen_cmd.format(blob_dir)
# Explicitly set PYTHONPATH to script's directory for sibling imports
script_dir = os.path.dirname(os.path.abspath(cmd.split()[0]))
if AITER_LOG_MORE:
logger.info(f"exec_blob ---> {PY} {blob_gen_cmd.format(blob_dir)}")
os.system(f"{PY} {blob_gen_cmd.format(blob_dir)}")
logger.info(f"exec_blob ---> {PY} {cmd}")
os.system(f"PYTHONPATH={script_dir}:$PYTHONPATH {PY} {cmd}")
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