)]}'
{
  "commit": "129ae96d48966bd6b0f2e7d7fd7674a72e06f59d",
  "tree": "45a47be5a031ee884fba2423fb2e2002c853e39e",
  "parents": [
    "2f4225dbb33132eb9d583e322ac51fac9f9eb2ef"
  ],
  "author": {
    "name": "Han-Chung Wang",
    "email": "hanchung@google.com",
    "time": "Thu Dec 01 06:29:31 2022 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Nov 30 22:29:31 2022 +0000"
  },
  "message": "Enable fusion for elementwise Linalg op + pack op (#11374)\n\nIt also updates the LinalgExtVectorization to use tile+fuse, so we can\r\ntile+fuse the generic ops.\r\n\r\nSome metric data w/ mobilebert fp32:\r\n\r\nThe number of dispatches:\r\n\r\n- Legacy mmt4d: 39\r\n- data tiling w/o fusion: 57\r\n- data tiling w/ pack fusion: 59\r\n\r\nIt\u0027s reasonable for having more different dispatches because some of\r\ndifferent set_encoding ops could be folded into same producer\r\ndispatches. E.g., we could have dispatch_A, LHS_encoding, RHS_encoding\r\nin the beginning. After more aggressive fusion, we could get `dispatch_A\r\n+ LHS_encoding` + `dispatch_A + RHS_encoding` + `LHS_encoding` +\r\n`RHS_encoding`. There would be 4 dispatches after fusion. We should use\r\nthe metric about the number of kernel launch.\r\n\r\nThe number of `flow.dispatch` launch:\r\n\r\n- Legacy mmt4d: 1980\r\n- data tiling w/o fusion: 2871\r\n- data tiling w/ pack fusion: 2750\r\n\r\nThe legacy mmt4d path has less kernel launches because\r\n\r\n1. Need unpack op fusion, which is WIP.\r\n2. Propagation helps better fusion.\r\n3. We don\u0027t have canonicalization patterns for packing on constant.\r\n\r\nI verified that (3.) can save 361 times of kernel launch, tracking in\r\nhttps://github.com/iree-org/iree/issues/11360\r\n\r\nRelands https://github.com/iree-org/iree/pull/11284 with fixes for\r\nmid-air collision.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "551ec1283aedcaaa7b34a73922f37eadac316994",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/test/BUILD",
      "new_id": "e35121cfc4405bd7adb50f793e1db064bce9feae",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/test/BUILD"
    },
    {
      "type": "modify",
      "old_id": "e89987353780dc49525e49b3ee669e2dcf10bbb9",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/test/CMakeLists.txt",
      "new_id": "348d33b754e8f32ecef2015d697dd8e99f3f0a42",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/test/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4b6bc5899a2511d739459e87f63fe8260aa9b3c4",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Codegen/LLVMCPU/test/data_tiling_pipeline.mlir"
    },
    {
      "type": "modify",
      "old_id": "bd3d50f9c43a958c40efc739a69cc4bb4a6d833d",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp",
      "new_id": "5798b676a4f4fdefb3ed9ab1f18a3b6632fe32be",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp"
    },
    {
      "type": "modify",
      "old_id": "d2f8db05926b10e73b7a393c8321e499990b0843",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_default.mlir",
      "new_id": "ff595a7242a862a1b47dd76a49653dd86cbdb4f4",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_default.mlir"
    },
    {
      "type": "modify",
      "old_id": "128337442cfab4b286df29dc20c7d3325ddb06b4",
      "old_mode": 33188,
      "old_path": "llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Transforms.cpp",
      "new_id": "725d2ad40f0ae4cdf68abe7d77e3e99fab6403f4",
      "new_mode": 33188,
      "new_path": "llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Transforms.cpp"
    }
  ]
}
