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
0247b971
Unverified
Commit
0247b971
authored
Oct 04, 2018
by
Tianqi Chen
Committed by
GitHub
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUNTIME] Fix debug runtime i386 build (#1818)
parent
d713d63d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/runtime/graph/debug/graph_runtime_debug.cc
+9
-8
No files found.
src/runtime/graph/debug/graph_runtime_debug.cc
View file @
0247b971
...
@@ -19,10 +19,11 @@ namespace runtime {
...
@@ -19,10 +19,11 @@ namespace runtime {
*/
*/
class
GraphRuntimeDebug
:
public
GraphRuntime
{
class
GraphRuntimeDebug
:
public
GraphRuntime
{
public
:
public
:
/*!
/*!
* \brief Run each operation and get the output.
* \brief Run each operation and get the output.
* \param index The index of op which needs to be run.
* \param index The index of op which needs to be run.
*/
* \return the elapsed time.
*/
double
DebugRun
(
size_t
index
)
{
double
DebugRun
(
size_t
index
)
{
CHECK
(
index
<
op_execs
().
size
());
CHECK
(
index
<
op_execs
().
size
());
TVMContext
ctx
=
data_entry
()[
GetEntryId
(
index
,
0
)].
operator
->
()
->
ctx
;
TVMContext
ctx
=
data_entry
()[
GetEntryId
(
index
,
0
)].
operator
->
()
->
ctx
;
...
@@ -104,7 +105,7 @@ PackedFunc GraphRuntimeDebug::GetFunction(
...
@@ -104,7 +105,7 @@ PackedFunc GraphRuntimeDebug::GetFunction(
// return member functions during query.
// return member functions during query.
if
(
name
==
"debug_run"
)
{
if
(
name
==
"debug_run"
)
{
return
PackedFunc
([
sptr_to_self
,
this
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
return
PackedFunc
([
sptr_to_self
,
this
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
*
rv
=
this
->
DebugRun
(
args
[
0
]
);
*
rv
=
this
->
DebugRun
(
static_cast
<
size_t
>
(
args
[
0
].
operator
int64_t
())
);
});
});
}
else
if
(
name
==
"get_output_by_layer"
)
{
}
else
if
(
name
==
"get_output_by_layer"
)
{
return
PackedFunc
([
sptr_to_self
,
this
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
return
PackedFunc
([
sptr_to_self
,
this
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
...
@@ -129,9 +130,9 @@ PackedFunc GraphRuntimeDebug::GetFunction(
...
@@ -129,9 +130,9 @@ PackedFunc GraphRuntimeDebug::GetFunction(
* \param m Compiled module which will be loaded.
* \param m Compiled module which will be loaded.
* \param ctxs All devices contexts.
* \param ctxs All devices contexts.
*/
*/
Module
GraphRuntimeDebugCreate
(
const
std
::
string
&
sym_json
,
Module
GraphRuntimeDebugCreate
(
const
std
::
string
&
sym_json
,
const
tvm
::
runtime
::
Module
&
m
,
const
tvm
::
runtime
::
Module
&
m
,
const
std
::
vector
<
TVMContext
>&
ctxs
)
{
const
std
::
vector
<
TVMContext
>&
ctxs
)
{
std
::
shared_ptr
<
GraphRuntimeDebug
>
exec
=
std
::
make_shared
<
GraphRuntimeDebug
>
();
std
::
shared_ptr
<
GraphRuntimeDebug
>
exec
=
std
::
make_shared
<
GraphRuntimeDebug
>
();
exec
->
Init
(
sym_json
,
m
,
ctxs
);
exec
->
Init
(
sym_json
,
m
,
ctxs
);
return
Module
(
exec
);
return
Module
(
exec
);
...
...
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