mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Add torch.version.hip from cmake (#29815)
Summary: This adds the HIP_VERSION cmake variable as hip_version. This should help detecting ROCm, e.g. in https://github.com/pytorch/pytorch/issues/22091. To parallel CUDA, hip_version is a string. An alternative variant might be to split by '.' and only take the first two parts. The method suffers a bit from ROCm not being as monolithic as CUDA. Pull Request resolved: https://github.com/pytorch/pytorch/pull/29815 Differential Revision: D18532267 Pulled By: bddppq fbshipit-source-id: 1bde4ad0cfacc47bfd1c0945e130921d8575a5bf
This commit is contained in:
parent
69e343f2cc
commit
7889e1e3f9
1
setup.py
1
setup.py
|
|
@ -325,6 +325,7 @@ def build_deps():
|
|||
cmake_cache_vars = defaultdict(lambda: None, cmake.get_cmake_cache_variables())
|
||||
f.write("cuda = {}\n".format(repr(cmake_cache_vars['CUDA_VERSION'])))
|
||||
f.write("git_version = {}\n".format(repr(sha)))
|
||||
f.write("hip = {}\n".format(repr(cmake_cache_vars['HIP_VERSION'])))
|
||||
|
||||
if CMAKE_ONLY:
|
||||
report('Finished running cmake. Run "ccmake build" or '
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user