ECP-SDK/VTK-m: Make ROCm + VTK-m contraints (#28712)
* ECP-SDK/VTK-m: Update ROCm variant VTK-m set contraint for when rocm/kokkos are available. SDK Make ROCmPackage and propagate amdgpu_arch and rocm variant to VTK-m. Note: SDK has to check vtk-m@ 1.7: and :1.6 explicitly in orderer to have 1.7 be selected by default if +rocm in the SDK. * ECP-SDK: Enable ROCm + VTK-m constraints
This commit is contained in:
parent
3370d3f57e
commit
30a9bfe38f
@ -6,7 +6,7 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class EcpDataVisSdk(BundlePackage, CudaPackage):
|
class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage):
|
||||||
"""ECP Data & Vis SDK"""
|
"""ECP Data & Vis SDK"""
|
||||||
|
|
||||||
homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk"
|
homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk"
|
||||||
@ -95,6 +95,8 @@ def exclude_variants(variants, exclude):
|
|||||||
############################################################
|
############################################################
|
||||||
cuda_arch_variants = ['cuda_arch={0}'.format(x)
|
cuda_arch_variants = ['cuda_arch={0}'.format(x)
|
||||||
for x in CudaPackage.cuda_arch_values]
|
for x in CudaPackage.cuda_arch_values]
|
||||||
|
amdgpu_target_variants = ['amdgpu_target={0}'.format(x)
|
||||||
|
for x in ROCmPackage.amdgpu_targets]
|
||||||
|
|
||||||
dav_sdk_depends_on('adios2+shared+mpi+fortran+python+blosc+sst+ssc+dataman',
|
dav_sdk_depends_on('adios2+shared+mpi+fortran+python+blosc+sst+ssc+dataman',
|
||||||
when='+adios2',
|
when='+adios2',
|
||||||
@ -154,6 +156,12 @@ def exclude_variants(variants, exclude):
|
|||||||
dav_sdk_depends_on('vtk-m+shared+mpi+openmp+rendering',
|
dav_sdk_depends_on('vtk-m+shared+mpi+openmp+rendering',
|
||||||
when='+vtkm',
|
when='+vtkm',
|
||||||
propagate=['cuda'] + cuda_arch_variants)
|
propagate=['cuda'] + cuda_arch_variants)
|
||||||
|
depends_on('vtk-m +rocm', when='+vtkm +rocm ^vtk-m@1.7:')
|
||||||
|
for amdgpu_target in amdgpu_target_variants:
|
||||||
|
depends_on('vtk-m {0}'.format(amdgpu_target),
|
||||||
|
when='+vtkm {0} ^vtk-m@1.7:'.format(amdgpu_target))
|
||||||
|
|
||||||
|
# depends_on('vtk-m ~rocm', when='+vtkm +rocm ^vtk-m@:1.6')
|
||||||
|
|
||||||
# +python is currently broken in sz
|
# +python is currently broken in sz
|
||||||
# dav_sdk_depends_on('sz+shared+fortran+python+random_access',
|
# dav_sdk_depends_on('sz+shared+fortran+python+random_access',
|
||||||
|
@ -61,7 +61,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
# Device variants
|
# Device variants
|
||||||
# CudaPackage provides cuda variant
|
# CudaPackage provides cuda variant
|
||||||
# ROCmPackage provides rocm variant
|
# ROCmPackage provides rocm variant
|
||||||
variant("kokkos", default=False, description="build using Kokkos backend")
|
variant("kokkos", default=False, when='@1.6:', description="build using Kokkos backend")
|
||||||
variant("cuda_native", default=True, description="build using native cuda backend", when="+cuda")
|
variant("cuda_native", default=True, description="build using native cuda backend", when="+cuda")
|
||||||
variant("openmp", default=(sys.platform != 'darwin'), description="build openmp support")
|
variant("openmp", default=(sys.platform != 'darwin'), description="build openmp support")
|
||||||
variant("tbb", default=(sys.platform == 'darwin'), description="build TBB support")
|
variant("tbb", default=(sys.platform == 'darwin'), description="build TBB support")
|
||||||
@ -94,6 +94,11 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("rocm-cmake@3.7:", when="+rocm")
|
depends_on("rocm-cmake@3.7:", when="+rocm")
|
||||||
depends_on("hip@3.7:", when="+rocm")
|
depends_on("hip@3.7:", when="+rocm")
|
||||||
|
|
||||||
|
# The rocm variant is only valid options for >= 1.7. It would be better if
|
||||||
|
# this could be expressed as a when clause to disable the rocm variant,
|
||||||
|
# but that is not currently possible since when clauses are stacked,
|
||||||
|
# not overwritten.
|
||||||
|
conflicts('+rocm', when='@:1.6')
|
||||||
conflicts("+rocm", when="+cuda")
|
conflicts("+rocm", when="+cuda")
|
||||||
conflicts("+rocm", when="~kokkos", msg="VTK-m does not support HIP without Kokkos")
|
conflicts("+rocm", when="~kokkos", msg="VTK-m does not support HIP without Kokkos")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user