Open jikechao opened 1 year ago
This is a bug about the LSTM layer. I'm not very familiar with the RNN network. For the LSTM model, why does batch_size !=1
lead to a crash in TVM?
@echuraev Could you give me some suggestions? Thank you in advance.
@jikechao I suppose that the problem is the same as in #14868. In LSTM we have the same logic here as for Simple RNN.
@echuraev Thanks for your explanation, I'm leaning to fix this bug.
@jikechao I quickly took a look at this issue, and it looks like that one of the possible solution might be in using reshape
instead of squeeze
implementation in LSTM layer. The same trick I did in this PR: https://github.com/apache/tvm/pull/16526
@jikechao I quickly took a look at this issue, and it looks like that one of the possible solution might be in using
reshape
instead ofsqueeze
implementation in LSTM layer. The same trick I did in this PR: #16526
@echuraev, Thank you! I submitted a PR to fix it. Could you help me review it?
For the LSTM below, when
batch_size != 1
(i.e., the size of first dimension input), compiling will lead to an unexpected crash and throwCheck failed: *axis_ptr == 1 (2 vs. 1) : cannot squeeze axis with dimension not equal to 1
Notice that, whenbatch_size ==1
, TVM can run well.Question:
For the LSTM model, why batch_size !=1 leads to a crash?
Compile successfully
Actual behavior
Steps to reproduce
Triage
cc @shingjan