Skip to content

Rename CompiledKernel to CompiledModule#4322

Merged
lmondada merged 1 commit into
NVIDIA:mainfrom
lmondada:lm/rename-compiled-kernel
Apr 15, 2026
Merged

Rename CompiledKernel to CompiledModule#4322
lmondada merged 1 commit into
NVIDIA:mainfrom
lmondada:lm/rename-compiled-kernel

Conversation

@lmondada
Copy link
Copy Markdown
Collaborator

@lmondada lmondada commented Apr 14, 2026

This is a first follow-up from yesterday's conversation. It renames CompiledKernel to CompiledModule. This is to clarify the exact scope of this type:

A CompiledModule is the collection of artifacts produced by CUDAQ when compiling a Quake MLIR module.

This is slightly different from a "compiled kernel", as it may contain zero, one or multiple entrypoints, depending on what was in the module and how it is compiled.

I'm working separately on another PR that will make a clearer distinction between the CompiledModule and its artifacts (e.g. JitArtifact come with an entrypoint, whereas MlirArtifacts do not). It will also move the logic on how to "execute" CompiledModules out of the type itself.

@lmondada lmondada marked this pull request as ready for review April 14, 2026 16:50
github-actions Bot pushed a commit that referenced this pull request Apr 14, 2026
@github-actions
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Collaborator

@Renaud-K Renaud-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you.

@lmondada lmondada added this pull request to the merge queue Apr 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Apr 14, 2026
@lmondada lmondada force-pushed the lm/rename-compiled-kernel branch from c7ef0cf to e91881c Compare April 15, 2026 06:29
@lmondada lmondada enabled auto-merge April 15, 2026 06:30
Signed-off-by: Luca Mondada <luca@mondada.net>
@lmondada lmondada force-pushed the lm/rename-compiled-kernel branch from e91881c to 0b0b33a Compare April 15, 2026 06:57
@lmondada lmondada added this pull request to the merge queue Apr 15, 2026
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2026
@github-actions
Copy link
Copy Markdown

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

Merged via the queue into NVIDIA:main with commit d48ff77 Apr 15, 2026
209 checks passed
@lmondada lmondada deleted the lm/rename-compiled-kernel branch April 15, 2026 09:25
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2026
mitchdz pushed a commit to mitchdz/cuda-quantum that referenced this pull request Apr 15, 2026
This is a first follow-up from yesterday's conversation. It renames
`CompiledKernel` to `CompiledModule`. This is to clarify the exact scope
of this type:

> A `CompiledModule` is the collection of artifacts produced by CUDAQ
when compiling a Quake MLIR module.

This is slightly different from a "compiled kernel", as it may contain
zero, one or multiple entrypoints, depending on what was in the module
and how it is compiled.

I'm working separately on another PR that will make a clearer
distinction between the CompiledModule and its artifacts (e.g.
`JitArtifact` come with an entrypoint, whereas `MlirArtifact`s do not).
It will also move the logic on how to "execute" `CompiledModule`s out of
the type itself.

Signed-off-by: Luca Mondada <luca@mondada.net>
AsherBond pushed a commit to ElasticProvisioner/cuda-quantum that referenced this pull request Apr 22, 2026
This is the second follow up after NVIDIA#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).

Signed-off-by: Luca Mondada <luca@mondada.net>
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