mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
[FIX] using torch.version.cuda/hip to ensure build ORTModule Torch C++ CUDA extension for docker build (#11675)
* [FIX] cpp ext * Update orttraining/orttraining/python/training/ortmodule/torch_cpp_extensions/install.py Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> * [FIX] fix python format Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
This commit is contained in:
parent
981d45d8d5
commit
908e19dc16
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ def _install_extension(ext_name, ext_path, cwd):
|
|||
def build_torch_cpp_extensions():
|
||||
"""Builds PyTorch CPP extensions and returns metadata."""
|
||||
# Run this from within onnxruntime package folder
|
||||
is_gpu_available = torch.cuda.is_available() and (
|
||||
is_gpu_available = (torch.version.cuda is not None or torch.version.hip is not None) and (
|
||||
ortmodule.ONNXRUNTIME_CUDA_VERSION is not None or ortmodule.ONNXRUNTIME_ROCM_VERSION is not None
|
||||
)
|
||||
os.chdir(ortmodule.ORTMODULE_TORCH_CPP_DIR)
|
||||
|
|
|
|||
Loading…
Reference in a new issue