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.99k stars 331 forks source link

[PyTorch] Adding TP overlap support for `te.Linear` with `parallel_mode="column"` #1343

Open denera opened 5 days ago

denera commented 5 days ago

Description

te.Linear currently only supports TP overlap with parallel_mode="row" where it overlaps reduce-scatter in the forward pass, and all-gather with dgrad in the backward pass.

This PR adds new options to enable all-gather overlap in the forward pass, and reduce-scatter overlap with dgrad in the backward pass, when parallel_mode="column".

Fixes #1312

Type of change

Checklist:

denera commented 5 days ago

/te-ci pytorch L1