-
Notifications
You must be signed in to change notification settings - Fork 203
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: exla rpath #1553
fix: exla rpath #1553
Conversation
exla/Makefile
Outdated
ifeq ($(MIX_BUILD_EMBEDDED), true) | ||
XLA_EXTENSION_LIB_RPATH = "xla_extension/lib" | ||
else | ||
XLA_EXTENSION_LIB_RPATH = "../xla_extension/lib" |
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.
small fix needed due to the addition of the version to the EXLA lib compile path
There's some weird interplay between how EXLA looks up the rpath if it's the main app or if it's a library. This probably doesn't solve the problem of dealing with a stale libexla.so, but the new env var, even in partial mode, will deal with rebuilding everything for a new version |
exla/mix.exs
Outdated
@@ -143,6 +143,9 @@ defmodule EXLA.MixProject do | |||
"0" -> | |||
:none | |||
|
|||
"false" -> |
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 would do this:
case System.get_env("EXLA_FORCE_REBUILD") do
value when value in [nil, "0", "false"] ->
:none
"partial" ->
:partial
value when value in ["true", "1"] ->
:full
other ->
...
end
A cond also works.
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 think the readability is either equal or worse in that alternative, given it's a small set of possible values
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.
With cond
readability should be just as good as today and it should be easier to scan through. Your call :)
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.
Agreed this would suit cond perfectly.
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.
There is an issue here in that the .so can be huge, back then it was 300MB, so duplicating that in disk can be too much.
Maybe we keep the .o versioned and not the final one. This should be enough for make to trigger a rebuild whenever the version changes. |
I'll keep libexla.so unversioned for simplicity then. |
Co-authored-by: José Valim <[email protected]>
Co-authored-by: José Valim <[email protected]>
Co-authored-by: José Valim <[email protected]>
No description provided.