Skip to content

Commit

Permalink
cuarray 1.4 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Nov 5, 2019
1 parent 596796e commit 84f5d9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"

[compat]
julia = "1.0.0"
AutoGrad = "1.1.6"
AutoGrad = "1.2.0"
CUDAapi = "1.2.0"
CUDAdrv = "3.0, 4.0"
CUDAnative = "2.4.0"
CuArrays = "1.2.1"
DataStructures = "0.17.3"
CUDAdrv = "4.0.1"
CUDAnative = "2.5.0"
CuArrays = "1.4.0"
DataStructures = "0.17.5"
FileIO = "1.0.7"
JLD2 = "0.1.3"
NNlib = "0.6.0"
Expand Down
6 changes: 1 addition & 5 deletions src/cuarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ end
# Testing the CuArrays allocator: set Knet.cuallocator()=true to use this
function KnetPtrCu(len::Int)
c = CuArray{UInt8}(undef, len)
if :buf in fieldnames(CuArray)
p = convert(Cptr, convert(Int, c.buf.ptr)) # ver <= 1.2.1
else
p = convert(Cptr, convert(Int, c.ptr)) # ver >= 1.3.0
end
p = convert(Cptr, convert(Int, c.ptr)) # ver >= 1.3.0
kp = KnetPtr(p, len, gpu(), c)
finalizer(freeKnetPtrCu, kp)
end
Expand Down

0 comments on commit 84f5d9c

Please sign in to comment.