Bugfix hwloc find cuda (#30788)

* Added autotools configure flags to ensure that hwloc finds the correct
version of CUDA that it was concretized against, rather than the first
one that package config finds.

* Added support for finding the correct version of ROCm libraries.  Fixed Flake8.

* Fixed guard on finding ROCm library
This commit is contained in:
Brian Van Essen 2022-05-24 04:17:46 +02:00 committed by GitHub
parent 036048c26f
commit 736fddc079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,6 +156,11 @@ def configure_args(self):
if '+rocm' not in self.spec:
args.append('--disable-rsmi')
if '+rocm' in self.spec:
args.append('--with-rocm={0}'.format(self.spec['rocm'].prefix))
args.append('--with-rocm-version={0}'.format(
self.spec['rocm'].version))
if '+netloc' in self.spec:
args.append('--enable-netloc')
@ -168,4 +173,9 @@ def configure_args(self):
args.extend(self.enable_or_disable('pci'))
args.extend(self.enable_or_disable('shared'))
if '+cuda' in self.spec:
args.append('--with-cuda={0}'.format(self.spec['cuda'].prefix))
args.append('--with-cuda-version={0}'.format(
self.spec['cuda'].version))
return args