Slim down CompiledModule, move out execution logic#4356
Merged
Conversation
eb0238d to
dad414a
Compare
lmondada
commented
Apr 21, 2026
Signed-off-by: Luca Mondada <luca@mondada.net>
dad414a to
489d691
Compare
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Renaud-K
approved these changes
Apr 22, 2026
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.
This is the second follow up after #4322 from our discussion last week.
This PR 'dumbs down' the
CompiledModuletype in the following senseJitArtifactkept track of the various named entrypoints according to some naming convention)CompiledModulemeansThe result is a pretty clean 'container' type that just knows how to store artifacts of different kinds. The only methods that still rely on some naming conventions are
getArgsCreatorandgetReturnOffset, which exist purely for convenience (can be removed if you wish).This logic (which is dependent on conventions), now lives outside of the type. The naming conventions and entrypoint resolution was fully moved to construction (in
runtime/internal/compiler/include/cudaq_internal/compiler/CompiledModuleHelper.h). The execution logic on the other hand was moved to the only placed it is currently used in (runtime/cudaq/platform/qpu.cpp). We might need to move this further as we unify kernel execution for C++ and Python, but wasn't sure where it would eventually land (and in what form).