alanmacd commented on code in PR #13807:
URL: https://github.com/apache/tvm/pull/13807#discussion_r1088240986


##########
src/runtime/crt/aot_executor/aot_executor.c:
##########
@@ -203,17 +203,6 @@ int TVMAotExecutor_Init(TVMAotExecutor* executor, 
TVMModuleHandle module_handle,
     TVMNDArray_IncrementReference(array);
   }
 
-  for (i = 0; i < md->num_workspace_pools; ++i) {
-    LOG_DEBUG("pools allocate[%d]: %s\n", i, md->workspace_pools[i].name);
-
-    status = TVMNDArray_Empty(md->workspace_pools[i].num_shape, 
md->workspace_pools[i].shape,

Review Comment:
   @d-smirnov no, it doesn't make sense to allocate a workspace_pool, it will 
be in the generated C code similar to the const pool, there's an example below 
(I think I originally added the pool allocation and then you split it to 
workspace and const, but I don't think I should have added the pool allocation 
from the start)
   
   ```
   int32_t tvmgen_default_run(TVMValue* args, int* type_code, int num_args, 
TVMValue* out_value, int* out_type_code, void* resource_handle) {
   TVMValue tensors[4];
   tensors[0] = ((TVMValue*)args)[0];
   tensors[1] = ((TVMValue*)args)[1];
   DLTensor global_const_workspace_dltensor = {
   .data = &global_const_workspace
   };
   TVMValue global_const_workspace_tvm_value = {
   .v_handle = &global_const_workspace_dltensor
   };
   tensors[2] = global_const_workspace_tvm_value;
   DLTensor global_workspace_dltensor = {
   .data = &global_workspace
   };
   TVMValue global_workspace_tvm_value = {
   .v_handle = &global_workspace_dltensor
   };
   tensors[3] = global_workspace_tvm_value;
   return tvmgen_default___tvm_main__((void*)tensors, type_code, num_args, 
out_value, out_type_code, resource_handle);
   }
   ```



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