[mlir][Linalg] Fix crash when tileSizeComputationFunction is left unspecified

This commit is contained in:
Nicolas Vasilache 2021-02-10 22:30:46 +00:00
parent 5f7a4d8d05
commit 4643fd27c8
1 changed files with 3 additions and 0 deletions

View File

@ -472,6 +472,9 @@ Optional<TiledLinalgOp> static tileLinalgOpImpl(
b.setInsertionPoint(op);
ScopedContext scope(b, op.getLoc());
if (!options.tileSizeComputationFunction)
return llvm::None;
// Enforce the convention that "tiling by zero" skips tiling a particular
// dimension. This convention is significantly simpler to handle instead of
// adjusting affine maps to account for missing dimensions.