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 2020/11/17 08:18:22 UTC

[GitHub] [incubator-tvm] monklof edited a comment on pull request #6898: add ShapeFunc for tanh

monklof edited a comment on pull request #6898:
URL: https://github.com/apache/incubator-tvm/pull/6898#issuecomment-728764439


   > I have a question. What do you mean "input's shape's second dim is unknown"? TVM is able to compile the kernel even though the dim is a sym var.
   
   Hi, this is the case  when I import static LSTM model from tensorflow with batch dim set to `relay.Any`, TVM fails to create schedule for dense op even after I add ShapeFunc for tanh.
   
   Crash Stack:
   ![image](https://user-images.githubusercontent.com/2393551/99363552-da517b80-28ef-11eb-9991-abf0316ac75e.png)
   
   It fails because the data's second dim is inferred to `Any`, as `TypeRelation` doesn't support infer shape from the input's data, so my work around solution is extracting `in_dim` from const weight:
   ![image](https://user-images.githubusercontent.com/2393551/99363264-7d55c580-28ef-11eb-9401-96fa0bf2d224.png)
   ![image](https://user-images.githubusercontent.com/2393551/99364036-711e3800-28f0-11eb-90e5-eed2f6fdb24c.png)
   
   
   


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