aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <nicolas.vasilache@gmail.com>2021-12-30 12:41:18 +0000
committerNicolas Vasilache <nicolas.vasilache@gmail.com>2021-12-30 14:55:16 +0000
commit2e69f4f0126d49a1199703b23050ad71024fb52c (patch)
tree99e04c7398d265b901e0f7a0d939ab6fd990ac04 /llvm/unittests/Support/CommandLineTest.cpp
parent84b285d6eb9d52f467fa710f2c9f490a0584c0b2 (diff)
downloadllvm-2e69f4f0126d49a1199703b23050ad71024fb52c.zip
llvm-2e69f4f0126d49a1199703b23050ad71024fb52c.tar.gz
llvm-2e69f4f0126d49a1199703b23050ad71024fb52c.tar.bz2
[mlir][vector] Fix illegal vector.transfer + tensor.insert/extract_slice folding
vector.transfer operations do not have rank-reducing semantics. Bail on illegal rank-reduction: we need to check that the rank-reduced dims are exactly the leading dims. I.e. the following is illegal: ``` %0 = vector.transfer_write %v, %t[0,0], %cst : vector<2x4xf32>, tensor<2x4xf32> %1 = tensor.insert_slice %0 into %tt[0,0,0][2,1,4][1,1,1] : tensor<2x4xf32> into tensor<2x1x4xf32> ``` Cannot fold into: ``` %0 = vector.transfer_write %v, %t[0,0,0], %cst : vector<2x4xf32>, tensor<2x1x4xf32> ``` For this, check the trailing `vectorRank` dims of the insert_slice result tensor match the trailing dims of the inferred result tensor. Differential Revision: https://reviews.llvm.org/D116409
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions