Skip to content

Add a the ability to trigger debugging in the interpreter without recompiling#2219

Merged
tqchen merged 15 commits intoapache:masterfrom
jroesch:interp-debug
Dec 25, 2018
Merged

Add a the ability to trigger debugging in the interpreter without recompiling#2219
tqchen merged 15 commits intoapache:masterfrom
jroesch:interp-debug

Conversation

@jroesch
Copy link
Copy Markdown
Member

@jroesch jroesch commented Dec 3, 2018

This PR adds an operator debug (i.e debug<T>(t) : T), which triggers the interpreter's debugger. The function is an identity function which pauses execution with the ability to inspect the current expression (the argument to debug) as well as the evaluation stack.

I will add a little more support for visualizing the execution and stepping through execution.

cc @ZihengJiang

@jroesch
Copy link
Copy Markdown
Member Author

jroesch commented Dec 18, 2018

This is ready for review @MarisaKirisame @joshpoll @tqchen

Comment thread python/tvm/relay/debug.py Outdated
Comment thread python/tvm/relay/debug.py Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
Comment thread src/relay/op/debug.cc Outdated
Comment thread src/relay/op/debug.cc Outdated
Comment thread src/relay/backend/interpreter.cc
Comment thread python/tvm/relay/backend/interpreter.py Outdated
Comment thread src/relay/backend/interpreter.cc
Comment thread tests/python/relay/test_debug.py Outdated
Comment thread src/relay/backend/interpreter.cc Outdated
@tqchen tqchen added the status: need update need update based on feedbacks label Dec 20, 2018
joshpoll and others added 8 commits December 20, 2018 17:06
Co-Authored-By: jroesch <roeschinc@gmail.com>
Co-Authored-By: jroesch <roeschinc@gmail.com>
Co-Authored-By: jroesch <roeschinc@gmail.com>
Co-Authored-By: jroesch <roeschinc@gmail.com>
Comment thread src/relay/op/debug.cc Outdated
.add_argument("program", "Tuple", "The program to execute before debugging.")
.set_support_level(1)
.add_type_rel("Debug", IdentityRel)
.set_attr<TOpPattern>("TOpPattern", kInjective)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mark this as opaque, so debug won't be fused with other ops.

@tqchen tqchen merged commit 00e6108 into apache:master Dec 25, 2018
@tqchen
Copy link
Copy Markdown
Member

tqchen commented Dec 25, 2018

Thanks, @jroesch @zhiics @joshpoll @MarisaKirisame , this is now merged

@tqchen tqchen added status: accepted and removed status: need update need update based on feedbacks labels Dec 25, 2018
FrozenGene pushed a commit to FrozenGene/tvm that referenced this pull request Dec 27, 2018
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
@jroesch jroesch deleted the interp-debug branch February 4, 2021 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants