)]}'
{
  "commit": "d7b3bb9b73f7faf5ddfd0d76d3eaa6500db47eb6",
  "tree": "b6963fb743482d332a7d4a3555fe863dc84cdd9d",
  "parents": [
    "4b24775e1496b89f76a9db7c95e0b8b35b9cb6ee"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "antiagainst@google.com",
    "time": "Fri May 14 09:50:48 2021 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 14 09:50:48 2021 -0400"
  },
  "message": "[spirv] Migrate ConvertToGPUPass\u0027 invocation tiling logic (#5814)\n\n`ConvertToGPUPass` is a sink for lowering away all Linalg ops\r\nin the SPIR-V pipeline: it can distribute a Linalg op to both\r\nglobal invocation IDs (if just having one-level distribution) or\r\nlocal invocation IDs (if having two-level distribution). \r\n\r\nThis is mostly historical; now we have more proper layering\r\nin the pipeline where we perform the first-level tiling and\r\ndistribution at flow level and the second/third level at\r\n`TileAndVectorizeInOneWorkgroupPass`, the functionality\r\nin `ConvertToGPUPass` is overlapping with that, although\r\nin a complementary way: the tiling in the former pass does\r\nnot handle the cases where we cannot do imperfect tiling;\r\nit requires perfectly tiled cases, as we are assuming number\r\nof processors equal to number of iterations to avoid generating\r\n`scf.for` loop from the start. `ConvertToGPUPass` is more\r\ngeneric and can handle all cases.  This is all opaque and\r\ncomplicated. \r\n\r\nThis commit relaxes the `TileAndVectorizeInOneWorkgroupPass`\r\nto not assume the number of processors equal to the number\r\nof iterations. Now we just tile and cyclically distribute using\r\n`scf.for` loops. This causes issues for perfectly tiled cases\r\nas we need to canonicalize the `affine.min` and one-trip\r\n`scf.for` away to expose static sizes for further vectorization.\r\nThat can be done by pulling in additional canonicalization\r\npatterns.\r\n\r\nAlso in order to utilize `TileAndVectorizeInOneWorkgroupPass`\r\nfor the second/third level tiling we need to have the corresponding\r\nscheme in launch configuration for them. This commit also\r\nadds the default second/third level tiling for all now supported\r\nLinalg ops: no tiling on subgroup and tiling to 1 for invocations.\r\nThis at the same time helps to clean up a bunch of unwieldy\r\ntemplated configurations for different ops..\r\n\r\nTogether, the above migrates the invocation tiling logic\r\nin `ConvertToGPUPass` to their proper places. This is the\r\nfirst step as reining in `ConvertToGPUPass` and launch\r\nconfigurations.\r\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ef56ea1966904f416e56d6782bcdc96d3e2bc848",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp",
      "new_id": "a28943ee35df8dd1446a66f110dc14f828d23fb4",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp"
    },
    {
      "type": "modify",
      "old_id": "53de3b42c5131c8d2c8667744ada05c80df11f5e",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/FoldGPUProcessorIDUses.cpp",
      "new_id": "c9aa605be93b69e1ce697a5ce4739d2ef3eace20",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/FoldGPUProcessorIDUses.cpp"
    },
    {
      "type": "modify",
      "old_id": "05a6b9e69916c519e4e724d4e0d2f4a374902cee",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/KernelDispatchUtils.cpp",
      "new_id": "23daa259f3b9b46c3ba8e94ef12b1ea20710478a",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/KernelDispatchUtils.cpp"
    },
    {
      "type": "modify",
      "old_id": "82e5fca0825ac464d06682b0c0f0882a3b0c59aa",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/Passes.h",
      "new_id": "96fdda2bae1d62cd8c115f154d304f317a201bc5",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/Passes.h"
    },
    {
      "type": "modify",
      "old_id": "10c023741ea04b4d15931274b1345b41576374d0",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/TileAndVectorizeInOneWorkgroupPass.cpp",
      "new_id": "c48de739159d32d2acccacbfdb4585dbf9190b8d",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/TileAndVectorizeInOneWorkgroupPass.cpp"
    },
    {
      "type": "modify",
      "old_id": "871dbbd32e514e8a9455bc4a0a9e12a1a30cf402",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/Utils.cpp",
      "new_id": "481d20d55bd75f45ae63f8b8492b90794111ad52",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/Utils.cpp"
    },
    {
      "type": "modify",
      "old_id": "fb46d679ddc235d1f2baa69602df5f7e0e399ed6",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/VectorToGPUPass.cpp",
      "new_id": "2ec44c40e69f73fd1462e8f8877e3eac53c705f4",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/VectorToGPUPass.cpp"
    },
    {
      "type": "modify",
      "old_id": "9d5f405d7c4359d2129a8332ebf9851f5b2ef388",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/test/BUILD",
      "new_id": "9fc763614ad84c91c1dfde6ad1c573875a912968",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/BUILD"
    },
    {
      "type": "modify",
      "old_id": "41b78b15b2f332b81081fd363271b761e61608e8",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/test/CMakeLists.txt",
      "new_id": "dedf5f1ec3be21faa7bedc1ba3156ed7d72b3114",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "edd7e9a0c4b14e0dfd37202a1307f02807a1fc54",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/test/convert_to_gpu.mlir",
      "new_id": "8ae6c06104abcbda6483ba963e9b44b1bd5cec9d",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/convert_to_gpu.mlir"
    },
    {
      "type": "modify",
      "old_id": "a6367c6d3148b836b4de547ca8674e757ec6d1ba",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/test/promote_workgroup_memory.mlir",
      "new_id": "8ffe4ec279fc51a099488bf494dfdb05ef00ef4f",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/promote_workgroup_memory.mlir"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "58bf934fc2864bef0e36db9cb361e2a7a1dd359e",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/tile_and_vectorize_in_one_workgroup.mlir"
    },
    {
      "type": "modify",
      "old_id": "b0e3c2b9512995447166439f8b24444974c2e111",
      "old_mode": 33188,
      "old_path": "iree/compiler/Conversion/LinalgToSPIRV/test/vectorize_elementwise_ops.mlir",
      "new_id": "451f4a3bcd3f4ff5899d10e3792ed5e98aad3955",
      "new_mode": 33188,
      "new_path": "iree/compiler/Conversion/LinalgToSPIRV/test/vectorize_elementwise_ops.mlir"
    }
  ]
}
