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/04/20 07:57:34 UTC

[GitHub] [tvm] vicalloy opened a new issue #7886: error for dyn.strided_slice

vicalloy opened a new issue #7886:
URL: https://github.com/apache/tvm/issues/7886


   1. I get the follow error when run `relay.build`.
   ```
     Check failed: (pval != nullptr) is false: Cannot allocate memory symbolic tensor shape [?, ?]
   ```
   
   2. The follow code is used to build the model.
   ```python
   # model from openvino. https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/intel/face-detection-0200/description/face-detection-0200.md
   onnx_model = onnx.load('face-detection-0200.onnx')
   
   shape = [1,3,256,256]
   
   input_name = "image"
   shape_dict = {
           input_name: shape,
           }
   mod, params = relay.frontend.from_onnx(onnx_model, shape_dict, freeze_params=True)
   print(relay.transform.DynamicToStatic()(mod))
   with relay.build_config(opt_level=3):
       graph, lib, params = relay.build(mod, target, params=params)
   ```
   3. `dyn.strided_slice` output a dynamic shape.
   ```c
     %329 = (%328, meta[relay.Constant][134] /* ty=Tensor[(1), int64] */);
     %330 = concatenate(%329) /* ty=Tensor[(2), int64] */;
     %331 = dyn.strided_slice(%327, meta[relay.Constant][133] /* ty=Tensor[(2), int32] */, %330, meta[relay.Constant][135] /* ty=Tensor[(2), int32] */, begin=None, end=None, strides=None) /* ty=Tensor[(?, ?), int64] */;
     %332 = take(%331, meta[relay.Constant][136] /* ty=Tensor[(1), int64] */, axis=1) /* ty=Tensor[(?, 1), int64] */;
     %333 = squeeze(%332, axis=[1]) /* ty=Tensor[(?), int64] */;
     %334 = cast(%333, dtype="int64") /* ty=Tensor[(?), int64] */;
     %335 = cast(%334, dtype="int64") /* ty=Tensor[(?), int64] */;
     %336 = cast(%335, dtype="int64") /* ty=Tensor[(?), int64] */;
   ```


-- 
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] masahi commented on issue #7886: error for dyn.strided_slice

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


   Unfortunately this gotcha is common and not well documented. The error means you need to use VM compiler and runtime for this model. I'll talk to people to discuss doc improvement.


-- 
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] rijulg commented on issue #7886: error for dyn.strided_slice

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


   > Unfortunately this gotcha is common and not well documented. The error means you need to use VM compiler and runtime for this model. I'll talk to people to discuss doc improvement.
   
   @masahi are there any links to follow up on this, or references to reach a working solution for dynamic shapes?


-- 
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] abdulazizm commented on issue #7886: error for dyn.strided_slice

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


   @masahi Any documents or link related to usage of VM compiler would be great. Hope VM complier/runtime would also be used with VITIS AI flow


-- 
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] masahi closed issue #7886: error for dyn.strided_slice

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


   


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