Skip to content

Slim down CompiledModule, move out execution logic#4356

Merged
lmondada merged 1 commit into
NVIDIA:mainfrom
lmondada:lm/reduce-artifacts
Apr 22, 2026
Merged

Slim down CompiledModule, move out execution logic#4356
lmondada merged 1 commit into
NVIDIA:mainfrom
lmondada:lm/reduce-artifacts

Conversation

@lmondada
Copy link
Copy Markdown
Collaborator

@lmondada lmondada commented Apr 21, 2026

This is the second follow up after #4322 from our discussion last week.

This PR 'dumbs down' the CompiledModule type in the following sense

  • it does not make any assumptions anymore on what the compilation artifacts contain (e.g. before JitArtifact kept track of the various named entrypoints according to some naming convention)
  • it does not know what 'executing' a CompiledModule means

The 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 getArgsCreator and getReturnOffset, 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).

@lmondada lmondada force-pushed the lm/reduce-artifacts branch 2 times, most recently from eb0238d to dad414a Compare April 21, 2026 09:24
Comment thread runtime/cudaq/platform/qpu.cpp
Signed-off-by: Luca Mondada <luca@mondada.net>
@lmondada lmondada force-pushed the lm/reduce-artifacts branch from dad414a to 489d691 Compare April 21, 2026 09:39
github-actions Bot pushed a commit that referenced this pull request Apr 21, 2026
@github-actions
Copy link
Copy Markdown

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@lmondada lmondada marked this pull request as ready for review April 21, 2026 14:04
@lmondada lmondada requested review from Renaud-K and boschmitt April 21, 2026 17:08
@lmondada lmondada added this pull request to the merge queue Apr 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@lmondada lmondada added this pull request to the merge queue Apr 22, 2026
Merged via the queue into NVIDIA:main with commit 0299a12 Apr 22, 2026
388 of 389 checks passed
@lmondada lmondada deleted the lm/reduce-artifacts branch April 22, 2026 07:25
github-actions Bot pushed a commit that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants