)]}'
{
  "commit": "51253b31551796c6857e56f48531e15923aa49c5",
  "tree": "afeb0af3da282a245f7df498f588689f289b0eac",
  "parents": [
    "9afbcde1d2938c494c225e93837e3a075db218e7"
  ],
  "author": {
    "name": "Razvan Lupusoru",
    "email": "razvan.lupusoru@gmail.com",
    "time": "Tue Dec 23 15:35:45 2025 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Dec 23 15:35:45 2025 -0800"
  },
  "message": "[mlir][acc] Add ACCSpecializeForDevice and ACCSpecializeForHost passes (#173407)\n\nAdd two new transformation passes for specializing OpenACC IR for\ndifferent execution contexts:\n\nACCSpecializeForDevice:\n- Strips OpenACC constructs that are invalid in device code\n- Replaces data entry ops with their var operands\n- Unwraps regions from compute/data constructs\n- Erases runtime operations (init, shutdown, wait, etc.)\n\nThis pass is applicable in two contexts:\n1. Functions marked with `acc.specialized_routine` attribute, where the\nentire function body is device code\n2. Non-specialized functions, where patterns are applied only to `acc`\noperations nested inside compute constructs (parallel, serial, kernels),\nnot to the constructs themselves\n\nACCSpecializeForHost:\n- Converts orphan `acc` operations for host execution\n- Transforms `acc.atomic.*` to load/store via `PointerLikeType`\ninterface\n- Converts `acc.loop` to `scf.for` or `scf.execute_region`\n- Replaces orphan data entry ops with their var operands\n\nThis pass operates in two modes:\n1. Default (orphan) mode: Only converts `acc` operations that are not\ninside or attached to compute regions. Used for host `acc routine`s\nwhere compute constructs should be preserved.\n2. Host fallback mode (enable-host-fallback\u003dtrue): Converts ALL `acc`\noperations including compute constructs, data regions, and runtime ops.\nThis is used to allow testing of the full conversion. These patterns\nwill be used to handle conditional host execution of `acc` regions with\nif clause.\n\nThe pattern population functions (populateACCSpecializeForDevice,\npopulateACCOrphanToHostPatterns, populateACCHostFallbackPatterns) are\nexposed so other passes can reuse these patterns.\n\n---------\n\nCo-authored-by: Susan Tan \u003czujunt@nvidia.com\u003e\nCo-authored-by: Scott Manley \u003crscottmanley@nvidia.com\u003e",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "376bbafc384e09e6c468563b1f155cfd867b557f",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/OpenACC/Transforms/ACCSpecializePatterns.h"
    },
    {
      "type": "modify",
      "old_id": "27f65aa15f0402c8c6ef34c2fcf9c0171f056357",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.h",
      "new_id": "b929c3d03dba4c2e1ddfe6d28330560bd030f0fd",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.h"
    },
    {
      "type": "modify",
      "old_id": "253311e12932dbb434529bb9b337d79c9acc0eaa",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td",
      "new_id": "e10fde3c2691f429b1ebe52651542a2511713760",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "79cc95a7b964d4a901a7f8a504c2db05052a20d4",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForDevice.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4683d3b4451e1c7bd94cc9ed2566e9e1775c10d2",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForHost.cpp"
    },
    {
      "type": "modify",
      "old_id": "8d657852345ec679904a91333eba9ce1064f61b3",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/OpenACC/Transforms/CMakeLists.txt",
      "new_id": "e94ac6f332834b741905695e4a4d439716b8f32e",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/OpenACC/Transforms/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7f8267ddb779fb19b45dddde31db3265b8d3ca0c",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/OpenACC/acc-specialize-for-device.mlir"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "59269b71bf61c784aa5ab8b57b1bb4bcf45c4820",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/OpenACC/acc-specialize-for-host-fallback.mlir"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0ef76d076675930ac439d1f9798bc33115e86576",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/OpenACC/acc-specialize-for-host.mlir"
    }
  ]
}
