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
Fix incorrect byval
and other attributes on LLVM 14
#950
Conversation
Some attributes now need type information. This preserves it.
Two high-level questions from my initial look:
|
For the first, I don't know how to do that given the way I can get the plumbing to work with pickle. If you have a design, I'm happy to hear it. For the second, until we have a true way to control LLVM backend version, we should only do that if we raise the minimum LLVM version. Are we prepared to do that in a patch release? |
Is it possible to integrate these pieces of IR from tests to some function and see if LLVM compiles it? |
That's what the current test does. |
OK, so just to double check, the way this works now: a) We have code to add the types to the Parameter Attributes The question I have, and I have no idea if this even needs to be asked: so it seems that we only check for The second question that I have is if we can ask anyone from the |
I think we should proactively test for all the parameter attributes. The test should be easy to write and we just need to send it through |
Added. |
I've tested our code against this branch, and would confirm that this fixes the issue |
Awesome, thank you for your feedback! @thomasfire would you like to be added to our RC-Testers group on our discourse: https://numba.discourse.group/ it's a group of folks who are interested in new Numba/llvmlite release candidates, perhaps this could be of interest to you? It would perhaps help with future llvmlite testing? |
Yes, you can add me, username is same as github's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a suggestion to make about using slightly more Pythonic syntax.
Co-authored-by: esc <esc@users.noreply.github.com>
You should have received an invite now. |
Since this also supports LLVM 11 -- I was wanting to build this PR and test against that. However, I am having trouble getting a development environment setup. Mostly I am troubled with conda environment conflicts. |
So I tried this locally, by applying the patches from this PR to the https://github.com/numba/llvmlite/tree/release0.40 branch. I then compiled this against an When running the tests, I receive:
|
I've added a commit that should make it work properly on LLVM 11. Some of the attributes being tested weren't supported on LLVM 11. |
Thank you, I can confirm that with the commit efb856a the llvmlite test suite passes with LLVM 11. |
So I tried running the Numba
|
That's exciting and I desperately hope not related to these changes. |
No, it wasn't, it was a side effect of not having pyyaml installed. |
I am now hitting:
Which I believe is known issue on Mac ARM64? |
It is this one here: numba/numba#8567 OK, I ran it again and it seems like the issue is transient, so I would say this did indeed pass a spot check, with LLVM 11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: can we compile?
'zeroext', | ||
) + supplemental: | ||
# If this parses, we emitted the right byval attribute format | ||
llvm.parse_assembly(gen_code(attr_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to try to compile this too? Or is the test-code not self-sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're applying attributes in ways that don't really make sense, so I'm guessing most of these would be ignored at best or cause compilation problems. We'd need to design a test case for each attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, that makes sense, thank you.
This is now going in, thank you for the patch! |
Fix incorrect `byval` and other attributes on LLVM 14
Some attributes now need type information. This preserves it.
Closes #946