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

Get CMake bin dir from CMake module if possible #888

Closed timmoon10 closed 4 weeks ago

timmoon10 commented 1 month ago

Description

The build system attempts to get the CMake executable from the cmake module. However, there is a subtle edge case when the user does not have the module installed but does have a directory called cmake in their path. In this case, Python loads the wrong thing during import cmake and our detection logic throws an error (https://github.com/NVIDIA/TransformerEngine/issues/887). This PR fixes this issue by attempting to load the CMAKE_BIN_DIR variable from cmake, which will only succeed if the correct cmake is imported.

Type of change

Changes

Checklist:

timmoon10 commented 1 month ago

/te-ci

ksivaman commented 4 weeks ago

Closing in favor of #877