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:
		| @@ -75,6 +75,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage): | ||||
|     variant("fortran", default=True, description="Enables fortran bindings") | ||||
|     variant("gptune", default=False, description="Add the GPTune hookup code") | ||||
|     variant("umpire", default=False, description="Enable Umpire support") | ||||
|     variant("sycl", default=False, description="Enable SYCL support") | ||||
| 
 | ||||
|     # Patch to add gptune hookup codes | ||||
|     patch("ij_gptune.patch", when="+gptune@2.19.0") | ||||
| @@ -139,6 +140,9 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage): | ||||
|     # Option added in v2.21.0 | ||||
|     conflicts("+umpire", when="@:2.20") | ||||
| 
 | ||||
|     # Option added in v2.24.0 | ||||
|     conflicts("+sycl", when="@:2.23") | ||||
| 
 | ||||
|     configure_directory = "src" | ||||
| 
 | ||||
|     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: | ||||
|             configure_args.append("--enable-unified-memory") | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 eugeneswalker
					eugeneswalker