summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2024-10-21 11:56:53 +0530
committerGitHub <noreply@github.com>2024-10-21 08:26:53 +0200
commita00fddef4ef790468c62061dce455b5b03dc79f2 (patch)
tree3360df6a8bfa41617200520b2d9f0cc2d8fdc2ce
parent260b36e2725131139616fc4abbe48f916ab0da31 (diff)
downloadspack-a00fddef4ef790468c62061dce455b5b03dc79f2.tar.gz
spack-a00fddef4ef790468c62061dce455b5b03dc79f2.tar.bz2
spack-a00fddef4ef790468c62061dce455b5b03dc79f2.tar.xz
spack-a00fddef4ef790468c62061dce455b5b03dc79f2.zip
lammps: updates for AOCC-5 and zen5 (#47014)
Co-authored-by: viveshar <vivek.sharma2@amd.com>
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index a74980abfd..fc58908d58 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -884,11 +884,16 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
"-O3 -fno-math-errno -fno-unroll-loops "
"-fveclib=AMDLIBM -muse-unaligned-vector-move"
)
- if spec.satisfies("%aocc@4.1:"):
+ if spec.satisfies("%aocc@4.1:4.2"):
cxx_flags += (
" -mllvm -force-gather-overhead-cost=50"
" -mllvm -enable-masked-gather-sequence=false"
)
+ elif spec.satisfies("%aocc@5.0:"):
+ cxx_flags += " -mllvm -enable-aggressive-gather"
+ if spec.target >= "zen5":
+ cxx_flags += " -fenable-restrict-based-lv"
+
# add -fopenmp-simd if OpenMP not already turned on
if spec.satisfies("~openmp"):
cxx_flags += " -fopenmp-simd"