mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-19 22:39:03 +00:00
* Fix ruff linter errors * Fix remod dos2unix command * Clang format * Ignore utility in remod * Run remod * Specify clang-format version in pre-commit * Specify ruff version * Include PoolKernelArgs in reference_pool * Add calculate_total_elements to reference batched contraction * Fix calculate_total_elements declaration * Refactor remod pre-commit hook * Fix Aquant tests --------- Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
20 lines
569 B
Python
20 lines
569 B
Python
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 Exception:
|
|
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 Exception:
|
|
change_count = "0"
|
|
return f"{rocm_version}.dev{change_count}+g{hash}"
|