Skip to content

Commit

Permalink
toolchain: fallback to CUDA_HOME if CUDA_PATH is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Dec 29, 2021
1 parent 68f0fc6 commit ebb2aed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tools/toolchain/scripts/generate_arch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ if [ "${ENABLE_CUDA}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then
CUDA_FLAGS=''
add_include_from_paths CUDA_FLAGS "cuda.h" $INCLUDE_PATHS
NVFLAGS+=" ${CUDA_FLAGS}"
CFLAGS+=" -I${CUDA_PATH}/include"
CXXFLAGS+=" -I${CUDA_PATH}/include"
CFLAGS+=" -I${CUDA_PATH:-${CUDA_HOME:-/CUDA_HOME-notset}}/include"
CXXFLAGS+=" -I${CUDA_PATH:-${CUDA_HOME:-/CUDA_HOME-notset}}/include"

# Set LD-flags
CUDA_LDFLAGS=''
Expand Down Expand Up @@ -192,7 +192,7 @@ if [ "${ENABLE_HIP}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then
DFLAGS+=" IF_HIP(-D__HIP_PLATFORM_NVIDIA__ -D__GRID_HIP|)" # -D__DBCSR_ACC
HIP_FLAGS=" -g -arch sm_${ARCH_NUM} -O3 -Xcompiler='-fopenmp' --std=c++11 \$(DFLAGS)"
add_include_from_paths CUDA_CFLAGS "cuda.h" $INCLUDE_PATHS
HIP_INCLUDES+=" -I${CUDA_PATH}/include"
HIP_INCLUDES+=" -I${CUDA_PATH:-${CUDA_HOME:-/CUDA_HOME-notset}}/include"
# GCC issues lots of warnings for hip/nvidia_detail/hip_runtime_api.h
CFLAGS+=" -Wno-error ${CUDA_CFLAGS}"
CXXFLAGS+=" -Wno-error ${CUDA_CFLAGS}"
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/stage5/install_elpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ case "$with_elpa" in
--enable-static=yes \
${config_flags} \
--enable-nvidia-gpu=$([ "$TARGET" == "nvidia" ] && echo "yes" || echo "no") \
--with-cuda-path=${CUDA_PATH} \
--with-cuda-path=${CUDA_PATH:-${CUDA_HOME:-/CUDA_HOME-notset}} \
--with-NVIDIA-GPU-compute-capability=$([ "$TARGET" == "nvidia" ] && echo "sm_$ARCH_NUM" || echo "sm_35") \
CUDA_CFLAGS="-std=c++14 -allow-unsupported-compiler" \
OMPI_MCA_plm_rsh_agent=/bin/false \
Expand Down

0 comments on commit ebb2aed

Please sign in to comment.