You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/18 12:11:15 UTC
[GitHub] [tvm] xueshengke opened a new issue #10309: [Bug] dense.py in matmul tensor_b.shape mismatch after autoscheduler tuning in ARM CPU
xueshengke opened a new issue #10309:
URL: https://github.com/apache/tvm/issues/10309
```
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 81, in cfun
rv = local_pyfunc(*pyargs)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/relay/backend/te_compiler.py", line 311, in lower_call
best_impl, outputs = select_implementation(op, call.attrs, inputs, ret_type, target)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/relay/backend/te_compiler.py", line 189, in select_implementation
outs = best_plevel_impl.compute(attrs, inputs, out_type)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/relay/op/op.py", line 126, in compute
return _OpImplementationCompute(self, attrs, inputs, out_type)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
3: TVMFuncCall
2: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::relay::__mk_TVM6::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
1: tvm::relay::OpImplementation::Compute(tvm::Attrs const&, tvm::runtime::Array<tvm::te::Tensor, void> const&, tvm::Type const&)
0: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), TVMFuncCreateFromCFunc::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#2}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 81, in cfun
rv = local_pyfunc(*pyargs)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/relay/op/strategy/generic.py", line 833, in _compute_dense
return [topi_compute(*args)]
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/topi/nn/dense.py", line 184, in dense
return matmul(data, weight, bias, out_dtype, False, True, auto_scheduler_rewritten_layout)
File "/host/mlperf_environment_xsk/tvm/tvm_build_armv9/tvm/python/tvm/topi/nn/dense.py", line 81, in matmul
out_dim, red_dim = tensor_b.shape
ValueError: too many values to unpack (expected 2)
```
### Expected behavior
tensor_b.shape will be changed after tuning ?
### Actual behavior
out_dim, red_dim != tensor_b.shape
### Environment
Any environment details, such as: Operating System, TVM version, etc
Linux, Ubuntu: 21.04, TVM 0.9 dev, ARM CPU,
Model : mobilenet-v3.tflite
### Steps to reproduce
This error happens only in ARM CPU after autotuning, but disappears before autotuning.
--
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
[GitHub] [tvm] cgerum commented on issue #10309: [Bug] dense.py in matmul tensor_b.shape mismatch after autoscheduler tuning in ARM CPU
Posted by GitBox <gi...@apache.org>.
cgerum commented on issue #10309:
URL: https://github.com/apache/tvm/issues/10309#issuecomment-1056981200
This can be solved by changing: https://github.com/apache/tvm/blob/8f6fa8f2c41406cb54d01647ba8731e4ceb8f4ab/python/tvm/relay/op/strategy/arm_cpu.py#L466
to:
```python
wrap_compute_dense(topi.nn.dense, need_auto_scheduler_layout=True),
```
This seems to be missing in all implementations for arm_cpu.
--
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