)]}'
{
  "commit": "05ce39f3fba4b5cc6eee18a431f8f8e16fa9b5d2",
  "tree": "cd74cc88db74e82c9172a2b4742f3c08236dee96",
  "parents": [
    "67a05a45aec34d779bc7ff8968bd1c93133a037c"
  ],
  "author": {
    "name": "Han-Chung Wang",
    "email": "hanhan0912@gmail.com",
    "time": "Mon Dec 16 02:12:26 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Dec 16 10:12:26 2024 +0000"
  },
  "message": "[DT] Unify encoding materialization pass into a single pass. (#19454)\n\nThe revision creates a generic materialization pass and uses it for\r\nbackends that implement data-tiling. After months of development, we\r\nidentify that the needs of GPU is a superset of the needs of CPU. To be\r\nmore specific, it has the additional \"swizzle\" field in terms of layout.\r\nIt means that the GPU set_encoding/unset_encoding lowering patterns\r\ncover the needs of CPU path. The lowering of contraction ops is\r\ndifferent. CPU lowers it to mmt4d op, while GPU lowers it to multi_mma\r\nop. However, the lowering of contraction is implemented through\r\nattribute interface. Thus, we can have a generic pattern to lower\r\ncontraction ops.\r\n\r\nTo make the review process much easier, the revision is created by 5\r\ncommits.\r\n\r\n1. It directly creates the MaterializeEncoding pass and copy-paste the\r\nGPU patterns: SetEncodingOpLoweringConversion,\r\nUnSetEncodingOpLoweringConversion, and MaterializeContractionOp. In the\r\nfirst commit, it also updates the GPU tests to use the new pass.\r\n2. The GPU data-tiling does not support element-wise generic op lowering\r\natm. The second commit moves the pattern to shared pattern set and bail\r\nout when swizzle is present. This is an NFC for both pipelines.\r\n3. The third commit replaces the existing materialization pass with the\r\ngeneric pass, and deletes all the legacy passes.\r\n4. The four commit moves the lit tests from `Common/[CPU|GPU]/test` to\r\n`Common/test`.\r\n5. Now there are duplicate patterns for set_encoding, unset_encoding,\r\nand contraction ops lowering. The last commit deletes the legacy\r\npatterns, and move the patterns from MaterializeEncoding.cpp to where\r\nthe legacy patterns locate. Furthermore, it renames the file as\r\n`MaterializeEncodingPatterns.cpp`.\r\n\r\nThe revision retains the MaterializeEncodingIntoNop pass, and add a TODO\r\nitem. Because it is still used by MaterializeHomogeneousEncoding pass.\r\nIt can be deleted once we deprecate the early materialization path.\r\n\r\n---------\r\n\r\nSigned-off-by: hanhanW \u003chanhan0912@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e3513ba69d29735235fa168df752ae9037048255",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/BUILD.bazel",
      "new_id": "f95b0fa815513d036850214548c5e1e7000fd746",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "adec8aad7583f12d9cfd116c63f27291f93fa5ed",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt",
      "new_id": "af3c55725838c0482e42250ccc611de99dc2b401",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "f1053da29240163eed406b08925344aaaacec30f",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel",
      "new_id": "05fb9bed420360f804ee9a5c261a5520b9f1902b",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "75db95e4329196fbb8a66a339ef29f493a9d9ed9",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt",
      "new_id": "419c4b0878c9ac9fd80cd80790e353f1ee0bd5e1",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "8c73c5bca4a9ad8f0351c4b8038ec4bc5c531970",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/Passes.td",
      "new_id": "394de5414ea16d60f3faeaa0bb9b86675afa4090",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CPU/Passes.td"
    },
    {
      "type": "modify",
      "old_id": "b2d6b916f713417fcaa50759668d8b90dd4e65c8",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/BUILD.bazel",
      "new_id": "fe5caa3434e2b606abf27c555471d1e6d278ef7f",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "3dd9de7f98cc63c0d3ba59b57885809d9b93cfee",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/CMakeLists.txt",
      "new_id": "100058fea35a8139fe21444f75607fdf032a149e",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "da9aa8a417318540790e776305592fb5ae2928ef",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h",
      "new_id": "bf188b66cf54a72dedd865df409a50d5d7d1d42c",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h"
    },
    {
      "type": "modify",
      "old_id": "128ffa9fc46eb9cdfdcb7944a39dbb6aadcbe261",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel",
      "new_id": "66177778f6837a9afcb8f6b004c1f003d612f3c2",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "97d324042e2cf256e6f1c24ac96257758b506469",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt",
      "new_id": "2f065df2bb52f73e86cc2eff2989ad8ea544fe8b",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt"
    },
    {
      "type": "delete",
      "old_id": "32536085576bb3ace3a4861cb3cf5aa5510d4699",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/GPUMaterializeEncoding.cpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "2c25e02852f465acc2652328a3b53b61d95315ec",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/Passes.td",
      "new_id": "ff2b2b94f9b28ba22fec241770a51d8cebb529ca",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/GPU/Passes.td"
    },
    {
      "type": "modify",
      "old_id": "030e6f4de497db2d6541612d411e81caa89c6026",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/BUILD.bazel",
      "new_id": "2f3b092d56760f5fc71c1dcd05fd34b90bb06897",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "6d1f540f420ae324e478e4a7fb8f4ba687a42c97",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/CMakeLists.txt",
      "new_id": "50be391693cc028cf2af791c27511ed80d31ef5c",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/CMakeLists.txt"
    },
    {
      "type": "rename",
      "old_id": "d182649f64ac795fc01dfd1920ebc74000081647",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/CPUMaterializeEncodings.cpp",
      "new_id": "f1776b90f74e8a63201907ebf773aeaa2f3342e5",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/MaterializeEncoding.cpp",
      "score": 63
    },
    {
      "type": "modify",
      "old_id": "4de4b454478a567e39780fac1895203052a70c6d",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp",
      "new_id": "d93cb98014dee55a548ad1bc9d83b587eefd293b",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp"
    },
    {
      "type": "rename",
      "old_id": "087d91dccf41a21760ce5fa6880c66ad6c7c9a29",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoPackUnPack.cpp",
      "new_id": "cd3d27e5c7f95cfd2676f1053bb624dbe597e2b9",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingPatterns.cpp",
      "score": 84
    },
    {
      "type": "modify",
      "old_id": "5571aba9b1e45e0ae74be0720e65230928994c95",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/Passes.td",
      "new_id": "5cc0d555ec248ea026901c984a7899fec3ae3de1",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/Passes.td"
    },
    {
      "type": "modify",
      "old_id": "5de2e3d6b95e77dc3f72d0a45e7747ad68f01d54",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/test/BUILD.bazel",
      "new_id": "f0652d2c3636a332849883055071ccf66d6da4c6",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "4dc774caa54a4a4544b655284ed37bde72c770b2",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/test/CMakeLists.txt",
      "new_id": "2d707f68c3aaa21c115e69aca734a0514265c381",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/CMakeLists.txt"
    },
    {
      "type": "rename",
      "old_id": "bb0c61072bd35f12c071b7282bd504df2d4fcaed",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/gpu_materialize_encoding_gfx1100.mlir",
      "new_id": "645fd712442a7a115f3d7a5331466298ff315cdb",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/gpu_materialize_encoding_gfx1100.mlir",
      "score": 98
    },
    {
      "type": "rename",
      "old_id": "4fca563656593164980e4c678f4c0979ebd4a9e7",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/gpu_materialize_encoding_gfx908.mlir",
      "new_id": "a9fc2bc66f62b4db9d7998b772386858247d8818",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/gpu_materialize_encoding_gfx908.mlir",
      "score": 98
    },
    {
      "type": "rename",
      "old_id": "cc9cd9d30dbe6fe233bed681b536c7367700c23b",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/gpu_materialize_encoding_gfx90a.mlir",
      "new_id": "89fe357ba33b1ccae55e59987804f0c542659c31",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/gpu_materialize_encoding_gfx90a.mlir",
      "score": 99
    },
    {
      "type": "rename",
      "old_id": "3338de98ebbffa052017a4d39300f2feab79c8e1",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/GPU/test/gpu_materialize_encoding_gfx942.mlir",
      "new_id": "2544fc127f89140b3954cf103e1136d87adef05c",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/gpu_materialize_encoding_gfx942.mlir",
      "score": 99
    },
    {
      "type": "rename",
      "old_id": "553c134b9f7833bce20f493434251b554e60e277",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/llvmcpu_materialize_encoding.mlir",
      "new_id": "25b69a7e31e278c2f895bb329fa64dd50aafdbe7",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/llvmcpu_materialize_encoding.mlir",
      "score": 96
    },
    {
      "type": "rename",
      "old_id": "85dd416a815312622521ee74d2a172c0e03aa62b",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Common/CPU/test/vmvx_materialize_encoding.mlir",
      "new_id": "2f3b91ff7255eda21065e4b83cf4c4fad0150b83",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Common/test/vmvx_materialize_encoding.mlir",
      "score": 99
    },
    {
      "type": "modify",
      "old_id": "76b2745dbc453c809c80700b26518f9a5e2e318e",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp",
      "new_id": "1d2b66ee634e08bf002d9edf5ebaa7bc19dd6198",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp"
    },
    {
      "type": "modify",
      "old_id": "f17a353afcc20015ae9301dd7402f555747f8f30",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Utils/Utils.cpp",
      "new_id": "812bc9bc2f5ed047d397bf4ac59783e756794654",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Utils/Utils.cpp"
    },
    {
      "type": "modify",
      "old_id": "d8f96de9421308c02a21fe08a44356748a309a2c",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/Utils/Utils.h",
      "new_id": "ea3d06956a27d403d1e64e11311f8c91280f4f5d",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/Utils/Utils.h"
    },
    {
      "type": "modify",
      "old_id": "00c5c9f9637bc6d98b1b9485ad62a037824b9db5",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp",
      "new_id": "a196e3121894c72297bca560613b4301691cb6e8",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp"
    },
    {
      "type": "modify",
      "old_id": "d85310e8dfe4e02461c11f9dec081b98e15e2826",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel",
      "new_id": "50ff8a6fad2b689b50fa25387eb4eb55664de75d",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "9ca16eed433dc6b7bade1a597ba17fd66b664683",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt",
      "new_id": "6650602f8c9844d596f200fbf46f8aedc5383f33",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "adcc12977bad3feec6eeb895c487754c0061d596",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/MaterializeHomogeneousEncodings.cpp",
      "new_id": "f7aeb8225d0b841c742b24041f23ceb6f70072f3",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/MaterializeHomogeneousEncodings.cpp"
    }
  ]
}
