[Comgr][hotswap] Add raise_cli + lit harness for hotswap-raise fixtures#2552
Open
tgymnich wants to merge 1 commit into
Open
Conversation
Author
This was referenced May 15, 2026
93fa2cd to
a827d06
Compare
9d870cf to
1c890b3
Compare
1c890b3 to
c0f8d72
Compare
a827d06 to
19af066
Compare
c0f8d72 to
6c0848a
Compare
19af066 to
0f28b23
Compare
6c0848a to
59bb6f0
Compare
0f28b23 to
426a1be
Compare
59bb6f0 to
f866401
Compare
426a1be to
268cdab
Compare
f866401 to
c18d88f
Compare
268cdab to
9369d97
Compare
c18d88f to
904a804
Compare
9369d97 to
3473ede
Compare
8396a7d to
ebecbd0
Compare
3473ede to
3d7dfce
Compare
Wires up the per-kernel raiser CLI and the lit-harness scaffolding the
subsequent handler commits' fixtures consume:
* test-lit/comgr-sources/raise_cli.cpp — minimal --emit-ir driver
that calls `raiseToIR` directly and dumps the resulting Module to
stdout via `Module::print`. Subsequent commits add the default
fork mode (kerneldex coverage) and `--write-hsaco` mode (full
pipeline) once `hotswap/pipeline.h` lands.
* test-lit/CMakeLists.txt — gates a new `raise_cli` target on
COMGR_ENABLE_HOTSWAP_TRANSPILE; links `hotswap::transpiler` plus
`comgr-metadata.cpp` and the just-extracted `comgr-target-init.cpp`
directly so the binary doesn't pull in the rest of the amd_comgr
public surface.
* test-lit/lit.site.cfg.py.in — exposes the
COMGR_ENABLE_HOTSWAP_TRANSPILE configure-time value.
* test-lit/lit.cfg.py — adds `comgr-hotswap-transpile` REQUIRES
feature plus the `%llvm_mc`, `%ld_lld`, `%not`, and `%raise_cli`
substitutions every hotswap-raise/ RUN line uses.
* test-unit/CMakeLists.txt — `comgr_link_hotswap_transpiler` helper
grows to compile `comgr-target-init.cpp` into every unit-test
binary so `ensureLLVMInitialized` resolves at link time.
* src/hotswap/code_object_utils.{h,cpp} — adds the `readFile`
helper raise_cli and (later) the pipeline driver consume to slurp
HSACO / IR / asm artefacts off disk; matches the convention of
centralising file I/O in the metadata layer.
The raiser stays at its decode-and-bail / IR-scaffold form from the
preceding commits. With these in place the lit harness is reachable
but every hotswap-raise/ fixture FAILs honestly until the dispatch
loop lands at the `Wire raiser dispatcher` commit.
Co-Authored-By: Tim Gymnich <tim@gymni.ch>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3d7dfce to
e404635
Compare
ebecbd0 to
80be9b5
Compare
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.
Wires up the per-kernel raiser CLI and the lit-harness scaffolding the subsequent handler commits' fixtures consume:
raiseToIRdirectly and dumps the resulting Module to stdout viaModule::print. Subsequent commits add the default fork mode (kerneldex coverage) and--write-hsacomode (full pipeline) oncehotswap/pipeline.hlands.raise_clitarget on COMGR_ENABLE_HOTSWAP_TRANSPILE; linkshotswap::transpilerpluscomgr-metadata.cppand the just-extractedcomgr-target-init.cppdirectly so the binary doesn't pull in the rest of the amd_comgr public surface.comgr-hotswap-transpileREQUIRES feature plus the%llvm_mc,%ld_lld,%not, and%raise_clisubstitutions every hotswap-raise/ RUN line uses.comgr_link_hotswap_transpilerhelper grows to compilecomgr-target-init.cppinto every unit-test binary soensureLLVMInitializedresolves at link time.readFilehelper raise_cli and (later) the pipeline driver consume to slurp HSACO / IR / asm artefacts off disk; matches the convention of centralising file I/O in the metadata layer.The raiser stays at its decode-and-bail / IR-scaffold form from the preceding commits. With these in place the lit harness is reachable but every hotswap-raise/ fixture FAILs honestly until the dispatch loop lands at the
Wire raiser dispatchercommit.