NVIDIA / TransformerEngine

A library for accelerating Transformer models on NVIDIA GPUs, including using 8-bit floating point (FP8) precision on Hopper and Ada GPUs, to provide better performance with lower memory utilization in both training and inference.
https://docs.nvidia.com/deeplearning/transformer-engine/user-guide/index.html
Apache License 2.0
1.61k stars 256 forks source link

[PyTorch] Fixed assert on primary Fp8 weights in `prepare_te_modules_for_fsdp()` #916

Closed denera closed 3 weeks ago

denera commented 3 weeks ago

Description

This PR fixes misplaced asserts on a module attribute that only exists for TE modules, but is incorrectly applied to non-TE modules.

Supersedes #913.

Type of change

Changes

Checklist:

ksivaman commented 3 weeks ago

LGTM