[mlir][Linalg] Add a useLinalgCopy option to Linalg bufferization.
authorNicolas Vasilache <ntv@google.com>
Wed, 19 Jan 2022 17:49:06 +0000 (12:49 -0500)
committerNicolas Vasilache <ntv@google.com>
Wed, 19 Jan 2022 18:00:11 +0000 (13:00 -0500)
commitd492a7b2cac3e89597e87091f7e1101b70829dee
treea204c76c0d014cd06ebfd818607704334c131045
parentbaa9b7c3c83ab6e4dfb15b8d7815a9958d5b5810
[mlir][Linalg] Add a useLinalgCopy option to Linalg bufferization.

Benchmarks show that memref::CopyOp is curently up to 200x slower than
tiled and vectorized versions of linalg::Copy.
Add a temporary flag to allow comprehensive bufferize to generate a
linalg::GenericOp that implements a copy until this performance bug is
resolved.

Differential Revision: https://reviews.llvm.org/D117696
mlir/include/mlir/Dialect/Linalg/Passes.h
mlir/include/mlir/Dialect/Linalg/Passes.td
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp