hypre: add option for sycl variant (#34987)
* hypre: add option for sycl variant * hypre +sycl conflicts with @:2.23 * hypre +sycl: raise InstallError for unsupported compiler
This commit is contained in:
parent
f2f3d03d00
commit
3e2721ac7f
1 changed files with 13 additions and 0 deletions
|
@ -75,6 +75,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||||
variant("fortran", default=True, description="Enables fortran bindings")
|
variant("fortran", default=True, description="Enables fortran bindings")
|
||||||
variant("gptune", default=False, description="Add the GPTune hookup code")
|
variant("gptune", default=False, description="Add the GPTune hookup code")
|
||||||
variant("umpire", default=False, description="Enable Umpire support")
|
variant("umpire", default=False, description="Enable Umpire support")
|
||||||
|
variant("sycl", default=False, description="Enable SYCL support")
|
||||||
|
|
||||||
# Patch to add gptune hookup codes
|
# Patch to add gptune hookup codes
|
||||||
patch("ij_gptune.patch", when="+gptune@2.19.0")
|
patch("ij_gptune.patch", when="+gptune@2.19.0")
|
||||||
|
@ -139,6 +140,9 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||||
# Option added in v2.21.0
|
# Option added in v2.21.0
|
||||||
conflicts("+umpire", when="@:2.20")
|
conflicts("+umpire", when="@:2.20")
|
||||||
|
|
||||||
|
# Option added in v2.24.0
|
||||||
|
conflicts("+sycl", when="@:2.23")
|
||||||
|
|
||||||
configure_directory = "src"
|
configure_directory = "src"
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
|
@ -270,6 +274,15 @@ def configure_args(self):
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "+sycl" in spec:
|
||||||
|
configure_args.append("--with-scyl")
|
||||||
|
sycl_compatible_compilers = ["dpcpp", "icpx"]
|
||||||
|
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
|
||||||
|
raise InstallError(
|
||||||
|
"Hypre's SYCL GPU Backend requires DPC++ (dpcpp)"
|
||||||
|
+ " or the oneAPI CXX (icpx) compiler."
|
||||||
|
)
|
||||||
|
|
||||||
if "+unified-memory" in spec:
|
if "+unified-memory" in spec:
|
||||||
configure_args.append("--enable-unified-memory")
|
configure_args.append("--enable-unified-memory")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue