grant-arm commented on pull request #8922:
URL: https://github.com/apache/tvm/pull/8922#issuecomment-949741138


   > @grant-arm
   > 
   > 1. Why you rewrite the functions "TVMPlatformMemoryAllocate" and 
"TVMPlatformMemoryFree" in tvm_runtime.h?
   > 2. How to determine the value of WORKSPACE_SIZE?
   
   @JKANG94
   1. We need to provide the platform implementation that uses the stack 
allocator. In your particular use-case, if malloc is permitted and desired, 
then you could use that instead.
   2. You can get the value for WORKSPACE_SIZE from metadata.json which is 
included in the Model Library Format file produced by ```tvmc```. Please see 
[Model Library 
Format](http://tvm.apache.org/docs/arch/model_library_format.html) for details 
. ```workspace_size_bytes``` for the ```main``` function is the "Number of 
bytes needed in this workspace by this function and all sub-functions invoked"
   
   Hope that helps.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to