-
Notifications
You must be signed in to change notification settings - Fork 24
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
Evaluator: Can't evaluate QIR file #121
Comments
Hi @chemix-lunacy and thanks for your feedback! Regarding the encoding error when evaluating the Doing the test, I get the same This is a very low-level fatal error thrown by the core LLVM itself. Your file does not seem valid. Running
Which When assembling from And the encoding error disappears, yippee! 😄 Unfortunately, both I'll try to find some time to investigate further. In particular,
|
@LaurentAjdnik Thanks for looking into it! I'm using the same method that |
Hi again @chemix-lunacy! I think I got it! I did many tries until I simplified your ll file to the extreme:
But it still failed... On the other hand, replacing Looking into the code of the evaluator, it seems only a few functions are currently handled.
Well... It should rather return an error rather than crash... I'll file a separate issue... |
Thanks @LaurentAjdnik - We should update the readme and code docs saying what bitcode is supported. Right now the evaluator can JIT QIR produced by the pyqir-generator, but cannot use any external function calls. The pyqir-evaluator does not have a full runtime environment and thus does not have a definition for |
@chemix-lunacy I'm going to close this issue for now and use #122 to track a fix. |
Using
NonadaptiveEvaluator.eval
crashes the process when given a QIR .ll file and fails with an encoding exception when given a bitcode version of the same file. Nothing custom was done to generate the QIR (straight from the Q# compiler) or bitcode (just passed directly tollvm::WriteBitcodeToFile
). The code itself is very basic - just one of the many Q# examples floating around. pyqir was also installed from pip, not a local version.Bitcode issue is likely due to us using LLVM 13 which I believe is a different version than the one you're using, so may not be an issue per-say, but attaching it if you want to look at it further. There might be a way to strip version/encoding from the bitcode, but haven't spent too much time digging as-of yet.
Just mention if you need any additional info.
QIR and bitcode files.
Versions/System Info
py-evaluator: 0.4.0-alpha.1
OS: Windows 10 Pro, 21H1
Python: 3.8
Rust: 1.60
Q# SDK: 0.24.208024
The text was updated successfully, but these errors were encountered: