tlopex commented on PR #20255: URL: https://github.com/apache/tvm/pull/20255#issuecomment-5532231077
The `None in current` guard bypasses this rewrite whenever any input dimension is symbolic, even if another statically known zero already proves that the input is always empty. For example, `torch.export` accepts an input with shape `(batch, 0, 4)` and `x.reshape(0, 4)`, producing an output with shape `(0, 4)`. Here `current` is `[None, 0, 4]`, so the helper returns `[0, 4]` unchanged. Relax then interprets the first zero as “copy batch”, yielding `(batch, 4)` or rejecting the reshape because the element counts do not match. Please allow the rewrite when the input contains a known zero even if its other dimensions are symbolic, and add a dynamic-batch regression test for this case. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
