Update libbeagle (#18703)
This PR fixes a couple of things with the libbeagle package. - libbeagle can only be built for one GPU type. Add a test for that. - version 2 had the arch statement in libhmsbeagle/GPU/kernels/Makefile.am but version 3 has it in configure.ac. Put the variant specified value in configure.ac for consistency.
This commit is contained in:
parent
0f332c73a6
commit
2576d8d767
@ -29,16 +29,24 @@ class Libbeagle(AutotoolsPackage, CudaPackage):
|
|||||||
def patch(self):
|
def patch(self):
|
||||||
# update cuda architecture if necessary
|
# update cuda architecture if necessary
|
||||||
if '+cuda' in self.spec:
|
if '+cuda' in self.spec:
|
||||||
arch = self.spec.variants['cuda_arch'].value
|
cuda_arch = self.spec.variants['cuda_arch'].value
|
||||||
archflag = ''
|
archflag = ''
|
||||||
|
|
||||||
if arch[0] != 'none':
|
if cuda_arch != 'none':
|
||||||
archflag = '-arch=%s' % arch[0]
|
if len(cuda_arch) > 1:
|
||||||
|
raise InstallError(
|
||||||
|
'libbeagle only supports compilation for a single GPU'
|
||||||
|
'type.'
|
||||||
|
)
|
||||||
|
archflag = '-arch compute_{0}'.format(cuda_arch[0])
|
||||||
|
|
||||||
filter_file('-arch compute_13', archflag,
|
filter_file('-arch compute_13', '',
|
||||||
'libhmsbeagle/GPU/kernels/Makefile.am',
|
'libhmsbeagle/GPU/kernels/Makefile.am',
|
||||||
string=True)
|
string=True)
|
||||||
|
|
||||||
|
filter_file(r'(NVCCFLAGS="-O3).*(")',
|
||||||
|
r'\1 {0}\2'.format(archflag), 'configure.ac')
|
||||||
|
|
||||||
# point CUDA_LIBS to libcuda.so
|
# point CUDA_LIBS to libcuda.so
|
||||||
filter_file('-L$with_cuda/lib', '-L$with_cuda/lib64/stubs',
|
filter_file('-L$with_cuda/lib', '-L$with_cuda/lib64/stubs',
|
||||||
'configure.ac', string=True)
|
'configure.ac', string=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user