You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在 x = relay.var("x") 这一行加上了一个断点,启动python文件调试并在这个断点位置使用F11一层一层跟进去(希望最终能跟进到TVM代码)。
在进入到 tvm/python/tvm/_ffi/_ctypes/object.py 中的 ObjectBase.__init_handle_by_constructor__之后:
def__init_handle_by_constructor__(self, fconstructor, *args):
"""Initialize the handle by calling constructor function. Parameters ---------- fconstructor : Function Constructor function. args: list of objects The arguments to the constructor Note ---- We have a special calling convention to call constructor functions. So the return handle is directly set into the Node object instead of creating a new Node. """# assign handle first to avoid error raising# pylint: disable=not-callableself.handle=Nonehandle=__init_by_constructor__(fconstructor, args)
ifnotisinstance(handle, ObjectHandle):
handle=ObjectHandle(handle)
self.handle=handle
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
为了学习TVM,按官方例子tvm/relay 写了个 Relay例子 relay00_graph.py。
首先,TVM编译时已经使用 -DCMAKE_BUILD_TYPE=Debug,并且 config.cmake中 set(USE_RELAY_DEBUG ON)。
使用的调试环境是 vscode /remote SSH,launch.json内容为:
几行简单的python代码如下:
在 x = relay.var("x") 这一行加上了一个断点,启动python文件调试并在这个断点位置使用F11一层一层跟进去(希望最终能跟进到TVM代码)。
在进入到 tvm/python/tvm/_ffi/_ctypes/object.py 中的 ObjectBase.__init_handle_by_constructor__之后:
单步到 handle = init_by_constructor(fconstructor, args) 就直接退出了,终端以及调试控制台都没有任何异常消息输出。
请问该如何处理这个问题呢?
Beta Was this translation helpful? Give feedback.
All reactions