Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fmha dropout and backward support using ck-tiled for ROCM #10

Closed
wants to merge 50 commits into from

Conversation

qianfengz
Copy link
Collaborator

With this PR. The following is done:

  1. Fmha forward is completely implemented (added dropout, LSE outputting)
  2. Fmha backward is added and completely implemented (batched mode, grouped mode, flexible mask-type, bias-grad)
  3. Kernel template files removed completely by re-using the kernel files under ck_tile/examples/91_tile_program/fmha
  4. Standalone random-number generating kernel added (located under ck_tile/example/91_tile_program/fmha)

The following scripts are used to verify the implementation:

#> pytest tests/test_mem_eff_attention.py::test_forward
#> pytest tests/test_mem_eff_attention.py::test_mqa_forward
#> pytest tests/test_mem_eff_attention.py::test_backward
#> pytest tests/test_mem_eff_attention.py::test_dropout
#> pytest tests/test_mem_eff_attention.py::test_dropout_backward_ck

@qianfengz qianfengz closed this May 9, 2024
@qianfengz qianfengz deleted the test_opt_padding_train branch May 14, 2024 08:03
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