Skip to content

Commit

Permalink
Keep GPU-kernels in (fat) binary (ELPA).
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Oct 24, 2024
1 parent 5ca4803 commit fc9e09c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
12 changes: 5 additions & 7 deletions config/elpa/configure-elpa-hsw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ LDFLAGS="-L${MKLROOT}/lib/intel64"

AR=$(command -v xiar || echo "ar")
if [ "1" != "${INTEL}" ]; then
CXX=$(command -v mpiicpx || echo "mpiicpc -cxx=icpx")
CC=$(command -v mpiicx || echo "mpiicc -cc=icx")
CXX=icpx; CC=icx
else
CXX="mpiicpc -cxx=$(command -v icpc || echo icpx)"
CC="mpiicc -cc=$(command -v icc || echo icx)"
CXX=$(command -v icpc || echo icpx)
CC=$(command -v icc || echo icx)
fi

if [ "0" != "${GPU}" ]; then # incl. undefined
CONFOPTS+=" --enable-intel-gpu-backend=sycl --enable-intel-gpu-sycl-kernels"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -Wc,-fsycl -fsycl -fsycl-targets=spir64"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -fsycl -fsycl-targets=spir64"
LIBS+=" -lmkl_sycl -lsycl -lsvml"
LDFLAGS+=" -Wc,-fsycl"
fi
if [ "1" != "${INTEL}" ]; then
if [ "0" != "${INTEL}" ]; then
Expand Down Expand Up @@ -136,8 +136,6 @@ fi

./configure --disable-option-checking \
--disable-dependency-tracking \
--host=x86_64-unknown-linux-gnu \
--disable-mpi-module \
--prefix="${DEST}" ${CONFOPTS} "$@"

if [ -e "${HERE}/Makefile" ]; then
Expand Down
12 changes: 5 additions & 7 deletions config/elpa/configure-elpa-skx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ LDFLAGS="-L${MKLROOT}/lib/intel64"

AR=$(command -v xiar || echo "ar")
if [ "1" != "${INTEL}" ]; then
CXX=$(command -v mpiicpx || echo "mpiicpc -cxx=icpx")
CC=$(command -v mpiicx || echo "mpiicc -cc=icx")
CXX=icpx; CC=icx
else
CXX="mpiicpc -cxx=$(command -v icpc || echo icpx)"
CC="mpiicc -cc=$(command -v icc || echo icx)"
CXX=$(command -v icpc || echo icpx)
CC=$(command -v icc || echo icx)
fi

if [ "0" != "${GPU}" ]; then # incl. undefined
CONFOPTS+=" --enable-intel-gpu-backend=sycl --enable-intel-gpu-sycl-kernels"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -Wc,-fsycl -fsycl -fsycl-targets=spir64"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -fsycl -fsycl-targets=spir64"
LIBS+=" -lmkl_sycl -lsycl -lsvml"
LDFLAGS+=" -Wc,-fsycl"
fi
if [ "1" != "${INTEL}" ]; then
if [ "0" != "${INTEL}" ]; then
Expand Down Expand Up @@ -136,8 +136,6 @@ fi

./configure --disable-option-checking \
--disable-dependency-tracking \
--host=x86_64-unknown-linux-gnu \
--disable-mpi-module \
--prefix="${DEST}" ${CONFOPTS} "$@"

if [ -e "${HERE}/Makefile" ]; then
Expand Down
10 changes: 5 additions & 5 deletions config/elpa/configure-elpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ LDFLAGS="-L${MKLROOT}/lib/intel64"

AR=$(command -v xiar || echo "ar")
if [ "1" != "${INTEL}" ]; then
CXX=$(command -v mpiicpx || echo "mpiicpc -cxx=icpx")
CC=$(command -v mpiicx || echo "mpiicc -cc=icx")
CXX=icpx; CC=icx
else
CXX="mpiicpc -cxx=$(command -v icpc || echo icpx)"
CC="mpiicc -cc=$(command -v icc || echo icx)"
CXX=$(command -v icpc || echo icpx)
CC=$(command -v icc || echo icx)
fi

if [ "0" != "${GPU}" ]; then # incl. undefined
CONFOPTS+=" --enable-intel-gpu-backend=sycl --enable-intel-gpu-sycl-kernels"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -Wc,-fsycl -fsycl -fsycl-targets=spir64"
CXXFLAGS+=" -I$(dirname "$(command -v ${CXX})")/../linux/include/sycl -fsycl -fsycl-targets=spir64"
LIBS+=" -lmkl_sycl -lsycl -lsvml"
LDFLAGS+=" -Wc,-fsycl"
fi
if [ "1" != "${INTEL}" ]; then
if [ "0" != "${INTEL}" ]; then
Expand Down

0 comments on commit fc9e09c

Please sign in to comment.