Skip to content

Make q, k, and v contiguous to get better performance for normalize#56

Open
CaoE wants to merge 1 commit intoswz30:mainfrom
CaoE:qkv_contiguous
Open

Make q, k, and v contiguous to get better performance for normalize#56
CaoE wants to merge 1 commit intoswz30:mainfrom
CaoE:qkv_contiguous

Conversation

@CaoE
Copy link

@CaoE CaoE commented Aug 22, 2022

Make q, k, and v contiguous to get better performance for normalize.
After the rearrange operations for q, k, and v, normalizations on the last dim for q and k will be applied. The non-contiguous memory format makes the performance of normalize on the last dim poor.

Eslzzyl added a commit to Eslzzyl/Restormer that referenced this pull request Jan 7, 2024
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.

1 participant