)]}'
{
  "commit": "2b9e47749ca1eb337ea26b8084dad52732dc7186",
  "tree": "94c9b584e882d9663506d9f6810cb70aaf7c4ca3",
  "parents": [
    "51ef9302a6f79bbacb9cf49c52c2990d845eb57c"
  ],
  "author": {
    "name": "Jianhui Li",
    "email": "jian.hui.li@intel.com",
    "time": "Wed Dec 17 12:04:58 2025 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Dec 17 12:04:58 2025 -0800"
  },
  "message": "[MLIR][XeGPU] Refactor Layout access interface  (#172125)\n\nThis PR builds on the anchor layout mechanism introduced in\nhttps://github.com/llvm/llvm-project/pull/169267 and performs the\nfollowing refactoring:\n\n1. Introduce getAnchorLayout() and setAnchorLayout() interface for\nanchor ops to get and set layout attributes.\n\n2. Add getLocalLayout() and setLocalLayout() utility functions, and\nrefactor workgroup/subgroup distribution patterns to use these APIs.\nThese utilities access the layout information directly and locally,\nwithout relying on global propagation.\n\n3. Introduce localPropagateLayoutsFromAnchor(), a utility used by\nsubgroup distribution to unify non-anchor layout setup.\nThis function is intended to be invoked upfront by all layout-based\npasses (including workgroup/subgroup distribution and unrolling) to\npropagate layouts from anchor ops to non-anchor ops.\nAfter this step, patterns within the pass should exclusively use\ngetLocalLayout() / setLocalLayout().\n\n4. Refactor getDistributeLayoutAttr() and setDistributeLayoutAttr() to\nremove special-case handling. These APIs now operate in a uniform order:\nanchor ops first, then non-anchor ops, and finally block arguments.\nThese APIs will be deprecated on long run. \n\n5. Refactor patterns in wg/sg distribution, load optimization passes to\nuse get/setAnchorLayout() and get/setLocalLayout().\n\n6. Update test cases to enforce that anchor ops must use—and only\nuse—anchor layouts.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "efca3cfa0dab7e7e0453ff5e8bae032f602f5a43",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/XeGPU/IR/CMakeLists.txt",
      "new_id": "b10219f71b531487209e657894ce5281cb3b51e7",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/XeGPU/IR/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "0c059967bb898cf6314c239c1419f1f3937bb321",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPU.h",
      "new_id": "7badfaf4a8216dfcc247dbb518d43043c299cf69",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPU.h"
    },
    {
      "type": "modify",
      "old_id": "eae0bd4e68a8409fceac002ef1085e58eef0323e",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td",
      "new_id": "446f64fffa468cb4e8b61e2e11e3cb3ea508b5bf",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td"
    },
    {
      "type": "modify",
      "old_id": "b54d620c3c0c372967433fd82a6e62429685070e",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td",
      "new_id": "92ac8870b70682a10f058df2d215f2d3f270c4c0",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td"
    },
    {
      "type": "modify",
      "old_id": "58092c3bb9ed276fde9997ef8dc41da74546e380",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/XeGPU/Utils/XeGPUUtils.h",
      "new_id": "46d52516cbc157e978f7469264cadc8316906e3f",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"
    },
    {
      "type": "modify",
      "old_id": "1a19ab5fd970b628f89f4562fe2fd1c8085507bf",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp",
      "new_id": "ccf17da26c942e2fd9dbfa10f58e61e748d7c0cd",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp"
    },
    {
      "type": "modify",
      "old_id": "ec5feb8bc8c4acf8508e6ea0ce7495e9507b896a",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUBlocking.cpp",
      "new_id": "ba2753f517ce6756a76f11bbe679403e6283e9bd",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUBlocking.cpp"
    },
    {
      "type": "modify",
      "old_id": "ab41fe4298d997f4dd340e577b1c9f6de2702bc2",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUOptimizeBlockLoads.cpp",
      "new_id": "bb80df197d45b8a1c232507977025f4d9572a733",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUOptimizeBlockLoads.cpp"
    },
    {
      "type": "modify",
      "old_id": "112d138c73e180329cf2829d01b7db6cadd81c81",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp",
      "new_id": "7fc75e7294ea3e79808d78aad02fd3d45b2a0b1a",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp"
    },
    {
      "type": "modify",
      "old_id": "54a306d63cdcd371ef46f91a4373cdb1f8aec66c",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp",
      "new_id": "a1c0656d0bdb56fdb75398b4a1c0f951fadc3ba6",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp"
    },
    {
      "type": "modify",
      "old_id": "95e27e46d90aba8688808aa8ee3ef2e26400ecc0",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp",
      "new_id": "07572a4950760066b5216517e6a2f2454d271222",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp"
    },
    {
      "type": "modify",
      "old_id": "9f126fe8c2415057051b0565f9661d43f0cd65a5",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp",
      "new_id": "d3906e37ffbf1cb571c766dc18fd07bec535effb",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp"
    },
    {
      "type": "modify",
      "old_id": "24a0de6ed48a5d000dbb31332e85a5fc4e7e0fe5",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/optimize-transpose.mlir",
      "new_id": "c748c1ca5ef8821538c45d923b1ca9c57cecb3c7",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/optimize-transpose.mlir"
    },
    {
      "type": "modify",
      "old_id": "32fb3178a8af291ad94dfb6d3a5bc3f27b37fc09",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/propagate-layout-inst-data.mlir",
      "new_id": "5f70831f45e972fd549d8bdccedc9181d0e66447",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/propagate-layout-inst-data.mlir"
    },
    {
      "type": "modify",
      "old_id": "48e77d867508ba845cb44165f95911309f85dc09",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/propagate-layout.mlir",
      "new_id": "b88d8e1a78a2633184bce9717aa23c20fcf01396",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/propagate-layout.mlir"
    },
    {
      "type": "modify",
      "old_id": "7819a438057c48474ada26fdb929affff8356482",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir",
      "new_id": "b136c8992568288a5f0cf31499980a355d063df9",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir"
    },
    {
      "type": "modify",
      "old_id": "e5e3d2a1c1ad5fd50c4cbf078d2209f59528046a",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/subgroup-distribute.mlir",
      "new_id": "87c67ba6bf324b8ae0b6b90b840a7c8f9928997a",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/subgroup-distribute.mlir"
    },
    {
      "type": "modify",
      "old_id": "561034fb5880be669cd62b6a283515c80e45db65",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/transform-ops.mlir",
      "new_id": "13ed24ebf0a3a6b8a65e3ff212bc34bb6ba2e8b6",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/transform-ops.mlir"
    },
    {
      "type": "modify",
      "old_id": "d61908b422194c8df858d9287061d43de5ec688d",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-blocking.mlir",
      "new_id": "9f9edcd416ddfc356d23d37a03ae7c0c3d1c4102",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-blocking.mlir"
    },
    {
      "type": "modify",
      "old_id": "dbc52b8a98894c5a3240157270205bac4870e36d",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-unroll-patterns.mlir",
      "new_id": "c3be138fef38a5a6a12f71ae9495bf4f1bef1211",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-unroll-patterns.mlir"
    },
    {
      "type": "modify",
      "old_id": "9580769d37313a9c494de669959bb141d0408cb3",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-elemwise.mlir",
      "new_id": "6e9711442b92d26ce57d35c39832be9da594a299",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-elemwise.mlir"
    },
    {
      "type": "modify",
      "old_id": "4829af3612de31542262c92cf1d4e4488f00a791",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-rr.mlir",
      "new_id": "6b8b4f282b74473bf27c97e68acc1180c5dc0f32",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-rr.mlir"
    },
    {
      "type": "modify",
      "old_id": "37a76f316e75acf8720624ae28c1cadb5475dad3",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir",
      "new_id": "ad346307437e41a41b32990087814eb19e24e97c",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir"
    },
    {
      "type": "modify",
      "old_id": "69eb8ce9dfba5d75f880447029bf1cd9d3cb403a",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir",
      "new_id": "da6ad976d3730ec25b6102b59ed1bb60b59f55b8",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir"
    },
    {
      "type": "modify",
      "old_id": "a8015cced7eb4d88827cbf8166da876c1415f490",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg.mlir",
      "new_id": "50081ed34fe78c3063995f72b6c45fa96baef702",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/XeGPU/xegpu-wg-to-sg.mlir"
    },
    {
      "type": "modify",
      "old_id": "3f2fff9ab51e9d30275932f94b9a6de38a2cb795",
      "old_mode": 33188,
      "old_path": "mlir/test/Integration/Dialect/XeGPU/WG/simple_gemm.mlir",
      "new_id": "37f6d33e8ac30e58f9e313863810c155bd2cf69f",
      "new_mode": 33188,
      "new_path": "mlir/test/Integration/Dialect/XeGPU/WG/simple_gemm.mlir"
    },
    {
      "type": "modify",
      "old_id": "826d07d1b6eca723593bcdc2c523483961087524",
      "old_mode": 33188,
      "old_path": "mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp",
      "new_id": "1a1520dfa975d41973b2841acac3916c09c1c9c8",
      "new_mode": 33188,
      "new_path": "mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp"
    }
  ]
}
