Changes to variants
This commit is contained in:
parent
b573a3affa
commit
2389927dce
@ -64,14 +64,15 @@ class Libxsmm(MakefilePackage):
|
||||
description='With header-only installation')
|
||||
variant('generator', default=False,
|
||||
description='With generator executable(s)')
|
||||
variant('BLAS', default='default', multi=False,
|
||||
variant('blas', default='default', multi=False,
|
||||
description='Control behavior of BLAS calls',
|
||||
values=('default', '0', '1', '2'))
|
||||
variant('CODE_BUF_MAXSIZE', default=0, multi=False,
|
||||
description='Max. size of JIT-buffer',
|
||||
values=('0', '262144'))
|
||||
variant('large_jit_buffer', default=False,
|
||||
description='Max. JIT buffer size increased to 256 KiB')
|
||||
conflicts('+header-only', when='@:1.6.2',
|
||||
msg='Header-only is available since v1.6.2!')
|
||||
conflicts('+large_jit_buffer', when='@:1.17',
|
||||
msg='large_jit_buffer is available since v1.17!')
|
||||
depends_on('python', type='build')
|
||||
|
||||
@property
|
||||
@ -90,7 +91,6 @@ def build(self, spec, prefix):
|
||||
'CXX={0}'.format(spack_cxx),
|
||||
'FC={0}'.format(spack_fc),
|
||||
'PREFIX=%s' % prefix,
|
||||
'CODE_BUF_MAXSIZE={0}'.format(spec.variants["CODE_BUF_MAXSIZE"].value),
|
||||
'SYM=1'
|
||||
]
|
||||
|
||||
@ -102,10 +102,13 @@ def build(self, spec, prefix):
|
||||
make_args += ['DBG=1']
|
||||
make_args += ['TRACE=1']
|
||||
|
||||
blas_val = spec.variants['BLAS'].value
|
||||
blas_val = spec.variants['blas'].value
|
||||
if blas_val != 'default':
|
||||
make_args += ['BLAS={0}'.format(blas_val)]
|
||||
|
||||
if '+large_jit_buffer' in spec:
|
||||
make_args += ['CODE_BUF_MAXSIZE=262144']
|
||||
|
||||
if '+shared' in spec:
|
||||
make(*(make_args + ['STATIC=0']))
|
||||
|
||||
|
@ -55,4 +55,4 @@ class PyPyfr(PythonPackage):
|
||||
depends_on("scotch@6.0:", when="+scotch", type=('run'))
|
||||
depends_on("cuda@8.0:", when="+cuda", type=('run'))
|
||||
depends_on("rocblas@4.5.0:", when="+hip", type=('run'))
|
||||
depends_on("libxsmm@1.18:+shared BLAS=0 CODE_BUF_MAXSIZE=262144", when="+libxsmm", type=('run'))
|
||||
depends_on("libxsmm@1.18:+shared blas=0 +large_jit_buffer", when="+libxsmm", type=('run'))
|
||||
|
Loading…
Reference in New Issue
Block a user