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.
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
[ ] Documentation change (change only to the documentation, either a fix or a new content)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
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 calledcmake
in their path. In this case, Python loads the wrong thing duringimport cmake
and our detection logic throws an error (https://github.com/NVIDIA/TransformerEngine/issues/887). This PR fixes this issue by attempting to load theCMAKE_BIN_DIR
variable fromcmake
, which will only succeed if the correctcmake
is imported.Type of change
Changes
Checklist: