fix: Fixes for paged fp8 attention with chunked prefill#191
Merged
Conversation
Signed-off-by: Antoni Viros i Martin <aviros@ibm.com>
Signed-off-by: Antoni Viros i Martin <aviros@ibm.com>
Collaborator
|
@ani300 by registering a custom We need to either suppress it or declare a kernel with a name distinct from the official Aten operation. |
Collaborator
|
what functionality do we need that is not provided by the conventional |
Contributor
Author
|
Scales that aren't per tensor, we can refactor it I guess. |
Signed-off-by: Antoni Viros i Martin <aviros@ibm.com>
Contributor
Author
|
Fixed the warning, now trying if it works with DPP before asking for merge |
Contributor
Author
|
@andrea-fasoli The code compiled successfully for CPU using DPP tests in AIU, so the fix works. |
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.
Description of the change
This PR ports the fixes to paged attention coming from chunked prefill implementations to the FP8 variant, and restores our custom CPU implementation for scaled_bmm, as the Pytorch CPU does not support per-sentence kv-scales, which we need for our current fp8 implementation.
Related issues or PRs
See https://ibm.enterprise.slack.com/archives/C04FKKQ11LH/p1762528936408799?thread_ts=1762528936.408799&cid=C04FKKQ11LH for details on the fix.
How to verify the PR
Running DPP (https://github.com/foundation-model-stack/aiu-fms-testing-utils/blob/main/aiu_fms_testing_utils/scripts/drive_paged_programs.py) like this:
produces the expected graph and results now.
Was the PR tested
Checklist for passing CI/CD:
git commit -signoffor equivalenttox -e fixtox -e linttox -e spellchecktox -e unitNote: CI/CD performs unit tests on multiple versions of Python from a fresh install. There may be differences with your local environment and the test environment.