You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/07/13 14:13:51 UTC

[GitHub] [incubator-tvm] windclarion opened a new pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

windclarion opened a new pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044


   or else src/runtime/crt/graph_runtime/graph_runtime.c TVMGraphRuntime_Run
   Line 639 will show messy character.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] liangfu commented on pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
liangfu commented on pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#issuecomment-659329743


   Thanks @windclarion for contributing. Thanks @tqchen for reviewing. This is now merged.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] liangfu commented on a change in pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
liangfu commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#discussion_r454051962



##########
File path: src/runtime/crt/common/packed_func.c
##########
@@ -85,6 +85,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const char* name, const TVMA
     return status;
   }
 
+  strncpy(pf->name, name, sizeof(pf->name));

Review comment:
       Please use `snprintf` instead, since `strncpy` is unsafe. see https://stackoverflow.com/questions/12275381/strncpy-vs-sprintf




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#issuecomment-657699865


   cc @liangfu @areusch 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] windclarion commented on a change in pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
windclarion commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#discussion_r454058824



##########
File path: src/runtime/crt/common/packed_func.c
##########
@@ -85,6 +85,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const char* name, const TVMA
     return status;
   }
 
+  strncpy(pf->name, name, sizeof(pf->name));

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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#issuecomment-658505245


   This is a known flaky error, please retrigger again


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] liangfu commented on a change in pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
liangfu commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#discussion_r454063901



##########
File path: src/runtime/crt/common/packed_func.c
##########
@@ -85,6 +86,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const char* name, const TVMA
     return status;
   }
 
+  snprintf(pf->name,  sizeof(pf->name), "%s", name);

Review comment:
       looks like the extra space has to be removed to pass clang-format.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] windclarion commented on pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
windclarion commented on pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#issuecomment-658075609


   just rebase to retrigger, I can't understand fail message


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] liangfu merged pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
liangfu merged pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] liangfu commented on a change in pull request #6044: [RUNTIME][CRT] init TVMPackedFunc's name

Posted by GitBox <gi...@apache.org>.
liangfu commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-tvm/pull/6044#discussion_r454063901



##########
File path: src/runtime/crt/common/packed_func.c
##########
@@ -85,6 +86,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const char* name, const TVMA
     return status;
   }
 
+  snprintf(pf->name,  sizeof(pf->name), "%s", name);

Review comment:
       looks like the extra space has to be removed to pass clang-format.
   ```diff
   -  snprintf(pf->name,  sizeof(pf->name), "%s", name);
   +  snprintf(pf->name, sizeof(pf->name), "%s", name);
   ```




----------------------------------------------------------------
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:
users@infra.apache.org