You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jikechao (via GitHub)" <gi...@apache.org> on 2024/01/10 12:44:22 UTC
[I] [Bug] [Relay][ONNX] Scaler rather than Scale: a bug in Scale(OnnxOpConverter) [tvm]
jikechao opened a new issue, #16381:
URL: https://github.com/apache/tvm/issues/16381
### Expected behavior
The **Scaler** operator has been supported in the TVM ONNX frontend, however, the map has the wrong key name **Scale**. I can not find the operator **Scale** in the ONNX [official documentation](https://onnx.ai/onnx/operators/). Thus, I thought the Scale is a typo of Scaler.
https://github.com/apache/tvm/blob/a1a1a7ca033f83315d02411d4b2c475ddacc795e/python/tvm/relay/frontend/onnx.py#L6531
### Actual behavior
```
Traceback (most recent call last):
File "bug_scaler.py", line 7, in <module>
irmod, params = relay.frontend.from_onnx(model, {'input': (1, 2, 3, 4)}, freeze_params=True)
File "/home/shenqingchao/software/tvm/python/tvm/relay/frontend/onnx.py", line 7225, in from_onnx
mod, params = g.from_onnx(graph, opset)
File "/home/shenqingchao/software/tvm/python/tvm/relay/frontend/onnx.py", line 6843, in from_onnx
self._check_for_unsupported_ops(graph)
File "/home/shenqingchao/software/tvm/python/tvm/relay/frontend/onnx.py", line 6936, in _check_for_unsupported_ops
raise tvm.error.OpNotImplemented(msg)
tvm.error.OpNotImplemented: The following operators are not supported for frontend ONNX: Scaler
```
### Steps to reproduce
step 1. Download the ONNX model [here](https://github.com/jikechao/onnx_models/blob/main/scaler_model.onnx)
```
import tvm
from tvm import relay
model = onnx.load("scaler_model.onnx")
irmod, params = relay.frontend.from_onnx(model, {'input': (1, 2, 3, 4)}, freeze_params=True)
```
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Relay][ONNX] Scaler rather than Scale: a bug about Scaler in the onnx frontend [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #16381: [Bug] [Relay][ONNX] Scaler rather than Scale: a bug about Scaler in the onnx frontend
URL: https://github.com/apache/tvm/issues/16381
--
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
Re: [I] [Bug] [Relay][ONNX] Scaler rather than Scale: a bug about Scaler in the onnx frontend [tvm]
Posted by "jikechao (via GitHub)" <gi...@apache.org>.
jikechao commented on issue #16381:
URL: https://github.com/apache/tvm/issues/16381#issuecomment-1884880973
If the Scale is a typo, the conversion function has another bug. The type of attribute `scale` in Operator **Scaler** is a list, while TVM considers it as a float. The conversion will crash under the given ONNX model above.
First of all, I need to confirm if the **Scale** is a typo. If so, I can provide patches to fix these bugs.
--
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