Skip to content

Commit

Permalink
Propagate ROCM version to onnxruntime wheel package (#8247) (#8250)
Browse files Browse the repository at this point in the history
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
  • Loading branch information
harshithapv and Thiago Crepaldi authored Jul 1, 2021
1 parent 8d6825b commit 6057515
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get_torch_version():
install_requires = f.read().splitlines()

if enable_training:
def save_build_and_package_info(package_name, version_number, cuda_version):
def save_build_and_package_info(package_name, version_number, cuda_version, rocm_version):
sys.path.append(path.join(path.dirname(__file__), 'onnxruntime', 'python'))
from onnxruntime_collect_build_info import find_cudart_versions

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

save_build_and_package_info(package_name, version_number, cuda_version)
save_build_and_package_info(package_name, version_number, cuda_version, rocm_version)

# Setup
setup(
Expand Down

0 comments on commit 6057515

Please sign in to comment.