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] Move FusedAdam/FusedSGD and necessary kernels from Apex to TE #867

Closed yaox12 closed 1 month ago

yaox12 commented 1 month ago

Description

This PR moves FusedAdam/FusedSGD and necessary multi_tensor_* kernels from Apex to TE, as well as the tests.

Type of change

Changes

Please list the changes introduced in this PR:

Checklist:

timmoon10 commented 1 month ago

/te-ci pytorch

timmoon10 commented 1 month ago

/te-ci pytorch

yaox12 commented 1 month ago

@timmoon10 Can I get this PR merged if it looks good to you? It's sufficient to be a drop-in replacement of Apex.FusedAdam in MCore. Other features to be migrated or implemented will come in separate PRs.