llvmlite 0.46 breaks optimization #1725
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When running the artiq compiler with llvmlite==0.46 (instead of the 0.45 used in the current nix environment), the python process crashes with the exception below.
To reproduce run an arbitrary experiment with
artiq_run.If i change the size optimization level here to
size_level=0the code compiles without issue. The same goes for when changing the speed level to2(or commenting out the line).If one sets the speed level directly in line 111:
It directly complains:
Seems like transitioning to the NewPassManager is still ongoing in llvmlite...
This is not related to the new pass manager, but https://github.com/numba/llvmlite/issues/1306.
See also https://github.com/numba/llvmlite/pull/1321.
https://github.com/numba/llvmlite/pull/1321#issuecomment-3384040409
As upstream thinks that "adding backward compatibility for this might not be ideal" (?!), we'll have to work around this somehow. One way would be to explicitly check for the llvmlite version (or just switch then arguments when updating the dependency in the flake).
Perfect, I see you are already aware of the issue. Quite a bold move to deprecate within one minor version...
I would be in favor of checking the llvmlite version either explicitly or pinning the llvmlite version this would probably make the transitioning time smoother.
Yep – I understand that the Numba team may be primarily interested in maintaining llvmlite for Numba's sake, and they do not appear to use
size_level. Still, changing the API in a mutually incompatible way that leads to C++-side crashes rather than exceptions that could be caught is not ideal.As for me being aware of the issue, that is true, but I'm not actively working on the ARTIQ side of this right now – a PR would be very much appreciated! :) Generally, we don't seamlessly support multiple llvmlite versions (there tends to be breakage filtering through from the LLVM side, if nothing else), but if that's the only thing breaking 0.46 compatibility, it seems worth it to me.