Include location information with the QIR verifier error message
@sacpis is already working on this.
Since Aug 8, 2025.
- Dominant language
- C++
- Stars
- 1.1k
- Forks
- 456
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 165
Description
A kernel such as this:
qpu void kernel(int var1, int var2) {
int local = 0; // this is fine
int a = var1;
int b = var2;
int c = std::min(a, b); // this is the offending line
return;
}
When used with a hardware platform as the target, will throw an error with the following message error - invalid instruction found in adaptive QIR profile: %0 = alloca i32, align 4. The likely cause is the stack allocation triggered by the std::min call.
However, it is not clear from the error message which line of the kernel caused the error. Would be very helpful to include the location information in the QIR error message to aid debugging.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.