Skip to content

Commit

Permalink
[toolchain] Add missing dflags when compiling grid_hip on AMD GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaillefumier authored and oschuett committed Jul 5, 2021
1 parent aea13a4 commit af2d904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/toolchain/scripts/generate_arch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@ if [ "${ENABLE_HIP}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then
HIP_FLAGS+=" -D__HIP_PLATFORM_AMD__ -g --offload-arch=gfx906 -O3 -Xarch_host'-fopenmp' --std=c++11 \$(DFLAGS)"
LIBS+=" IF_HIP(-lhipblas -lamdhip64|)"
PLATFORM_FLAGS='-D__HIP_PLATFORM_AMD__'
DFLAGS+=' IF_HIP(-D__GRID_HIP -D__HIP_PLATFORM_AMD__|)'
;;
Mi100)
check_lib -lamdhip64 "hip"
add_lib_from_paths HIP_LDFLAGS "libamdhip64.*" $LIB_PATHS
HIP_FLAGS+=" -D__HIP_PLATFORM_AMD__ -g --offload-arch=gfx908 -O3 -Xarch_host='-fopenmp' --std=c++11 \$(DFLAGS)"
LIBS+=" IF_HIP(-lhipblas -lamdhip64|)"
PLATFORM_FLAGS='-D__HIP_PLATFORM_AMD__ '
DFLAGS+=' IF_HIP(-D__GRID_HIP -D__HIP_PLATFORM_AMD__|)'
;;
*)
check_command nvcc "cuda"
Expand Down

0 comments on commit af2d904

Please sign in to comment.