From 056ca0edfa38c45d481dab9e3a7b8a94498adda2 Mon Sep 17 00:00:00 2001 From: alex-breslow-amd Date: Thu, 22 May 2025 20:33:25 -0700 Subject: [PATCH] Make offload-compress the default (#1704) * Make offload-compress the default * Add guard for --offload-compress since it was introduced in ROCm 6.2 * Address some of Nilesh's feedback. * Reorganize for code cleanliness * Improve comment * Compress gpu code at link and compile time [ROCm/rccl commit: f5b44acb1bd60ca31ce0352c9d2e8b4cb3ea767e] --- projects/rccl/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/rccl/CMakeLists.txt b/projects/rccl/CMakeLists.txt index 789d558ab6..c6e8da94ef 100644 --- a/projects/rccl/CMakeLists.txt +++ b/projects/rccl/CMakeLists.txt @@ -819,6 +819,15 @@ endif() if (HAVE_PARALLEL_JOBS) target_compile_options(rccl PRIVATE -parallel-jobs=12) endif() + +if (ROCM_VERSION VERSION_GREATER_EQUAL "60200") + target_compile_options(rccl PRIVATE --offload-compress) # Compress GPU code at compile time. + target_link_libraries(rccl PRIVATE --offload-compress) # Compress GPU code at link time. + message(STATUS "--offload-compress enabled - ROCm version >= 6.2.0") +else() + message(STATUS "--offload-compress disabled - ROCm version < 6.2.0") +endif() + target_compile_options(rccl PRIVATE -Werror=uninitialized) target_compile_options(rccl PRIVATE -Werror=sometimes-uninitialized) target_compile_options(rccl PRIVATE -Wall)