diff --git a/CMakeLists.txt b/CMakeLists.txt index c55604032ad..a6e3c03feae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,30 +283,8 @@ foreach(long_form IN LISTS tmp) list(APPEND HSA_AMDGPU_GPU_TARGET ${short_form}) endforeach() -# Map to LC-consumable name. -foreach(AMDGPU_GPU_TARGET IN LISTS HSA_AMDGPU_GPU_TARGET) - # AMDGPU_TARGET_LIST holds the values which are used by the compiler scripts. - if (AMDGPU_GPU_TARGET STREQUAL "gfx700") - list(APPEND AMDGPU_TARGET_LIST "kaveri") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx701") - list(APPEND AMDGPU_TARGET_LIST "hawaii") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx801") - list(APPEND AMDGPU_TARGET_LIST "carrizo") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx802") - list(APPEND AMDGPU_TARGET_LIST "tonga") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx803") - list(APPEND AMDGPU_TARGET_LIST "fiji") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx900") - list(APPEND AMDGPU_TARGET_LIST "gfx900") - elseif (AMDGPU_GPU_TARGET STREQUAL "gfx901") - list(APPEND AMDGPU_TARGET_LIST "gfx901") - else () - message(FATAL_ERROR "${AMDGPU_GPU_TARGET} is not a valid AMDPU target!") - endif () -endforeach(AMDGPU_GPU_TARGET) - # join list -string(REPLACE ";" " " AMDGPU_TARGET "${AMDGPU_TARGET_LIST}") +string(REPLACE ";" " " AMDGPU_TARGET "${HSA_AMDGPU_GPU_TARGET}") MESSAGE(STATUS "HCC configured with AMDGPU targets: ${AMDGPU_TARGET}") ################# diff --git a/clang b/clang index 4ed92a3a15f..17ba13eefa8 160000 --- a/clang +++ b/clang @@ -1 +1 @@ -Subproject commit 4ed92a3a15f689c9c2c7afeaa55eb74a100795f5 +Subproject commit 17ba13eefa8ed20f3f58540c2b282bdb90c6f292 diff --git a/lib/clamp-device.in b/lib/clamp-device.in index b171c3c258b..1c2a86f2408 100755 --- a/lib/clamp-device.in +++ b/lib/clamp-device.in @@ -134,19 +134,19 @@ fi HCC_EXTRA_ARCH_FILE="" # select appropriate ROCm-Device-Libs per AMDGPU_TARGET -if [ $AMDGPU_TARGET == "kaveri" ]; then +if [ $AMDGPU_TARGET == "gfx700" ]; then OCLC_ISA_VERSION_LIB="$ROCM_LIB/oclc_isa_version_700.amdgcn.bc" HCC_EXTRA_ARCH_FILE=$HCC_EXTRA_LIBRARIES_GFX700 -elif [ $AMDGPU_TARGET == "hawaii" ]; then +elif [ $AMDGPU_TARGET == "gfx701" ]; then OCLC_ISA_VERSION_LIB="$ROCM_LIB/oclc_isa_version_701.amdgcn.bc" HCC_EXTRA_ARCH_FILE=$HCC_EXTRA_LIBRARIES_GFX701 -elif [ $AMDGPU_TARGET == "carrizo" ]; then +elif [ $AMDGPU_TARGET == "gfx801" ]; then OCLC_ISA_VERSION_LIB="$ROCM_LIB/oclc_isa_version_801.amdgcn.bc" HCC_EXTRA_ARCH_FILE=$HCC_EXTRA_LIBRARIES_GFX801 -elif [ $AMDGPU_TARGET == "tonga" ]; then +elif [ $AMDGPU_TARGET == "gfx802" ]; then OCLC_ISA_VERSION_LIB="$ROCM_LIB/oclc_isa_version_802.amdgcn.bc" HCC_EXTRA_ARCH_FILE=$HCC_EXTRA_LIBRARIES_GFX802 -elif [ $AMDGPU_TARGET == "fiji" ]; then +elif [ $AMDGPU_TARGET == "gfx803" ]; then OCLC_ISA_VERSION_LIB="$ROCM_LIB/oclc_isa_version_803.amdgcn.bc" HCC_EXTRA_ARCH_FILE=$HCC_EXTRA_LIBRARIES_GFX803 elif [ $AMDGPU_TARGET == "gfx900" ]; then diff --git a/lib/clamp-link.in b/lib/clamp-link.in index 0ca497c3c07..d81b50f5015 100755 --- a/lib/clamp-link.in +++ b/lib/clamp-link.in @@ -327,23 +327,10 @@ if [ -n "$HCC_AMDGPU_TARGET" ]; then IFS=',' HCC_AMDGPU_TARGET_TOKENS=($HCC_AMDGPU_TARGET) unset IFS - # parse individual token, override AMDGPU_TARGET_ARRAY iter=0 for HCC_AMDGPU_TARGET_TOKEN in ${HCC_AMDGPU_TARGET_TOKENS[@]}; do - # map ISA version string to GPU family - if [ "$HCC_AMDGPU_TARGET_TOKEN" = "gfx701" ]; then - AMDGPU_TARGET_ARRAY[$iter]="hawaii" - elif [ "$HCC_AMDGPU_TARGET_TOKEN" = "gfx801" ]; then - AMDGPU_TARGET_ARRAY[$iter]="carrizo" - elif [ "$HCC_AMDGPU_TARGET_TOKEN" = "gfx802" ]; then - AMDGPU_TARGET_ARRAY[$iter]="tonga" - elif [ "$HCC_AMDGPU_TARGET_TOKEN" = "gfx803" ]; then - AMDGPU_TARGET_ARRAY[$iter]="fiji" - else - # not mappable, simply pass to backend and wish it accepts - AMDGPU_TARGET_ARRAY[$iter]=$HCC_AMDGPU_TARGET - fi + AMDGPU_TARGET_ARRAY[$iter]=$HCC_AMDGPU_TARGET ((iter++)) done fi diff --git a/tests/benchEmptyKernel/bench.cpp b/tests/benchEmptyKernel/bench.cpp index 6f33208c73e..611d215e00f 100644 --- a/tests/benchEmptyKernel/bench.cpp +++ b/tests/benchEmptyKernel/bench.cpp @@ -97,7 +97,7 @@ void explicit_launch_null_kernel(const grid_launch_parm *lp, const Kernel &k) void time_dispatch_hsa_kernel(std::string testName, const grid_launch_parm *lp, const char *nullkernel_hsaco_dir) { std::string nullkernel_hsaco(nullkernel_hsaco_dir); - nullkernel_hsaco += "/nullkernel-fiji.hsaco"; + nullkernel_hsaco += "/nullkernel-gfx803.hsaco"; Kernel k = load_hsaco(lp->av, nullkernel_hsaco.c_str(), KERNEL_NAME); std::chrono::time_point start, end; diff --git a/tests/benchEmptyKernel/nullkernel.cpp b/tests/benchEmptyKernel/nullkernel.cpp index fd5b73857f4..f7b8b86ee0c 100644 --- a/tests/benchEmptyKernel/nullkernel.cpp +++ b/tests/benchEmptyKernel/nullkernel.cpp @@ -1,5 +1,5 @@ -// RUN: %hc --amdgpu-target=gfx701 --amdgpu-target=gfx801 --amdgpu-target=gfx802 --amdgpu-target=gfx803 -fPIC -Wl,-Bsymbolic -shared %S/nullkernel.cpp -o %T/nullkernel -// RUN: %extractkernel -i %T/nullkernel +// RUN: %hc --amdgpu-target=gfx801 --amdgpu-target=gfx802 --amdgpu-target=gfx803 -fPIC -Wl,-Bsymbolic -shared %S/nullkernel.cpp -o %T/nullkernel +// RUN: HCC_HOME=%llvm_libs_dir/../../ %extractkernel -i %T/nullkernel #include "hc.hpp" #include "grid_launch.hpp"