Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 7e1ff57

Browse files
author
Castiglioni Giacomo
committed
pragm/flag to vec hh with clang, addded gcc
1 parent 44d964f commit 7e1ff57

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

test/benchmark/kernels/hh.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ void nrn_state_hh_ext(void* __restrict__ mech){
5252
int id;
5353
int node_id, ena_id, ek_id;
5454
double v;
55-
#pragma ivdep
56-
for(id = 0; id<inst->node_count; id = ++id) {
55+
#pragma ivdep // icpc vec helper
56+
#pragma omp simd // clang vec helper
57+
for(id = 0; id<inst->node_count; ++id) {
5758
node_id = inst->node_index[id];
5859
ena_id = inst->ion_ena_index[id];
5960
ek_id = inst->ion_ek_index[id];

test/benchmark/nmodl-llvm-time.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ ext_lib="libextkernel.so"
8585
# compilers
8686
icpc_exe=icpc
8787
declare -a icpc_flags=(
88-
# "-O2"
8988
"-O2 -march=skylake-avx512 -mtune=skylake-avx512 -prec-div -fimf-use-svml"
9089
"-O2 -qopt-zmm-usage=high -xCORE-AVX512 -prec-div -fimf-use-svml"
9190
"-O2 -mavx512f -prec-div -fimf-use-svml"
@@ -96,20 +95,28 @@ declare -a icpc_flags=(
9695
clang_bin_path="/gpfs/bbp.cscs.ch/data/project/proj16/software/llvm/install/0521/bin"
9796
clang_exe=${clang_bin_path}/clang++
9897
declare -a clang_flags=(
99-
# "-O3"
100-
"-O3 -march=skylake-avx512 -fveclib=SVML"
10198
"-O3 -march=skylake-avx512 -ffast-math -fveclib=SVML"
99+
"-O3 -mavx512f -ffast-math -fopemp -fveclib=SVML"
102100
"-O3 -mavx512f -ffast-math -fveclib=SVML"
103-
"-O3 -mavx2 -ffast-math -fveclib=SVML"
104-
"-O3 -msse2 -ffast-math -fveclib=SVML"
101+
"-O3 -mavx512f -fveclib=SVML"
102+
"-O3 -mavx2 -ffast-math -fopemp -fveclib=SVML"
103+
"-O3 -msse2 -ffast-math -fopemp -fveclib=SVML"
104+
)
105+
106+
gcc_bin_path="/gpfs/bbp.cscs.ch/ssd/apps/hpc/jenkins/deploy/compilers/2021-01-06/linux-rhel7-x86_64/gcc-4.8.5/gcc-9.3.0-45gzrp/bin"
107+
gcc_exe=${gcc_bin_path}/g++
108+
declare -a gcc_flags=(
109+
"-O3 -mavx512f -ffast-math -ftree-vectorize -mveclibabi=svml"
110+
"-O3 -mavx2 -ffast-math -ftree-vectorize -mveclibabi=svml"
111+
"-O3 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml"
105112
)
106113

107114
# loop over options
108115
for kernel_target in compute-bound memory-bound hh; do
109116
echo "kernel: "${kernel_target}
110117

111118
# loop over other compilers
112-
for compiler in icpc clang; do
119+
for compiler in icpc clang gcc; do
113120
echo "| compiler: "${compiler}
114121

115122
compiler_exe=${compiler}_exe

0 commit comments

Comments
 (0)