File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ cudaq::CompiledKernel::execute(const std::vector<void *> &rawArgs) const {
3434 return reinterpret_cast <KernelThunkResultType (*)(void *, bool )>(funcPtr)(
3535 buff, /* client_server=*/ false );
3636 }
37- if (jitRepr && jitRepr-> argsCreator ) {
37+ if (! isFullySpecialized () ) {
3838 void *buff = nullptr ;
3939 jitRepr->argsCreator (static_cast <const void *>(rawArgs.data ()), &buff);
4040 reinterpret_cast <KernelThunkResultType (*)(void *, bool )>(funcPtr)(
@@ -48,7 +48,7 @@ cudaq::CompiledKernel::execute(const std::vector<void *> &rawArgs) const {
4848}
4949
5050cudaq::KernelThunkResultType cudaq::CompiledKernel::execute () const {
51- if (jitRepr && jitRepr-> argsCreator )
51+ if (! isFullySpecialized () )
5252 throw std::runtime_error (
5353 " Kernel has unspecialized parameters; call execute(rawArgs) instead." );
5454 if (!resultInfo.hasResult ()) {
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ class CompiledKernel {
133133 const MlirRepr &getMlir () const ;
134134
135135 std::string name;
136- ResultInfo resultInfo;
136+ ResultInfo resultInfo; // TODO: we might want to store the entire kernel
137+ // signature here. Though I'm not sure what MLIR
138+ // agnostic information is worth storing.
137139 std::optional<JitRepr> jitRepr;
138140 std::optional<MlirRepr> mlirRepr;
139141};
You can’t perform that action at this time.
0 commit comments