haoyang9804 opened a new issue #7057:
URL: https://github.com/apache/tvm/issues/7057


   TVM fails when running the following code:
   ```python
   import tvm
   from tvm.relay.backend.interpreter import ConstructorValue
   from tvm.relay.prelude import Prelude
   from tvm.relay.testing import add_nat_definitions
   
   mod = tvm.IRModule()
   p = Prelude(mod)
   add_nat_definitions(p)
   z = p.z
   
   res = ConstructorValue(z, [])
   ```
   The error message is like
   ```
   ...
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
223, in __call__
       values, tcodes, num_args = _make_tvm_args(args, temp_args)
     File 
"/home/gakki/Desktop/shared/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
119, in _make_tvm_args
       values[i].v_handle = arg.handle
     File "/home/gakki/Desktop/shared/tvm/python/tvm/runtime/object.py", line 
62, in __getattr__
       return _ffi_node_api.NodeGetAttr(self, name)
   RecursionError: maximum recursion depth exceeded while calling a Python 
object
   ```
   From the message, it seems that TVM falls into a infinite recursion between 
calling `_ffi_node_api.NodeGetAttr` and `_make_tvm_args(args, temp_args)`.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to