areusch commented on code in PR #10014:
URL: https://github.com/apache/tvm/pull/10014#discussion_r854651226


##########
src/runtime/crt/common/func_registry.c:
##########
@@ -60,14 +60,20 @@ int strcmp_cursor(const char** cursor, const char* name) {
   return return_value;
 }
 
+uint16_t* TVMFuncRegistry_GetNumFuncs(const TVMFuncRegistry* reg) { return 
(uint16_t*)reg->names; }

Review Comment:
   for this function, i think we need to impl like this to avoid alignment 
problems:
   ```suggestion
   uint16_t TVMFuncRegistry_GetNumFuncs(const TVMFuncRegistry* reg) { 
     uint16_t num_funcs;
     memcpy(&num_funcs, reg->names, sizeof(num_funcs));
     return num_funcs;
     }
   ```



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