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.85k stars 309 forks source link

[PyTorch] Replace `int8_t` in Pybind11 extensions with `int64_t` #882

Closed timmoon10 closed 4 months ago

timmoon10 commented 4 months ago

Description

https://github.com/NVIDIA/TransformerEngine/pull/772 added int8_t arguments to some of the PyTorch extensions. PyTorch support for int8_t in Pybind11 extensions was added in PyTorch 2.3.0 (see https://github.com/pytorch/pytorch/pull/119639), resulting in TE build errors with older PyTorch versions (https://github.com/NVIDIA/TransformerEngine/issues/881).

This PR replaces these int8_t with int64_t. These are cast to int anyways, and it doesn't seem inconceivable to set the SM margin above 127.

Type of change

Changes

Checklist:

timmoon10 commented 4 months ago

/te-ci pytorch