-
Notifications
You must be signed in to change notification settings - Fork 9
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 operand names conflicting with local variables in the generated functions #74
Conversation
CI has me confused.
|
The reason for the error is that the bindings in this PR have type definitions included in the different |
Ah yeah, I had to remove them by hand. The reason is that types declared in For example, check out the That What I did in the end is manually move all the type definitions to I would love to have it done automatically by |
IIUC, this shouldn't be handled in |
Awesome! Thanks @jumerckx |
Hmm, the last hurdle is the dialect wrappers for MLIR/LLVM 14. These keep failing with an error like in the OP. Skipping the failing dialect just uncovers the same problem with the subsequent dialects. |
Weird. I'm sure what's happening. I will try to run it in my computer tomorrow. |
Cool, thanks! I also shouldn't forget to run formatting before I merge 😅 |
mmm i had no problem generating the bindings. could it be that your env is dirty? |
That's curious. I'm pretty sure my env is clean. I built What version of Julia did you use? I used 1.10 but tried 1.7 as well.
|
mmm you shouldn't edit the I used Julia 1.10.4 |
For some reason that doesn't seem to happen on my machine. i.e., when I run
I don't get updated dialect wrappers, e.g. the I expect I'm still doing something wrong from my side. If you feel like getting this PR through without troubleshooting my setup feel free to push the generated code to this branch. |
Maybe you haven't updated the Anyway, I've just regenerated the bindings. |
@jumerckx can you check out if my generated bindings are okay? I don't see much difference... Maybe I'm the wrong one 😅 |
Yeah me neither :) |
src/Dialects/15/Affine.jl
Outdated
operands = Value[operand_0..., ] | ||
owned_regions = Region[region, ] | ||
function for_( | ||
operand_0::Vector{Value}; results::Vector{IR.Type}, region::Region, location=Location() |
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.
Here, for example, the results
argument isn't renamed anymore now.
Ok, I think I understand why MLIR14 is failing. The |
For LLVM/MLIR14, doing everything using Julia 1.9 just works. This pr should be good to go now! |
This reverts commit 752bdd9.
42c78a3
to
e622bf1
Compare
I added all local variables used in the generated functions to the
reservedKeyword
list. In due time a more robust solution could be implemented but this fixes quite a lot of cases already.Should PRs like these include the generated code as well? I've added it as separate commits.
I didn't change the API bindings script but the bindings have changed nevertheless, has it been a while since this has been updated or are the results machine-dependent?
The dialect binding generation threw an error for LLVM14, I ran it using
Julia 1.10.3
, not sure what's up.