Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
63937a01
Unverified
Commit
63937a01
authored
Mar 27, 2020
by
Samuel
Committed by
GitHub
Mar 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUNTIME]crt error handling (#5147)
* crt error handling * Review comments fixed
parent
35ee8f68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
src/runtime/crt/graph_runtime.c
+0
-0
src/runtime/crt/graph_runtime.h
+16
-6
No files found.
src/runtime/crt/graph_runtime.c
View file @
63937a01
This diff is collapsed.
Click to expand it.
src/runtime/crt/graph_runtime.h
View file @
63937a01
...
...
@@ -99,6 +99,7 @@ typedef struct TVMGraphRuntime {
/*!
* \brief Initialize the graph executor with graph and context.
* \param runtime The graph runtime.
* \param graph_json The execution graph.
* \param module The module containing the compiled functions for the host
* processor.
...
...
@@ -112,27 +113,34 @@ typedef struct TVMGraphRuntime {
/*!
* \brief Get the input index given the name of input.
* \param runtime The graph runtime.
* \param name The name of the input.
* \return The index of input.
*/
int
(
*
GetInputIndex
)(
struct
TVMGraphRuntime
*
runtime
,
const
char
*
name
);
/*!
* \brief set index-th input to the graph.
* \param index The input index.
* \brief set input to the graph based on name.
* \param runtime The graph runtime.
* \param name The name of the input.
* \param data_in The input data.
*/
void
(
*
SetInput
)(
struct
TVMGraphRuntime
*
runtime
,
const
char
*
name
,
DLTensor
*
data_in
);
/*!
* \brief Return NDArray for given output index.
* \param runtime The graph runtime.
* \param index The output index.
*
* \return
NDArray corresponding to given output node index
.
*
\param out The DLTensor corresponding to given output node index.
* \return
The result of this function execution
.
*/
int
(
*
GetOutput
)(
struct
TVMGraphRuntime
*
runtime
,
const
int32_t
index
,
DLTensor
*
out
);
/*!
* \brief Load parameters from parameter blob.
* \param runtime The graph runtime.
* \param param_blob A binary blob of parameter.
* \param param_size The parameter size.
* \return The result of this function execution.
*/
int
(
*
LoadParams
)(
struct
TVMGraphRuntime
*
runtime
,
const
char
*
param_blob
,
const
uint32_t
param_size
);
...
...
@@ -146,10 +154,13 @@ typedef struct TVMGraphRuntime {
/*!
* \brief Create an execution function given input.
* \param runtime The graph runtime.
* \param attrs The node attributes.
* \param args The arguments to the functor, including inputs and outputs.
* \param args_count The total number of arguments.
* \param num_inputs Number of inputs.
* \return The created executor.
* \param pf The created executor.
* \return The result of this function execution.
*/
int32_t
(
*
CreateTVMOp
)(
struct
TVMGraphRuntime
*
runtime
,
const
TVMOpParam
*
attrs
,
DLTensorPtr
*
args
,
const
uint32_t
args_count
,
...
...
@@ -159,7 +170,6 @@ typedef struct TVMGraphRuntime {
uint32_t
(
*
GetEntryId
)(
struct
TVMGraphRuntime
*
runtime
,
uint32_t
nid
,
uint32_t
index
);
// /*! \brief The graph nodes. */
/* GraphRuntimeNode nodes_[GRAPH_RUNTIME_MAX_NODES]; */
TVMGraphRuntimeNode
nodes
[
GRAPH_RUNTIME_MAX_NODES
];
uint32_t
nodes_count
;
/*! \brief The argument nodes. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment