SWDEV-346940 - Remove default AMDGPU_TARGETS
hipcc and clang++ both have logic to detect the installed hardware and to automatically select the appropriate AMDGPU target when it is left unspecified. When the AMDGPU_TARGETS property is initialized with a set of default values, it results in the addition of an explicit set of --offload-arch flags being passed. These explicit architecture flags disable the architecture autodetection in the compiler. The resulting behaviour from setting fixed defaults makes it unpleasant to compile with CMake because they increase the build times for projects unless they are overriden (as most users do not need to build for all five default architectures). The fixed defaults are also troublesome for users with hardware not included in the default set (e.g., gfx1011, gfx1031, gfx1100). A possible alternative might be to detect the architecture within hip-config.cmake rather than running the detection logic on each compiler invocation. However, this approach is simpler. Change-Id: I9495d766b7eed03852eb4dc72b0aabe4100bc32c Signed-off-by: Cordell Bloor <Cordell.Bloor@amd.com>
Este cometimento está contido em:
@@ -158,7 +158,7 @@ if(HIP_COMPILER STREQUAL "clang")
|
||||
if(NOT WIN32)
|
||||
find_dependency(AMDDeviceLibs)
|
||||
endif()
|
||||
set(AMDGPU_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030" CACHE STRING "AMD GPU targets to compile for")
|
||||
set(AMDGPU_TARGETS "" CACHE STRING "AMD GPU targets to compile for")
|
||||
set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for")
|
||||
endif() # HIP_COMPILER check
|
||||
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador