[BUILD] Update gfxTargets for ASAN build (#1242)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
145a13235a
commit
4f31ab85ea
+18
-7
@@ -38,12 +38,9 @@ option(TRACE "Enable additional tracing"
|
||||
# Default GPU architectures to build
|
||||
#==================================================================================================
|
||||
set(DEFAULT_GPUS
|
||||
gfx803
|
||||
gfx900:xnack-
|
||||
gfx906:xnack-
|
||||
gfx908:xnack-
|
||||
gfx90a:xnack-
|
||||
gfx90a:xnack+
|
||||
gfx906
|
||||
gfx908
|
||||
gfx90a
|
||||
gfx940
|
||||
gfx941
|
||||
gfx942
|
||||
@@ -75,13 +72,27 @@ endif()
|
||||
|
||||
# Determine which GPU architectures to build for
|
||||
set(AMDGPU_TARGETS "${DEFAULT_GPUS}" CACHE STRING "Target default GPUs if AMDGPU_TARGETS is not defined.")
|
||||
|
||||
# Modify GPU architectures for Address Sanitizer builds by appending "xnack+"
|
||||
if (BUILD_ADDRESS_SANITIZER)
|
||||
SET(amdgpu_targets "")
|
||||
foreach(amdgpu_target IN LISTS AMDGPU_TARGETS)
|
||||
if(NOT amdgpu_target STREQUAL "")
|
||||
list(APPEND amdgpu_targets "${amdgpu_target}:xnack+")
|
||||
endif()
|
||||
endforeach()
|
||||
SET(AMDGPU_TARGETS "${amdgpu_targets}" CACHE STRING "Modified GPU list for Address-Sanitizer enabled build." FORCE)
|
||||
endif()
|
||||
|
||||
# Check if clang compiler can offload to AMDGPU_TARGETS
|
||||
if (COMMAND rocm_check_target_ids)
|
||||
message(STATUS "Checking for ROCm support for GPU targets:")
|
||||
message(STATUS "Checking for ROCm support for GPU targets: " "${AMDGPU_TARGETS}")
|
||||
rocm_check_target_ids(SUPPORTED_GPUS TARGETS ${AMDGPU_TARGETS})
|
||||
else()
|
||||
message(WARNING "Unable to check for supported GPU targets. Falling back to default GPUs.")
|
||||
set(SUPPORTED_GPUS ${DEFAULT_GPUS})
|
||||
endif()
|
||||
|
||||
set(GPU_TARGETS "${SUPPORTED_GPUS}" CACHE STRING "GPU targets to compile for.")
|
||||
message(STATUS "Compiling for ${GPU_TARGETS}")
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ RCCL build & installation helper script
|
||||
--verbose Show compile commands
|
||||
```
|
||||
|
||||
By default, RCCL builds for all GPU targets defined in `DEFAULT_GPUS` in `CMakeLists.txt`. To target specific GPU(s), and potentially reduce build time, use `--amdgpu_targets` as a `;` separated string listing GPU(s) to target.
|
||||
|
||||
## Manual build
|
||||
|
||||
### To build the library using CMake:
|
||||
|
||||
Reference in New Issue
Block a user