Refactoring the lowerQuakeCode out of the QPU#3941
Conversation
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
1 similar comment
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
lmondada
left a comment
There was a problem hiding this comment.
This is a step in the right direction, happy to approve when tests pass. Thanks!
This is currently not used outside of BaseRemoteRESTQPU. I'm interested in your opinions for the next steps:
- Is your intention that over time other QPUs (or more generally, other execution paths) will use this same class?
- Do you think this is the right place to manage the
jitEngines, or will we move these out at some point? - Related to point 2, this
Compilerclass stores and returns the compiled results as string (inServerHelper'sKernelExecutionclass), but separately instantiates the jitEngines from the in-memory MLIR modules. If we want to separate the jit engines, we will have to come up with a replacement forKernelExecution(or roundtrip through string...)
|
_> This is a step in the right direction, happy to approve when tests pass. Thanks!
> 2. Do you think this is the right place to manage the > 3. Related to point 2, this |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Renaud Kauffmann <rkauffmann@nvidia.com>
Signed-off-by: Renaud Kauffmann <rkauffmann@nvidia.com>
Signed-off-by: Renaud Kauffmann <rkauffmann@nvidia.com>
Signed-off-by: Renaud Kauffmann <rkauffmann@nvidia.com>
Command Bot: Processing... |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
These changes introduce 2 new files in the
cudaq-mlir-runtimelibrary.Compiler.handCompiler.cpp.These files define a class
Compilerclass into whichlowerQuakeCodeand all its dependencies have been moved into fromBaseRemoteRESTQPU. For nowCompilerreflects the same interface asBaseRemoteRESTQPUto make the move as easy as possible and avoid errors.At this stage, the compiler is still instantiated in
BaseRemoteRESTQPUand essentiallybecomes
which clearly shows the data exchanges between QPUs and Compiler that may still have to be addressed.
Most header file dependencies with MLIR have been removed from
BaseRemoteRESTQPU.handCompiler.honly has forward declaration of MLIR objects.There is still some work to be done:
But I feel, this is a good starting point for the next steps.