Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

schweitzpgi
Copy link
Collaborator

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..

@schweitzpgi schweitzpgi marked this pull request as draft September 18, 2024 15:26
…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.
@schweitzpgi schweitzpgi marked this pull request as ready for review September 18, 2024 16:35
tests that use deduction guides as C++ 20 (since C++ 17 doesn't have
guides).
Copy link

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

github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Copy link

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

github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Copy link
Collaborator

@1tnguyen 1tnguyen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@schweitzpgi schweitzpgi enabled auto-merge (squash) September 18, 2024 22:28
Copy link

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

github-actions bot pushed a commit that referenced this pull request Sep 19, 2024
Copy link

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

github-actions bot pushed a commit that referenced this pull request Sep 19, 2024
github-actions bot pushed a commit that referenced this pull request Sep 19, 2024
Copy link

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

1 similar comment
Copy link

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

github-actions bot pushed a commit that referenced this pull request Sep 19, 2024
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.

3 participants