From 43b86ce28270943849056893d0265db6e14bf2aa Mon Sep 17 00:00:00 2001 From: AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> Date: Wed, 31 May 2023 05:10:41 +0530 Subject: [PATCH] HPL: amdalloc with AOCC 4.0 (#37757) * adding amdalloc when using aocc 4 * adding and libm for aocc3.2 --- var/spack/repos/builtin/packages/hpl/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index 0f617d6526..ad3cb43eb0 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -115,6 +115,14 @@ def configure_args(self): ): config.append("LDFLAGS={0}".format(self.spec["blas"].libs.ld_flags)) + if "%aocc" in self.spec: + amd_ldflags = " " + if "%aocc@3:" in self.spec: + amd_ldflags += "-lamdlibm -lm " + if "%aocc@4:" in self.spec: + amd_ldflags += "-lamdalloc " + config.append("LDFLAGS=" + amd_ldflags) + return config @when("@:2.2")