feat(ci): separate CI and release ASAN build configs for debug info control - #7511
Open
nunnikri wants to merge 2 commits into
Open
feat(ci): separate CI and release ASAN build configs for debug info control#7511nunnikri wants to merge 2 commits into
nunnikri wants to merge 2 commits into
Conversation
… control
ASAN CI builds do not need debug info — they only need to catch bugs.
Removing -g reduces binary size significantly. ASAN release/nightly builds
need -g1 so stack traces include source line info for user investigation.
Changes:
- cmake/therock_sanitizers.cmake: remove -g from sanitizer INIT flags
(debug info now controlled exclusively by the preset).
- CMakePresets.json:
- linux-release-asan / linux-release-host-asan: switch to Release
build type, remove all debug flags (for CI ASAN builds).
- linux-release-asan-debug / linux-release-host-asan-debug (new):
RelWithDebInfo + -g1 -gdwarf-4 (for nightly/release ASAN builds).
- build_tools/github_actions/amdgpu_family_matrix.py: add asan-debug
and host-asan-debug variants pointing to the new debug presets.
- .github/workflows/multi_arch_release_asan.yml: switch to asan-debug
so nightly/release builds use RelWithDebInfo + -g1.
Normal release and RelWithDebInfo builds are unaffected.
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
2 tasks
Contributor
Author
|
The ci build is showing even better build time. https://github.com/ROCm/TheRock/actions/runs/32383947983/job/96535471079?pr=7511 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Separate ASAN build configurations into CI (no debug info) and
release/nightly (with debug info) variants to reduce binary size for
CI builds while preserving debuggable symbols for nightly releases.
ISSUE ID : 6631
Motivation
ASAN instrumentation already bloats binary size 3-5x due to shadow memory
checks. Combined with debug symbols, an ASAN-instrumented rocBLAS library
was ~350MB, dropping to ~50MB after stripping. For CI builds (pull_request,
workflow_dispatch from rocm-systems/rocm-libraries), debug info is
unnecessary — the goal is simply catching bugs. For rockrel nightly/release
builds,
-g1is needed so that ASAN stack traces include source linenumbers for user investigation.
Technical Details
cmake/therock_sanitizers.cmakeRemoved
-gfrom the sanitizerCMAKE_CXX/C_FLAGS_INITstanza for bothHOST_ASANandASAN. Debug info is now controlled exclusively by theCMake preset, eliminating the redundant (and previously overridden) flag.
CMakePresets.jsonlinux-release-asan/linux-release-host-asan(modified):CMAKE_BUILD_TYPEchanged fromRelWithDebInfotoRelease. Debugflags (
-g1 -gdwarf-4) removed. Used for CI ASAN builds — smallerbinaries, faster builds.
linux-release-asan-debug/linux-release-host-asan-debug(new):RelWithDebInfo+-g1 -gdwarf-4. Used for rockrel nightly/releasebuilds where stack traces need source line info.
build_tools/github_actions/amdgpu_family_matrix.pyAdded
asan-debugandhost-asan-debugbuild variants pointing to thenew debug presets.
.github/workflows/multi_arch_release_asan.ymlChanged
build_variant: "asan"→build_variant: "asan-debug"so thatrockrel nightly/release builds use
RelWithDebInfowith-g1.Impact on normal builds: Zero. All changes are scoped to ASAN presets
and the
THEROCK_SANITIZERcode path which is never active in normalRelease or RelWithDebInfo builds.
CMAKE_BUILD_TYPElinux-release-asanReleaselinux-release-host-asanReleaselinux-release-asan-debugRelWithDebInfo-g1 -gdwarf-4linux-release-host-asan-debugRelWithDebInfo-g1 -gdwarf-4Test Plan
Release+ no debug flagsRelWithDebInfo+-g1 -gdwarf-4Test Results
Test asan run(No debug) : https://github.com/ROCm/TheRock/actions/runs/32318830419
Reference asan run(with -g1) : https://github.com/ROCm/TheRock/actions/runs/32316786022
-g1debug)