NVIDIA / NVIDIA/TransformerEngine
[Feature Request][PyTorch] Support thd format for fp8 tensors in DotProductAttention
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 831
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 65
Description
Seems like at the current time packed tensors in thd format are not supported by transformer_engine.pytorch.attention. DotProductAttention. That's weird as such mode clearly supported by fused_attn_fwd from fused_attn cpp_extensions
I see that FusedAttnFunc was used in FusedAttention, but implementations for FusedAttnFunc_kvpacked and FusedAttnFunc_qkvpacked are not present. I suppose, they could be added in a same way
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with transformer_engine.pytorch.attention.DotProductAttention and compare its FusedAttention path with fused_attn_fwd in the fused_attn cpp_extensions. Review the existing FusedAttnFunc implementation and determine how packed thd FP8 inputs should be handled alongside the missing FusedAttnFunc_kvpacked and FusedAttnFunc_qkvpacked paths. Done means DotProductAttention supports packed thd FP8 tensors consistently with fused_attn_fwd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100