diff --git a/lib/cudadrv/memory.jl b/lib/cudadrv/memory.jl index 8fd4950d6b..00a9604c10 100644 --- a/lib/cudadrv/memory.jl +++ b/lib/cudadrv/memory.jl @@ -59,7 +59,7 @@ GPU, and requires explicit calls to `unsafe_copyto!`, which wraps `cuMemcpy`, for access on the CPU. """ function alloc(::Type{DeviceMemory}, bytesize::Integer; - async::Bool=memory_pools_supported(device()), + async::Bool=false, stream::Union{Nothing,CuStream}=nothing, pool::Union{Nothing,CuMemoryPool}=nothing) bytesize == 0 && return DeviceMemory() diff --git a/src/array.jl b/src/array.jl index 3213a91652..b38895c062 100644 --- a/src/array.jl +++ b/src/array.jl @@ -838,14 +838,14 @@ function Base.resize!(A::CuVector{T}, n::Integer) where T # replace the data with a new one. this 'unshares' the array. # as a result, we can safely support resizing unowned buffers. new_data = context!(context(A)) do - mem = alloc(memory_type(A), bufsize) + mem = pool_alloc(memory_type(A), bufsize) ptr = convert(CuPtr{T}, mem) m = min(length(A), n) if m > 0 synchronize(A) unsafe_copyto!(ptr, pointer(A), m) end - DataRef(pool_free, Managed(mem)) + DataRef(pool_free, mem) end unsafe_free!(A)