Skip to content
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

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

polvalente
Copy link
Contributor

  • feat: add compiler mode config
  • feat: add compiler_mode config

@polvalente polvalente self-assigned this Feb 20, 2024
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:
Copy link
Member

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)
Copy link
Member

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.

Copy link
Collaborator

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. :)

@polvalente polvalente merged commit bead39c into main Feb 20, 2024
9 checks passed
@polvalente polvalente deleted the pv-feat/add-config-for-compiler-mode branch February 20, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants