Files
rocm-systems/projects
Cordell Bloor f7a7997c66 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>


[ROCm/clr commit: e1bed6f354]
2023-05-16 16:35:09 -06:00
..