Add FLASH_ATTENTION_FWD_TRITON_AMD_CONFIG_JSON env var support#2000
Open
alexheretic wants to merge 1 commit intoROCm:mainfrom
Open
Add FLASH_ATTENTION_FWD_TRITON_AMD_CONFIG_JSON env var support#2000alexheretic wants to merge 1 commit intoROCm:mainfrom
FLASH_ATTENTION_FWD_TRITON_AMD_CONFIG_JSON env var support#2000alexheretic wants to merge 1 commit intoROCm:mainfrom
Conversation
Allows users to override triton attn_fwd config when not autotuning.
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.
Merged in flash-attention repo: Dao-AILab/flash-attention#2239
Allows users to override triton attn_fwd config when not autotuning.
Motivation
With autotuning disabled the current default configs are sub-optimal, at least for my gfx1100 but probably for other cards too.
I get roughly 2x faster wan2.2 workflow performance using config
FLASH_ATTENTION_FWD_TRITON_AMD_CONFIG_JSON='{"BLOCK_M":128,"BLOCK_N":64,"waves_per_eu":1,"PRE_LOAD_V":false,"num_stages":1,"num_warps":8}'Autotuning itself is very slow to run (e.g. takes 82 minutes) and needs to re-run on any param change (it also isn't persisting maybe?). So it is helpful to be able to override the !autotune config.
Technical Details
Test Plan
Manually tested Dao-AILab/flash-attention#2239
Test Result
✅