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 2021/01/11 04:47:29 UTC

[GitHub] [tvm] luyaor opened a new issue #7241: [Bug] [Relay] Error when compiling ONNX with LpPool

luyaor opened a new issue #7241:
URL: https://github.com/apache/tvm/issues/7241


   
   ## Description
   
   When compiling following model with TVM, it will error.
   
   The model(with ONNX as frontend) with error is as follows, check bug.onnx in [bug4.zip](https://github.com/apache/tvm/files/5794039/bug4.zip).
   ![image](https://user-images.githubusercontent.com/7541296/104147450-53111780-5409-11eb-9c96-d6cf8b10525c.png)
   
   I think it is because ONNX allows attribute `p` in **LpPool** with a default value 2. Please check LpPool in ONNX: https://github.com/onnx/onnx/blob/master/docs/Operators.md#lppool
   
   ## Error Log
   
   ```
   Traceback (most recent call last):
     File "check.py", line 11, in <module>
       mod, params = relay.frontend.from_onnx(onnx_model, {})
     File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2806, in from_onnx
       mod, params = g.from_onnx(graph, opset, freeze_params)
     File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2613, in from_onnx
       op = self._convert_operator(op_name, inputs, attr, opset)
     File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2721, in _convert_operator
       sym = convert_map[op_name](inputs, attrs, self._params)
     File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 712, in _impl_v1
       p = _expr.const(attr["p"], dtype)
   KeyError: 'p'
   ```
   
   ## How to reproduce
   
   ### Environment
   
   Python3, with tvm, onnx
   
   tvm version: [`c31e338`](https://github.com/apache/tvm/commit/c31e338d5f98a8e8c97286c5b93b20caee8be602) Wed Dec 9 14:52:58 2020 +0900
   
   1. Download 
   [bug4.zip](https://github.com/apache/tvm/files/5794039/bug4.zip)
   
   2. Run `python check.py`.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] luyaor closed issue #7241: [Bug] [Relay] Error when compiling ONNX with LpPool

Posted by GitBox <gi...@apache.org>.
luyaor closed issue #7241:
URL: https://github.com/apache/tvm/issues/7241


   


-- 
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] luyaor commented on issue #7241: [Bug] [Relay] Error when compiling ONNX with LpPool

Posted by GitBox <gi...@apache.org>.
luyaor commented on issue #7241:
URL: https://github.com/apache/tvm/issues/7241#issuecomment-757623608


   I also created a corresponding PR for this issue: https://github.com/apache/tvm/pull/7242


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] luyaor commented on issue #7241: [Bug] [Relay] Error when compiling ONNX with LpPool

Posted by GitBox <gi...@apache.org>.
luyaor commented on issue #7241:
URL: https://github.com/apache/tvm/issues/7241#issuecomment-912209870


   Closed with https://github.com/apache/tvm/pull/8866 


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