Skip to content

Commit

Permalink
[RUNTIME][CRT] init TVMPackedFunc's name (apache#6044)
Browse files Browse the repository at this point in the history
or else src/runtime/crt/graph_runtime/graph_runtime.c TVMGraphRuntime_Run
Line 639 will show messy code.

Signed-off-by: windclarion <[email protected]>
  • Loading branch information
windclarion authored and Trevor Morris committed Aug 26, 2020
1 parent 4e4c3a5 commit 4f1a6e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/crt/common/packed_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* \file src/runtime/crt/common/packed_func.c
* \brief PackedFunc implementation.
*/
#include <stdio.h>
#include <string.h>
#include <tvm/runtime/crt/internal/common/logging.h>
#include <tvm/runtime/crt/packed_func.h>
Expand Down Expand Up @@ -85,6 +86,7 @@ int TVMPackedFunc_InitGlobalFunc(TVMPackedFunc* pf, const char* name, const TVMA
return status;
}

snprintf(pf->name, sizeof(pf->name), "%s", name);
TVMPackedFunc_SetArgs(pf, args);
return status;
}
Expand All @@ -101,6 +103,7 @@ int TVMPackedFunc_InitModuleFunc(TVMPackedFunc* pf, TVMModuleHandle module, cons
return status;
}

snprintf(pf->name, sizeof(pf->name), "%s", name);
TVMPackedFunc_SetArgs(pf, args);
return status;
}
Expand Down

0 comments on commit 4f1a6e8

Please sign in to comment.