-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Separate compilation, supporting C++ host side function references. #2216
base: main
Are you sure you want to change the base?
Conversation
…nces. These changes add a new wrapper class to support interfacing between kernels. Kernels on the device side have their own names and calling conventions. Meanwhile, the C++ host code can capture references to these kernels. The C++ compiler assumes it can erase the functions completely and degenerate any reference to them as a pointer. Furthermore, it may inline or wrap this code in a thicket of template instantiations. But in order to be useful on the device side, the CUDA-Q runtime must be able to determine which kernel was wrapped in C++ code, lookup the device side code, and "link-time" optimize these calls, doing calling convention conversions, etc. Furthermore, what must be done is flavored by the execution environment.
argument synthesis instead of falling back on and failing with quake synthesis.
42c7ed2
to
8b13d0e
Compare
tests that use deduction guides as C++ 20 (since C++ 17 doesn't have guides).
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
synthesis, but it is still using the old quake synthesis compiler pass.
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
test utilities properly installed.
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
when the state handling using new argument synthesis is fully implemented.
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. |
These changes add a new wrapper class to support interfacing between kernels. Kernels on the device side have their own names and calling conventions. Meanwhile, the C++ host code can capture references to these kernels. The C++ compiler assumes it can erase the functions completely and degenerate any reference to them as a pointer. Furthermore, it may inline or wrap this code in a thicket of template instantiations. But in order to be useful on the device side, the CUDA-Q runtime must be able to determine which kernel was wrapped in C++ code, lookup the device side code, and "link-time" optimize these calls, doing calling convention conversions, etc. Furthermore, what must be done is flavored by the execution environment.
Update the call paths of hybridLaunchKernel so that we can use the new argument synthesis instead of falling back on and failing with quake synthesis A couple of init state tests are marked XFAIL as they don't seem to behave with the new argument synthesis..