)]}'
{
  "commit": "a9205c5c9d5aeadbb97ed7283a35515df4ba49da",
  "tree": "99f65fa6002a35eb7213f445c8cb2d48bc130400",
  "parents": [
    "2ec47e5e85f9c0e68eaeb7041bb9aa783bfb97d3"
  ],
  "author": {
    "name": "Spenser Bauman",
    "email": "sbauman@mathworks.com",
    "time": "Thu Jun 06 10:22:16 2024 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jun 06 10:22:16 2024 -0400"
  },
  "message": "[mlir][tensor] Implement constant folder for tensor.pad (#92691)\n\nExtend the folding ability of the RewriteAsConstant patterns to include\r\ntensor.pad operations on constants. The new pattern with constant fold\r\ntensor.pad operations which operate on tensor constants and have\r\nstatically resolvable padding sizes/values.\r\n\r\n    %init \u003d arith.constant dense\u003c[[6, 7], [8, 9]]\u003e : tensor\u003c2x2xi32\u003e\r\n    %pad_value \u003d arith.constant 0 : i32\r\n\r\n    %0 \u003d tensor.pad %init low[1, 1] high[1, 1] {\r\n      ^bb0(%arg1: index, %arg2: index):\r\n        tensor.yield %pad_value : i32\r\n    } : tensor\u003c2x2xi32\u003e to tensor\u003c4x4xi32\u003e\r\n\r\nbecomes\r\n\r\n    %cst \u003d arith.constant dense\u003c[[0, 0, 0, 0],\r\n                                 [0, 6, 7, 0],\r\n                                 [0, 8, 9, 0],\r\n                                 [0, 0, 0, 0]]\u003e : tensor\u003c4x4xi32\u003e\r\n\r\nCo-authored-by: Spenser Bauman \u003csabauma@fastmail\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fea5afa0b7bb39531c18764d3ef660d0819390f1",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
      "new_id": "81bab1b0c82f7a100dde29415d933846d0a340ee",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td"
    },
    {
      "type": "modify",
      "old_id": "7dabc266c023b7f74a2e3459df2b7797e17f4bc3",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Tensor/Transforms/Transforms.h",
      "new_id": "7f983b8b3cfd06a8efbabeab888c32af9ec5124c",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Tensor/Transforms/Transforms.h"
    },
    {
      "type": "modify",
      "old_id": "5c6a32ce9a68d60edd812c1395d9341db710b91d",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Tensor/TransformOps/TensorTransformOps.cpp",
      "new_id": "33016f84056e9b67027c592adc70578767977451",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Tensor/TransformOps/TensorTransformOps.cpp"
    },
    {
      "type": "modify",
      "old_id": "11e1de543ac91e782b6bc8ab1141aad5cbbdff1d",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Tensor/Transforms/RewriteAsConstant.cpp",
      "new_id": "7c9fced540adb9417795e503715243d94e2e84cd",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Tensor/Transforms/RewriteAsConstant.cpp"
    },
    {
      "type": "modify",
      "old_id": "4c960659d80cb7b779109d30492ae88eef1a1f22",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Utils/IndexingUtils.cpp",
      "new_id": "aba225be720c31c70d2b13e6a960b228eb0ebed3",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Utils/IndexingUtils.cpp"
    },
    {
      "type": "modify",
      "old_id": "1a1cf9e407d805d6b07d5de02adda024b3bb794a",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/Tensor/rewrite-as-constant.mlir",
      "new_id": "35ee6f1caf0d9ba24aad1d5c4a75434a6e4badb5",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/Tensor/rewrite-as-constant.mlir"
    }
  ]
}
