New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic allocations cannot be freed #38
Comments
As I mentioned on Slack, this is kinda expected. We don't have a device-side GC, so you'll be quickly running out of memory when doing allocations in the hot path (i.e. using a Ref). This is exacerbated by a CUDA bug, where it's not possible to free the device-side heap from the host. We'll need to reimplement malloc to fix that, so making the issue about that. |
Hi, I think I'm hitting this bug -- I'm getting that error -- but I'm not sure. This is happening in a code that used to work 4 months ago. |
Check |
I must say that I'm having this bug indeed, and it is related to the usage of an using CUDA
using StaticArrays
function kernel(a)
i = (blockIdx().x - 1) * blockDim().x + threadIdx().x
STACKSIZE = 15
stack = ones(MVector{15, UInt32})
for (j,x) in enumerate(stack)
a[i] += stack[j]
end
return
end
a = CuArray(ones(UInt32, 1024))
for i in 1:1000
@cuda blocks=(16,1) threads=(64,1) kernel(a)
CUDA.synchronize()
end with this exact package versions:
ant it works with 1.6.2 but errors with version 1.7.0-beta3.0 ... |
Looks like a regression in Julia:
See the |
Hi,
I am getting a dynamic memory crash when using Ref and custom structs.
This is occuring across multiple calls to the same kernel, which looks like the memory being allocated is not being deallocated when the kernel returns. Even when using garbage collection.
I am running a mobile NVidia 2060 6GB, if that helps.
I have put together a minimal example here:
which results many pages of
From my limited testing, this crash only happens with my Point type, if we dont use the reference object with it, it is fine?
The text was updated successfully, but these errors were encountered: