Allocation fail warnings with Metal backend
sleepyeye opened this issue · 2 comments
Hi!
During testing LuisaRender, the renderer printed memory allocation warnings
whenever I use Metal backend with the mega kernel setup.
The renderer does render the output image but I left the issue
since it may have some potential problems.
Regardless of setup (scenes or parameters,...), warnings are identical where it is
Failed to allocate 67108864 bytes from MetalHostBufferPool~
.
I'm currently using Macbook pro Apple M1 Max with MacOS 13.3.
Hi, @sleepyeye
The warnings are fine.
We use a memory pool for stage buffers to minimize the memory allocation and preparation overhead, when uploading data to or downloading data from the GPU. The pool has a default size of 64MB, and when the transfer size exceeds that, ad-hoc allocations occur and such warnings are reported.
In LuisaRender, this may occur when uploading large meshes/textures to the GPU, and when retrieving high-resolution renderings back to the CPU. But both should have little impact on the rendering performance. So, it's fine to just ignore it :-)
Thanks!