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

[NVQC] New launch kernel is failing for NVQC #2146

Open
3 of 4 tasks
annagrin opened this issue Aug 26, 2024 · 2 comments
Open
3 of 4 tasks

[NVQC] New launch kernel is failing for NVQC #2146

annagrin opened this issue Aug 26, 2024 · 2 comments

Comments

@annagrin
Copy link
Collaborator

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

A code with state pointer argument (targettests/Remote-Sim/state_init.cpp) currently fails for NVQC with a message from old argument synthesis:

error: 'func.func' op synthesis: unsupported argument type for remote devices and simulators: state* 

Note that command line tells to execute the new argument synthesis:

nvq++ %cpp_std --enable-mlir --target remote-mqpu -fkernel-exec-kind=2 %s -o %t && %t | FileCheck %s

Steps to reproduce the bug

Run targettests/Remote-Sim/state_init.cpp for NVQC

Expected behavior

The test should execute successfully.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA Quantum version:
  • Python version:
  • C++ compiler:
  • Operating system:

Suggestions

No response

@annagrin annagrin changed the title [NVQC] New argument synthesis is not running yet for NVQC [NVQC] New launch kernel is failing for NVQC Aug 26, 2024
@annagrin
Copy link
Collaborator Author

Note: nvq++ --enable-mlir --target nvqc -fkernel-exec-kind=2 targettests/Remote-Sim/qvector_init_from_state.cpp -o tmp.x && ./tmp.x runs successfully on my machine, looks like the issue is that nvqc tests in CI skip the -fkernel-exec-kind=2 argument.

Note: This will get fixed automatically when the new argument synthesis becomes default.

For now all tests that pass cudaq::state* as a parameter should be disabled after #2224.

@schweitzpgi
Copy link
Collaborator

The default is 0 which supports return values (not just histograms over shots). I think that work had some bugs and some of #2216 tries to address those. Specifically, the hybrid mode (0) wasn't using argument synthesis but just falling back on the old quake synthesis path,

There is fallout from #2216 in that the tests execution/state_init_err_runtime.cpp and Remote-Sim/qvector_init_from_state.cpp fail. #2216 marks those as unsupported since I believe that supporting state* arguments with argument synthesis is still in the works.

Note that both 0 and 2 must work with new argument synthesis. Also that quake synthesis will not be a supported option with separate compilation of kernel libraries because of its structure.

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

No branches or pull requests

2 participants