-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat: add config for compiler mode #1449
Conversation
polvalente
commented
Feb 20, 2024
- feat: add compiler mode config
- feat: add compiler_mode config
exla/lib/exla.ex
Outdated
@@ -71,6 +71,17 @@ defmodule EXLA do | |||
* `:highest` - Slowest but most accurate. Performs computations in float32 | |||
or float64 as applicable | |||
|
|||
* `:compiler_mode` - the mode to use for the compiler. It must be one of: |
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.
One space less indentation :)
@@ -581,7 +581,7 @@ defmodule EXLA.Defn do | |||
|
|||
inputs_and_shapes = Enum.reverse(reverse_inputs_and_shapes) | |||
|
|||
mode = options[:compiler_mode] || :xla | |||
mode = options[:compiler_mode] || Application.get_env(:exla, :compiler_mode, :mlir) |
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 having just the config attribute would be fine, but if streamlines a particular use case both are fine.
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.
It is temporary anyway, so both are fine. :)