Skip to content

Commit

Permalink
Try #782:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] committed May 30, 2019
2 parents 8ee6af1 + 8c6ef20 commit 7fdff81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,11 @@ version = "0.5.3"

[[Tracker]]
deps = ["Adapt", "DiffRules", "ForwardDiff", "LinearAlgebra", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Requires", "SpecialFunctions", "Statistics", "Test"]
git-tree-sha1 = "0bec1b68c63a0e8a58d3944261cbf4cc9577c8a1"
git-tree-sha1 = "2e516162af7f1e208b62ef3da3af0d094a44aab1"
repo-rev = "9c2c05ec6d785996d83f7f59e3209461fcc36c01"
repo-url = "https://github.com/FluxML/Tracker.jl.git"
uuid = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
version = "0.2.0"
version = "0.2.2"

[[TranscodingStreams]]
deps = ["Random", "Test"]
Expand Down
7 changes: 7 additions & 0 deletions test/cuda/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ end
@test y[3,:] isa CuArray
end

@testset "Jacobian on GPU" begin
# https://github.com/FluxML/Tracker.jl/pull/33
@test collect(jacobian(identity, gpu([0.0, 0.0]))) == [1 0; 0 1]
@test collect(gradient(x -> sum(jacobian(y -> y .^ 2, x) .^ 2),
gpu([1.0, 2.0, 3.0]))) == [8.0, 16.0, 24.0]
end

if CuArrays.libcudnn != nothing
@info "Testing Flux/CUDNN"
include("cudnn.jl")
Expand Down

0 comments on commit 7fdff81

Please sign in to comment.