[mlir][linalg] Take artificial padding into account for pack/unpack folding. (#150272)

The revision only folds the tensor.pad/extract_slice op into
linalg.pack/unpack ops only when it is safe to fold. It is not valid to
have artificial padding.

The documentation improvement and verifier update will be done in a
separate PR (i.e., https://github.com/llvm/llvm-project/pull/149624).
The revision is a step towards it.

---------

Signed-off-by: hanhanW <hanhan0912@gmail.com>
GitOrigin-RevId: 1ff6d9daec66fb151b9691386c9dad0209648465
6 files changed
tree: c53cb78b9022ca5bb112d4c7640edd38a877291f
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.