Skip to content

Commit 6057515

Browse files
harshithapvThiago Crepaldi
andauthored
Propagate ROCM version to onnxruntime wheel package (microsoft#8247) (microsoft#8250)
Co-authored-by: Thiago Crepaldi <[email protected]>
1 parent 8d6825b commit 6057515

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def get_torch_version():
424424
install_requires = f.read().splitlines()
425425

426426
if enable_training:
427-
def save_build_and_package_info(package_name, version_number, cuda_version):
427+
def save_build_and_package_info(package_name, version_number, cuda_version, rocm_version):
428428
sys.path.append(path.join(path.dirname(__file__), 'onnxruntime', 'python'))
429429
from onnxruntime_collect_build_info import find_cudart_versions
430430

@@ -446,11 +446,10 @@ def save_build_and_package_info(package_name, version_number, cuda_version):
446446
"did not find any cudart library"
447447
if not cudart_versions or len(cudart_versions) == 0
448448
else "found multiple cudart libraries")
449-
else:
450-
# TODO: rocm
451-
pass
449+
elif rocm_version:
450+
f.write("rocm_version = '{}'\n".format(rocm_version))
452451

453-
save_build_and_package_info(package_name, version_number, cuda_version)
452+
save_build_and_package_info(package_name, version_number, cuda_version, rocm_version)
454453

455454
# Setup
456455
setup(

0 commit comments

Comments
 (0)