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

Handling empty lists passed to Python kernels #1438

Merged
merged 6 commits into from
Mar 27, 2024

Conversation

amccaskey
Copy link
Collaborator

@amccaskey amccaskey commented Mar 25, 2024

Inject the kernel FuncOp when packing input runtime arguments into the opaque arg used by altLaunchKernel. This provides better handling of runtime argument types via the LLVM TypeSwitch utility.

Without this we should experience issues with regards to processing empty lists passed as runtime arguments. Currently we can only know that the argument is a list and infer the element type by checking the type of the list's first element, which does not exist if the list is empty. This PR brings the kernel argument signature to this processing step, and so we can check / process the args knowing the required argument type.

Copy link

copy-pr-bot bot commented Mar 25, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@amccaskey
Copy link
Collaborator Author

amccaskey commented Mar 25, 2024

/ok to test

Command Bot: Processing...

1 similar comment
@amccaskey
Copy link
Collaborator Author

amccaskey commented Mar 25, 2024

/ok to test

Command Bot: Processing...

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 Mar 25, 2024
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
@amccaskey
Copy link
Collaborator Author

amccaskey commented Mar 27, 2024

/ok to test

Command Bot: Processing...

@amccaskey amccaskey enabled auto-merge (squash) March 27, 2024 12:34
Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

👍

@amccaskey
Copy link
Collaborator Author

amccaskey commented Mar 27, 2024

/ok to test

Command Bot: Processing...

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 Mar 27, 2024
@amccaskey amccaskey merged commit d355064 into NVIDIA:main Mar 27, 2024
125 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Apr 17, 2024
@bettinaheim bettinaheim added this to the release 0.7.1 milestone Apr 17, 2024
@bettinaheim bettinaheim changed the title Improved type handling for OpaqueArguments::packArgs Handling empty lists passed to Python kernels Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix To be listed under Bug Fixes in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants