diff options
author | Kaan <61908449+kaanolgu@users.noreply.github.com> | 2024-11-10 18:51:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-10 11:51:39 -0700 |
commit | 97b5ec6e4fc5c77885c9535e921bc03449e3e604 (patch) | |
tree | 924454b553fc5ecd16811f520fac37ef18fe72d7 | |
parent | 4c9bc8d879a2eee8c38eeaee209fc0308fc68a37 (diff) | |
download | spack-97b5ec6e4fc5c77885c9535e921bc03449e3e604.tar.gz spack-97b5ec6e4fc5c77885c9535e921bc03449e3e604.tar.bz2 spack-97b5ec6e4fc5c77885c9535e921bc03449e3e604.tar.xz spack-97b5ec6e4fc5c77885c9535e921bc03449e3e604.zip |
Add support for Codeplay AMD Plugin for Intel OneAPI Compilers (#46749)
* Added support for Codeplay AMD Plugin for Intel OneAPI Compilers
* [@spackbot] updating style on behalf of kaanolgu
* Adding 2025.0.0
* removed HOME and XDG_RUNTIME_DIR
* [@spackbot] updating style on behalf of kaanolgu
---------
Co-authored-by: Kaan Olgu <kaan.olgu@bristol.ac.uk>
-rw-r--r-- | var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 3fc63be652..d7cb974a56 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -20,6 +20,14 @@ versions = [ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/69f79888-2d6c-4b20-999e-e99d72af68d4/intel-fortran-compiler-2025.0.0.723_offline.sh", "sha256": "2be6d607ce84f35921228595b118fbc516d28587cbc4e6dcf6b7219e5cd1a9a9", }, + "nvidia-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2025.0.0&filters[]=12.0&filters[]=linux", + "sha256": "264a43d2e07c08eb31d6483fb1c289a6b148709e48e9a250efc1b1e9a527feb6", + }, + "amd-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2025.0.0&filters[]=6.1.0&filters[]=linux", + "sha256": "2c5a147e82f0e995b9c0457b53967cc066d5741d675cb64cb9eba8e3c791a064", + }, }, { "version": "2024.2.1", @@ -35,6 +43,10 @@ versions = [ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.1&filters[]=12.0&filters[]=linux", "sha256": "2c377027c650291ccd8267cbf75bd3d00c7b11998cc59d5668a02a0cbc2c015f", }, + "amd-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.1&filters[]=6.1.0&filters[]=linux", + "sha256": "fbeb64f959f907cbf3469f4e154b2af6d8ff46fe4fc667c811e04f3872a13823", + }, }, { "version": "2024.2.0", @@ -50,6 +62,10 @@ versions = [ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.0&filters[]=12.0&filters[]=linux", "sha256": "0622df0054364b01e91e7ed72a33cb3281e281db5b0e86579f516b1cc5336b0f", }, + "amd-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.0&filters[]=6.1.0&filters[]=linux", + "sha256": "d1e9d30fa92f3ef606f054d8cbd7c338b3e46f6a9f8472736e29e8ccd9e50688", + }, }, { "version": "2024.1.0", @@ -286,6 +302,9 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): # Add the nvidia variant variant("nvidia", default=False, description="Install NVIDIA plugin for OneAPI") conflicts("@:2022.2.1", when="+nvidia", msg="Codeplay NVIDIA plugin requires newer release") + # Add the amd variant + variant("amd", default=False, description="Install AMD plugin for OneAPI") + conflicts("@:2022.2.1", when="+amd", msg="Codeplay AMD plugin requires newer release") # TODO: effectively gcc is a direct dependency of intel-oneapi-compilers, but we # cannot express that properly. For now, add conflicts for non-gcc compilers # instead. @@ -309,6 +328,14 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): expand=False, **v["nvidia-plugin"], ) + if "amd-plugin" in v: + resource( + name="amd-plugin-installer", + placement="amd-plugin-installer", + when="@{0}".format(v["version"]), + expand=False, + **v["amd-plugin"], + ) @property def v2_layout_versions(self): @@ -374,12 +401,15 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): if nvidia_script: if platform.system() == "Linux": bash = Executable("bash") - # Installer writes files in ~/intel set HOME so it goes to prefix - bash.add_default_env("HOME", prefix) - # Installer checks $XDG_RUNTIME_DIR/.bootstrapper_lock_file as well - bash.add_default_env("XDG_RUNTIME_DIR", join_path(self.stage.path, "runtime")) # For NVIDIA plugin installer bash(nvidia_script[0], "-y", "--install-dir", self.prefix) + if self.spec.satisfies("+amd"): + amd_script = find("amd-plugin-installer", "*") + if amd_script: + if platform.system() == "Linux": + bash = Executable("bash") + # For AMD plugin installer + bash(amd_script[0], "-y", "--install-dir", self.prefix) @run_after("install") def inject_rpaths(self): |