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
{{ message }}
Repository navigation
DeviceBuffer::reserve()/upload() keep capacity without storage after a failed allocation #390
CudaMemoryAllocation(size_t bytes) (devices/rtx/device/utility/MemoryAllocation.cpp) sets m_bytes and then calls cudaMalloc without checking the result. When the allocation fails:
DeviceBuffer::bytes() reports the requested size, but ptr() is null.
The next reserve() / upload() for the same size or smaller sees enough capacity and skips allocating, so the buffer stays null and never recovers.
upload() goes on to cudaMemcpy into a null pointer.
The cudaErrorMemoryAllocation stays pending, so the next CUDA call that checks errors (often unrelated) reports it.
Affected callers on next_release
DeviceBuffer::reserve() / upload() in, among others:
frame/Frame.cu (accumulation, denoise and trim buffers)
Add a checked reserve that reports failures, and move these callers to it. On failure it resets the buffer, consumes the runtime error and returns a cudaError_t. Each caller can then fail its own object or frame with a message instead of continuing with a null pointer. PR #387 adds this pattern for the geometry preparation sites; this issue covers the code that predates it.
Activity