Skip to content

Commit

Permalink
seed! calls CURAND only if CUDA.functional()
Browse files Browse the repository at this point in the history
  • Loading branch information
denizyuret committed Jul 28, 2020
1 parent fc47514 commit 2360429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cuarrays/knetarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ end

rand!(a::KnetArray)=(rand!(CuArray(a)); a)
randn!(a::KnetArray)=(randn!(CuArray(a)); a)
seed!(n::Integer)=(CURAND.seed!(n); Random.seed!(n))
seed!(n::Integer)=(CUDA.functional() && CURAND.seed!(n); Random.seed!(n))

0 comments on commit 2360429

Please sign in to comment.