Open
Description
From
using ChainRules
using ChainRulesCore
using ChainRulesTestUtils
using LinearAlgebra
f = adjoint
T = Float64
n = 5
m = 3
A = randn(T, n, m)
Y = f(A)
Ȳ_mat = randn(T, m, n)
Ȳ_composite = Composite{typeof(Y)}(parent=collect(f(Ȳ_mat)))
test_rrule(f, A; output_tangent=Ȳ_mat) # works
test_rrule(f, A; output_tangent=Ȳ_composite) # breaks
test_rrule(f, A) # breaks