Skip to content

Commit

Permalink
docs: to-do comment
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente committed Oct 17, 2024
1 parent 4ff0133 commit 5bfa9a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nx/lib/nx/defn/sharding_compiler/passes/graph_splitter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ defmodule Nx.Defn.ShardingCompiler.Passes.GraphSplitter do

argument_sources = Map.take(state.args, Map.keys(arg_remapping))

# TO-DO: collect shards for expr and arguments here and annotate them in the chain below
[{id, category, expr, argument_sources} | acc]
end
)
Expand Down Expand Up @@ -129,6 +130,9 @@ defmodule Nx.Defn.ShardingCompiler.Passes.GraphSplitter do
not (left_valid and right_valid)
end

# default to true so that we can optimize this gradually
defp must_split_expr?(_, _, _), do: true

defp split_expr(expr, args, category, {cache, state}) do
# We need to save this so that each previous stage
# isn't affected by following ones
Expand Down

0 comments on commit 5bfa9a1

Please sign in to comment.