2
0

HIPCC - Use clang if clang++ is not compiled

Este cometimento está contido em:
Aaron Enye Shi
2018-06-21 18:12:55 +00:00
ascendente 272c16d34e
cometimento dc850cc3e7
+6 -1
Ver ficheiro
@@ -115,8 +115,13 @@ if ($HIP_PLATFORM eq "clang") {
$ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm";
$HIPCC="$HIP_CLANG_PATH/clang++";
$HIPCXXFLAGS .= "-std=c++11 -I$HIP_PATH/include";
$HIPLDFLAGS = "--hip-link --hip-device-lib-path=$DEVICE_LIB_PATH -L$HIP_PATH/lib -lhip_hcc";
# If $HIPCC clang++ is not compiled, use clang instead
if ( ! -e $HIPCC ) {
$HIPCC="$HIP_CLANG_PATH/clang";
$HIPLDFLAGS = "--driver-mode=g++ " . $HIPLDFLAGS;
}
} elsif ($HIP_PLATFORM eq "hcc") {
$HSA_PATH=$ENV{'HSA_PATH'} // "/opt/rocm/hsa";