Skip to content

Commit

Permalink
noinline sharded makearray
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Jul 23, 2022
1 parent a145a1b commit 0697596
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/build_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ function make_array(s::ShardedForm, closed_args, arr, similarto, cse)
per_task = ceil(Int, length(arr) / s.ncalls)
slices = collect(Iterators.partition(arr, per_task))
arrays = map(slices) do slice
Func(closed_args, [], _make_array(slice, similarto, cse)), closed_args
Func(closed_args, [],
quote
$(Expr(:meta, :noinline))
$(LiteralExpr(_make_array(slice, similarto, cse)))
end), closed_args
end
SpawnFetch{typeof(s)}(first.(arrays), last.(arrays), vcat)
end
Expand Down

0 comments on commit 0697596

Please sign in to comment.