Skip to content

Commit

Permalink
[RUNTIME][CRT] init TVMPackedFunc's name
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 <windclarion@gmail.com>
  • Loading branch information
windclarion authored and Taikang Hu committed Jul 14, 2020
1 parent 27f00ef commit 052016c
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 052016c

Please sign in to comment.