mirror of https://github.com/llvm/torch-mlir
308c45e61a
Fix the case PrimListUnpackOp's result num is not equal to PrimList length. See the following example: ```python def forward(self, x): if len(x.shape) == 5: b0, t, c0, h0, w0 = x.shape b, c, h, w = torch.mul(b0, t), c0, h0, w0 else: b1, c1, h1, w1 = x.shape b, c, h, w = b1, c1, h1, w1 res = torch.reshape(x, [b, c, h, w]) return res ``` Without this fix, the following error message will occur: ``` /root/torch-mlir/externals/llvm-project/mlir/lib/IR/PatternMatch.cpp:118: virtual void mlir::RewriterBase::replaceOp(mlir::Operation *, mlir::ValueRange): Assertion `op->getNumResults() == newValues.size() && "incorrect # of replacement values"' failed. ``` |
||
---|---|---|
.. | ||
CAPI | ||
Conversion | ||
Dialect | ||
RefBackend | ||
CMakeLists.txt | ||
InitAll.cpp |