Skip to content

Commit 3997b31

Browse files
authored
fix: bcast pjrt (#949)
* fix: bcast pjrt * chore: bump Reactant
1 parent 5316d89 commit 3997b31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Reactant"
22
uuid = "3c362404-f566-11ee-1572-e11a4b42c853"
33
authors = ["William Moses <[email protected]>", "Valentin Churavy <[email protected]>", "Sergio Sánchez Ramírez <[email protected]>", "Paul Berg <[email protected]>", "Avik Pal <[email protected]>", "Mosè Giordano <[email protected]>"]
4-
version = "0.2.44"
4+
version = "0.2.45"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/ConcreteRArray.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ end
341341

342342
# TODO replace this copy for `setindex!` maybe? how to copy data to already existing buffer? (i.e. `copyto!`)
343343
function Base.copy(bc::Base.Broadcast.Broadcasted{Broadcast.ArrayStyle{ConcretePJRTArray}})
344+
bc = Broadcast.flatten(bc)
344345
for x in bc.args
345346
x isa ConcretePJRTArray && wait(x)
346347
end
@@ -365,7 +366,6 @@ function Base.copy(bc::Base.Broadcast.Broadcasted{Broadcast.ArrayStyle{ConcreteP
365366
return ConcretePJRTArray(aux) # XXX: result should be on correct device?
366367
end
367368

368-
bc = Broadcast.flatten(bc)
369369
fn = compile(Broadcast.BroadcastFunction(bc.f), (bc.args...,))
370370
return fn(bc.args...)
371371
end

0 commit comments

Comments
 (0)