You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "zhaoyang-star (via GitHub)" <gi...@apache.org> on 2023/03/31 02:05:37 UTC
[GitHub] [tvm] zhaoyang-star commented on issue #14437: [Bug] TVMError: CodeGenVM cannot handle this intrinsic now: Op(relax.nn.conv2d)
zhaoyang-star commented on issue #14437:
URL: https://github.com/apache/tvm/issues/14437#issuecomment-1491186311
> You need to run `Legalize()` pass before build.
Thanks for your quick reply @masahi
After add `relax.transform.LegalizeOps()(mod)` before `relax.build`. Another error happend:
```
...
File "/WORK/Dev/Study/tvm/python/tvm/relax/transform/legalize_ops/nn.py", line 152, in _nn_max_pool2d
return bb.call_te(
File "/WORK/Dev/Study/tvm/python/tvm/relax/block_builder.py", line 316, in call_te
tir_func, call_args, output_sinfo, tir_vars = gen_call_tir_inputs(func, *args, **kwargs)
File "/WORK/Dev/Study/tvm/python/tvm/relax/utils.py", line 443, in gen_call_tir_inputs
output_sinfo = [
File "/WORK/Dev/Study/tvm/python/tvm/relax/utils.py", line 444, in <listcomp>
TensorStructInfo(_shape_with_old_tir_var(out.shape, tir_var_inverse_map), out.dtype)
File "/WORK/Dev/Study/tvm/python/tvm/relax/utils.py", line 409, in _shape_with_old_tir_var
return ShapeExpr(
File "/WORK/Dev/Study/tvm/python/tvm/relax/expr.py", line 355, in __init__
self.__init_handle_by_constructor__(_ffi_api.ShapeExpr, values, span) # type: ignore
File "/WORK/Dev/Study/tvm/python/tvm/_ffi/_ctypes/object.py", line 145, in __init_handle_by_constructor__
handle = __init_by_constructor__(fconstructor, args)
File "/WORK/Dev/Study/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 260, in __init_handle_by_constructor__
raise get_last_ffi_error()
3: TVMFuncCall
2: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::relax::ShapeExpr (tvm::runtime::Array<tvm::PrimExpr, void>, tvm::Span)>::AssignTypedLambda<tvm::relax::{lambda(tvm::runtime::Array<tvm::PrimExpr, void>, tvm::Span)#11}>(tvm::relax::{lambda(tvm::runtime::Array<tvm::PrimExpr, void>, tvm::Span)#11}, 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::relax::ShapeExpr::ShapeExpr(tvm::runtime::Array<tvm::PrimExpr, void>, tvm::Span)
0: tvm::relax::ShapeExpr::ShapeExpr(tvm::runtime::Array<tvm::PrimExpr, void>, tvm::Span)::{lambda(tvm::PrimExpr)#1}::operator()(tvm::PrimExpr) const [clone .isra.0]
File "/WORK/Dev/Study/tvm/src/relax/ir/expr.cc", line 208
TVMError:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (value.dtype() == DataType::Int(64)) is false: the value in ShapeStructInfo can only have dtype of int64
```
It seems `max_pool2d` cannot accept symbolic dims as input info?
--
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-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org