-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I thought this was supposed to work?
function different_branch_returns(cond, a, b)
@trace if cond
a .= sin.(a)
nothing
else
b .= sin.(b)
nothing
end
return a, b
end
cond = true
a = rand(Float32, 2, 3)
b = rand(Float64, 2, 3)
cond_ra = ConcreteRNumber{Bool}(cond)
a_ra = Reactant.to_rarray(a)
b_ra = Reactant.to_rarray(b)
result = @jit(different_branch_returns(cond_ra, a_ra, b_ra))
result[1] == Float32[0.013805547 0.29430962 0.56496745; 0.0061956844 0.6581275 0.50409216]
result[2] == Float64[0.0 0.0 0.0; 0.0 0.0 0.0]
result[2]
is wrong. I will debug this further
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working