Give the user the ability to allocate all memory himself
Hello! I noticed that each gemm call allocates memory on the heap for "packing buffers". So maybe there is a way to give the user the ability to pre-allocate all the necessary memory and simply pass it as an argument without using a global allocator?
For example, add helper function(s) to the public api to calculate the required memory for a particular type/shape/kernel, and then initialize aligned_alloc::Alloc struct from a pointer or something like that.
I think this feature can help use the crate in real-time programs where hidden allocations are not welcome
I would like to use it in realtime as well, so +1 on that :)
If anyone is interested, I created microgemm. It does not make allocations on its own. I'm trying to keep it very flexible and avoid unsafe
Custom allocators would help. Maybe allocator-api2
@cospectrum On microcontrollers I was using matrixmultiply already with this allocator: Buddy System Allocator. Do you think I can just use this allocator on desktop and then it is "real-time" safe, because it is taking the memory from the pre-allocated memory?