Skip to content

Commit

Permalink
ci: set all env variables in setup_env.sh, so BLAS++ sees blas_int du…
Browse files Browse the repository at this point in the history
…ring build
  • Loading branch information
mgates3 committed Aug 1, 2023
1 parent 750d537 commit 350d4e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,8 @@ print "======================================== Environment"
env

print "======================================== Setup build"
export color=no
export CXXFLAGS="-Werror -Wno-unused-command-line-argument"

# Test int64 build with make/cuda and cmake/amd.
# Test int32 build with cmake/cuda and make/amd and all others.
if [ "${maker}" = "make" -a "${device}" = "gpu_nvidia" ]; then
export blas_int=int64
elif [ "${maker}" = "cmake" -a "${device}" = "gpu_amd" ]; then
export blas_int=int64
else
export blas_int=int32
fi
# Note: set all env variables in setup_env.sh,
# else build.sh and test.sh won't see them.

rm -rf ${top}/install
if [ "${maker}" = "make" ]; then
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,20 @@ echo "MKLROOT=${MKLROOT}"
quiet module load pkgconf
quiet which pkg-config

# CMake will find CUDA in /usr/local/cuda, so need to explicitly set
# gpu_backend.
# CMake finds CUDA in /usr/local/cuda, so need to explicitly set gpu_backend.
export gpu_backend=none
export color=no
export CXXFLAGS="-Werror -Wno-unused-command-line-argument"

# Test int64 build with make/cuda and cmake/amd.
# Test int32 build with cmake/cuda and make/amd and all others.
if [ "${maker}" = "make" -a "${device}" = "gpu_nvidia" ]; then
export blas_int=int64
elif [ "${maker}" = "cmake" -a "${device}" = "gpu_amd" ]; then
export blas_int=int64
else
export blas_int=int32
fi

if [ "${device}" = "gpu_nvidia" ]; then
print "======================================== Load CUDA"
Expand Down

0 comments on commit 350d4e8

Please sign in to comment.