Draft
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
55798cd to
78a08e9
Compare
509f0c8 to
a1cc8d5
Compare
Contributor
Author
|
This needs to get merged for Dao-AILab/flash-attention#2364 to get merged. |
Contributor
There was a problem hiding this comment.
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.pypackaging to include allaitersubpackages (andaiter_metaon non-editable installs). - Add CK FlashAttention v2 adapter module (
aiter.ops.ck.flash_attn_ck_amd) mapping FA2 calling conventions toaiter.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 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}") |
a1cc8d5 to
0544afa
Compare
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.
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