Skip to content

Commit f545b99

Browse files
add an adjoint for CuArray construction
1 parent b6285eb commit f545b99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.0.2"
4+
version = "2.0.3"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/init.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ function __init__()
1616
vecs = vec.(VA.u)
1717
return CuArrays.CuArray(reshape(reduce(hcat,vecs),size(VA.u[1])...,length(VA.u)))
1818
end
19-
2019
Base.convert(::Type{<:CuArrays.CuArray},VA::AbstractVectorOfArray) = CuArrays.CuArray(VA)
20+
@adjoint CuArray(xs::AbstractVectorOfArray) = CuArray(xs), ȳ -> (ȳ,)
2121
end
2222

2323
@require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin

0 commit comments

Comments
 (0)