Merge commit 'a76c7b10281cf46486e6563ffeb3ee9cb4a20348' into develop

This commit is contained in:
assistant-librarian[bot]
2025-10-01 22:11:21 +00:00
parent 58353e999c
commit 24ac4febf4
2 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
def __version__():
import subprocess
# needs to be manually updated
rocm_version = "7.0.1"
hash_width = 6
try:
hash = subprocess.check_output("git rev-parse HEAD", shell=True, text=True)[
:hash_width
]
except:
hash = "0" * hash_width
try:
change_count = subprocess.check_output(
f"git rev-list rocm-{rocm_version}..HEAD --count", shell=True, text=True
).strip()
except:
change_count = "0"
return f"{rocm_version}.dev{change_count}+g{hash}"