-
Notifications
You must be signed in to change notification settings - Fork 184
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
Conversation
42c7ed2
to
8b13d0e
Compare
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. |
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 👍
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. |
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. |
d2924da
to
11a69e8
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
3177732
to
0df0f68
Compare
…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. 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. Add another deduction guide test (when using cudaq::sample). Mark all tests that use deduction guides as C++ 20 (since C++ 17 doesn't have guides). Add a hacky workaround for python. Python needs to use the new argument synthesis, but it is still using the old quake synthesis compiler pass. Attempt to add split-file to installed stuff. [Doesn't work! Why not?] Add guards to tests since some phases of the CI don't have the necessary test utilities properly installed. Mark failing state tests as UNSUPPORTED for now. These should be fixed when the state handling using new argument synthesis is fully implemented. Fix bug when there are multiple callables.
0df0f68
to
6f936d2
Compare
synthesis to be used to get the expected error. Reenable qvector_init_from_state.cpp. Hopefully this one was a red herring chasing its own CI tail.
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. |
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..