[mlir][linalg] Fix interchange initialization in fusion on tensors.

If no interchange vector is given initialize it with the identity permutation from 0 to number of loops.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D110249
This commit is contained in:
Tobias Gysi 2021-09-22 17:27:10 +00:00
parent 734f4d832c
commit e828655313
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ struct LinalgTileAndFuseTensorOps
tileSizes.begin(), tileSizes.begin() + rootOp.getNumLoops());
SmallVector<int64_t> rootInterchange =
tileInterchange.empty()
? llvm::to_vector<6>(llvm::seq<int64_t>(0, tileSizes.size()))
? llvm::to_vector<6>(llvm::seq<int64_t>(0, rootOp.getNumLoops()))
: SmallVector<int64_t>(tileInterchange.begin(),
tileInterchange.begin() +
rootOp.getNumLoops());