Users/ftynse/hotswap llvm error#2559
Draft
ftynse wants to merge 3 commits into
Draft
Conversation
Adds the AMDGPU code-object metadata extraction surface that the rest of
the raiser pipeline depends on:
* `extractTextSection`, `listKernelNames`, `extractKernelMeta`,
`findKernelSymbolOffset`, and `detectIsaFromElf` in
`hotswap/code_object_utils.{h,cpp}`.
* `KernelMeta` populated with both MsgPack-derived fields (kernarg/group/
private segment sizes, args) and the raw kernel-descriptor register
bytes (`compute_pgm_rsrc{1,2}`, `kernel_code_properties`,
`kernarg_preload`) read from `<name>.kd` in `.rodata`. Later layers
(`UserSgprLayout`, kernarg layout) consume these.
Reuses comgr's existing parsing infrastructure rather than duplicating
it: each helper wraps the input ELF bytes in an
`AMD_COMGR_DATA_KIND_EXECUTABLE` data object via a small
`ScopedDataObject` RAII helper and routes through
`metadata::getMetadataRoot` / `metadata::getElfIsaName` for the metadata
walk and ISA-name extraction. No new entry points are added to
`comgr-metadata.{h,cpp}`. Tests + raise_cli pick up `amd_comgr` on their
link line so the public C entry points
(`amd_comgr_create_data` / `set_data` / `release_data`) resolve.
Includes a small focused gtest covering empty-input and malformed-ELF
guards on the public hotswap API.
No MC stack, no disassembler, no opcode canonicalisation yet — those
land in subsequent commits.
Co-Authored-By: Tim Gymnich <tim@gymni.ch>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Use the established mechanism rather than blindly dumping error messages to the error stream and signaling error state through a variety of fields. Introduce an error subclass so we can tell the errors hotswap produced apart from external-origin errors. Signed-off-by: Alex Zinenko <git@ozinenko.com>
Use established LLVM mechanisms instead of handrolled classes. Signed-off-by: Alex Zinenko <git@ozinenko.com>
e20dd25 to
877df15
Compare
877df15 to
9428a8b
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.
No description provided.