lammps: updates for AOCC-5 and zen5 (#47014)

Co-authored-by: viveshar <vivek.sharma2@amd.com>
This commit is contained in:
AMD Toolchain Support 2024-10-21 11:56:53 +05:30 committed by GitHub
parent 260b36e272
commit a00fddef4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -884,11 +884,16 @@ def cmake_args(self):
"-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"