tqchen commented on issue #5060: [uTVM][Runtime] Deprecate uTVM Standalone Runtime URL: https://github.com/apache/incubator-tvm/issues/5060#issuecomment-598802082 Cross posting to here. I think it worth to think about memory allocation strategy. Specificially, we should design an API that contains a simple allocator(which is arena like and allocate memory from a stack, and release everything once done), and use that allocator for all memories in the program(including data structures and tensors). This will completely eliminate the usage of system calls and allow the program o run in bare metal. ### Example API ```c // call use system call to get the memory, or directly points to memory segments in ucontroller UTVMAllocator* arena = UTVMCreateArena(10000); // Subsequent data structures are allocated from the allocator // The free calls will recycle data into the allocator // The simplest strategy is not to recycle at all UTVMSetAllocator(arena); // normal TVM API calls ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
