Open hannan72 opened 1 year ago
Hi @hannan72! As I told you in this issue, these warnings don't affect the performance of the model.
They mean that the conditions in the IF statements (for example attn_weights.size() != (bsz * self.num_heads, tgt_len, src_len)
in the first warning) won't be evaluated at runtime and are seen as constants. Which may lead to an error in case some of the parameters involved in these conditions change (for example bsz
(batch size) could take a different value).
If you want to remove them, you would need to either use scripting, which requires modifying the modeling file of Whisper, or generating an ONNX graph with the operator If. Both options require quite a lot of work for probably no speedup.
On the conversion of HuggingFace whisper model to onnx, I got such a Warning:
Is this hurts performance? And do you know how to resolve it?