Flux.jl/src/cuda/cuda.jl

22 lines
442 B
Julia
Raw Normal View History

2018-01-24 18:45:24 +00:00
module CUDA
2018-08-20 12:08:04 +00:00
using ..CuArrays
2018-01-24 18:45:24 +00:00
2018-11-14 15:53:26 +00:00
if !applicable(CuArray{UInt8}, undef, 1)
(T::Type{<:CuArray})(::UndefInitializer, sz...) = T(sz...)
end
2018-10-23 16:23:29 +00:00
if CuArrays.libcudnn != nothing
2018-11-14 16:48:57 +00:00
if isdefined(CuArrays, :libcudnn_handle)
handle() = CuArrays.libcudnn_handle[]
else
handle() = CuArrays.CUDNN.handle()
end
include("curnn.jl")
2018-11-20 03:56:48 +00:00
include("cudnn.jl")
2018-11-01 04:07:16 +00:00
else
2018-11-06 12:39:54 +00:00
@warn("CUDNN is not installed, some functionality will not be available.")
2018-06-20 13:16:42 +00:00
end
2018-01-24 18:45:24 +00:00
end