Cookiee235 opened a new issue, #17230:
URL: https://github.com/apache/tvm/issues/17230

   ### Actual behavior
   
   ```
   Traceback (most recent call last):
     File "test.py", line 22, in <module>
       mod = tvm.relax.transform.LegalizeOps()(mod)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/software/tvm-lunder/python/tvm/ir/transform.py", line 238, in 
__call__
       return _ffi_transform_api.RunPass(self, mod)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/software/tvm-lunder/python/tvm/_ffi/_ctypes/packed_func.py", line 
240, in __call__
       raise_last_ffi_error()
     File "/software/tvm-lunder/python/tvm/_ffi/base.py", line 481, in 
raise_last_ffi_error
       raise py_err
   tvm._ffi.base.TVMError: Traceback (most recent call last):
     1: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::IRModule
 (tvm::transform::Pass, 
tvm::IRModule)>::AssignTypedLambda<tvm::transform::{lambda(tvm::transform::Pass,
 tvm::IRModule)#7}>(tvm::transform::{lambda(tvm::transform::Pass, 
tvm::IRModule)#7}, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, 
tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, tvm::runtime::TVMRetValue)
     0: tvm::runtime::TVMMovableArgValueWithContext_::operator 
tvm::IRModule<tvm::IRModule>() const
     2: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::IRModule
 (tvm::transform::Pass, 
tvm::IRModule)>::AssignTypedLambda<tvm::transform::{lambda(tvm::transform::Pass,
 tvm::IRModule)#7}>(tvm::transform::{lambda(tvm::transform::Pass, 
tvm::IRModule)#7}, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, 
tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, tvm::runtime::TVMRetValue)
     1: tvm::runtime::TVMMovableArgValueWithContext_::operator 
tvm::IRModule<tvm::IRModule>() const
     0: tvm::IRModule tvm::runtime::TVMPODValue_::AsObjectRef<tvm::IRModule>() 
const
     File "/software/tvm-lunder/include/tvm/runtime/packed_func.h", line 785
   TVMError: In function transform.RunPass(0: transform.Pass, 1: IRModule) -> 
IRModule: error while converting argument 1: [21:44:09] 
/software/tvm-lunder/include/tvm/runtime/packed_func.h:2022: Check failed: 
(TObjectRef::_type_is_nullable) is false: Expect a not null value of IRModule
   ```
   
   
   
   ### Steps to reproduce
   
   ```
   import tvm
   from tvm import relax
   
   from tvm.script import ir as I
   from tvm.script import tir as T
   from tvm.script import relax as R
   
   @I.ir_module
   class Module:
       @R.function
       def main(v1_0: R.Tensor((1,), dtype="float16"), v6_0: R.Tensor((1, 40, 
25, 1), dtype="float16")) -> R.Tensor((), dtype="float16"):
           with R.dataflow():
               lv: R.Tensor((), dtype="float16") = R.sum(v6_0, axis=None, 
keepdims=False)
               R.output(lv)
           return lv
   
   
   mod = Module
   mod = tvm.relax.transform.DeadCodeElimination()(mod)
   mod = mod.show()
   mod = tvm.relax.transform.LegalizeOps()(mod)
   ```
   
   cc @Lunderberg @junrushao 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to