[mlir][linalg][bufferize] Add analysis fuzzer option
authorMatthias Springer <springerm@google.com>
Wed, 27 Oct 2021 07:40:26 +0000 (16:40 +0900)
committerMatthias Springer <springerm@google.com>
Wed, 27 Oct 2021 08:37:56 +0000 (17:37 +0900)
commit5b98e4ed163b3712fc96a995717129256562f8df
tree2a5b9af7c2eff29b33b0bcef509daa255a4239cf
parent9fb52cb3f1235639a5a357fb5de18e1aeeb5b5f4
[mlir][linalg][bufferize] Add analysis fuzzer option

Analyze ops in a pseudo-random order to see if any assertions are triggered. Randomizing the order of analysis likely worsens the quality of the bufferization result (more out-of-place bufferizations). However, assertions should never fail, as that would indicate a problem with our implementation.

Differential Revision: https://reviews.llvm.org/D112581
mlir/include/mlir/Dialect/Linalg/Passes.td
mlir/include/mlir/Dialect/Linalg/Transforms/ComprehensiveBufferize.h
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
mlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir
mlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir