Uh oh!
There was an error while loading. Please reload this page.
[PyTorch] Adjust checkpointing of FP8 metadata for attention - #917
Conversation
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
cyanguwa
commented
Jun 12, 2024
/te-ci pytorch |
…ction; test FP8 for sm90+ Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
cyanguwa
commented
Jun 12, 2024
/te-ci pytorch |
timmoon10
left a comment
There was a problem hiding this comment.
I think this approach is hacky. It adds an unnecessary fp8_meta to DotProductAttention and it intertwines the implementations of DotProductAttention and FusedAttention. I think the right solution is to refactor FusedAttention so it's not a subclass of TransformerEngineBaseModule. That way the fp8_meta lives in DotProductAttention, which passes it to FusedAttention.
I won't block since we want to get a bugfix before the release. It doesn't affect the checkpoint format, so we can fix the implementation in the future.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
for more information, see https://pre-commit.ci
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
for more information, see https://pre-commit.ci
cyanguwa
commented
Jun 15, 2024
/te-ci pytorch |
Description
This PR relocates the FP8 metadata for attention from
FusedAttentiontoDotProductAttention. It makesDotProductAttentionaTransformerEngineBaseModuleandFusedAttentionatorch.nn.module. In the future,core_attention._extra_statewill be the centralized place for FP8 metadata for any attention backend, instead ofcore_attention.fused_attention._extra_statewhich was just forFusedAttention(originated from #768 ).Type of change
Changes
Please list the changes introduced in this PR:
DotProductAttentiontoTransformerEngineBaseModuleFusedAttentiontotorch.nn.modulefp8_metafromDotProductAttentiontoFusedAttentionChecklist: