You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a bug in Memory::realloc_impl DynamicArray cannot grow/shrink if they point to GPU memory (either GPU_Malloc or GPU_Managed).
Grow/shrinking calls the Memory::realloc_impl function which checks whether the allocation contains CPU memory or GPU accessible memory.
In case of the latter cuda_memcpy_impl is called with cudaMemcpyDefault as cudaMemcpyKind.
if (is_gpu_type(oldAlloc.type)) {
ptr = malloc_impl(newSize, oldAlloc.name, oldAlloc.type);
if (ptr)
cuda_memcpy_impl(static_cast<uint8*>(ptr), static_cast<uint8*>(oldPtr), oldAlloc.size, cudaMemcpyDefault);
free_impl(oldPtr);
} else {
...
}
However, cuda_memcpy_impl does not support cudaMemcpyDefault and silently fails, causing the DynamicArray to contain junk values (whatever malloc returned):
Due to a bug in
Memory::realloc_impl
DynamicArray cannot grow/shrink if they point to GPU memory (eitherGPU_Malloc
orGPU_Managed
).Grow/shrinking calls the
Memory::realloc_impl
function which checks whether the allocation contains CPU memory or GPU accessible memory.In case of the latter
cuda_memcpy_impl
is called withcudaMemcpyDefault
ascudaMemcpyKind
.However,
cuda_memcpy_impl
does not supportcudaMemcpyDefault
and silently fails, causing theDynamicArray
to contain junk values (whatevermalloc
returned):This could be fixed by adding an extra
else if
statement tocuda_memcpy_impl
to handle thecudaMemcpyDefault
case.The text was updated successfully, but these errors were encountered: