Skip to content

Commit

Permalink
add tests for utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Portal committed Jan 21, 2024
1 parent fa7dc1f commit 80cd5fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ext_cuda/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ end
@testset "ctc" begin
include("ctc.jl")
end
@testset "utils" begin
include("utils.jl")
end

6 changes: 6 additions & 0 deletions test/ext_cuda/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
@test y isa Wrapped{<:CuArray}
end
end

@testset "rng_from_array" begin
x = cu(randn(2,2))
rng = Flux.rng_from_array(x)
@test rng == CUDA.default_rng()
end

0 comments on commit 80cd5fa

Please sign in to comment.