mehrdadh commented on a change in pull request #8487:
URL: https://github.com/apache/tvm/pull/8487#discussion_r672444156
##########
File path: src/runtime/crt/memory/stack_allocator.c
##########
@@ -79,8 +79,13 @@ tvm_crt_error_t StackMemoryManager_Free(tvm_workspace_t*
tvm_runtime_workspace,
tvm_crt_error_t StackMemoryManager_Init(tvm_workspace_t* tvm_runtime_workspace,
uint8_t* g_aot_memory, size_t
workspace_size) {
- tvm_runtime_workspace->next_alloc = g_aot_memory;
- tvm_runtime_workspace->workspace = g_aot_memory;
- tvm_runtime_workspace->workspace_size = workspace_size;
+ // Calculate g_aot_memory misalignment and offset
+ uint32_t extra = (uintptr_t)g_aot_memory % TVM_RUNTIME_ALLOC_ALIGNMENT_BYTES;
Review comment:
done.
--
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]