Skip to content

Handle adjoint declarations gracefully#4715

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/apply-adjoint-declaration-diagnostic
Open

Handle adjoint declarations gracefully#4715
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/apply-adjoint-declaration-diagnostic

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Fixes #4268.

This adds an explicit diagnostic when apply-op-specialization is asked to create an adjoint variant for a declaration-only kernel. That avoids walking into an empty function body and crashing before the user gets a useful compiler error.

Validation:

  • git diff --check
  • Not run locally: cudaq-opt/llvm-lit are not available in this checkout and LLVM_INSTALL_PREFIX is unset.

@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

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.

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.

apply-op-specialization crashes instead of erroring when adjointing a forward-declared kernel

1 participant