)]}'
{
  "commit": "ecc49f6a2a14d7edcd68340521e4b2d2500a3d8d",
  "tree": "0cfcfa42b8aa11ea2b4884f9db10a93c93c45587",
  "parents": [
    "57b9239e0d4988dc440cbe794f689003714e2bda"
  ],
  "author": {
    "name": "Stella Laurenzo",
    "email": "stellaraccident@gmail.com",
    "time": "Thu Aug 10 23:37:22 2023 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 10 23:37:22 2023 -0700"
  },
  "message": "Add a CLI `iree-ir-tool` with a command to strip data. (#14636)\n\nBeen meaning to do this for a while in order to have a place to stash\r\nmore power-user style things that core developers typically use iree-opt\r\nfor.\r\n\r\nThis one adds a `strip-data` sub-command which uses the passes from\r\n#14627 to systematically replace tensor constants with synthetic values.\r\nWith an ASAN/asserts build, this was able to strip a 7GiB int4 vicuna\r\nMLIR file in ~5s and a 23GiB h2ogpt model in about 30s (the latter has\r\nsome other characteristics which make it more expensive to load as well\r\nas being bigger). Results were a 2.6MiB and 1.4MiB MLIR file\r\nrespectively, consisting just of program IR and annotations for\r\nsynthetic data.\r\n\r\nGetting the opt pipeline right for arbitrary input is a bit tricky, so I\r\ndecided we should just armor this into a tool\r\n\r\nFrom installed packages, this can be used as:\r\n\r\n```\r\niree-ir-tool strip-data input.mlir -o output.mlir\r\n```\r\n\r\nFrom a build tree with Python setup:\r\n\r\n```\r\npython -m iree.compiler.tools.ir_tool strip-data input.mlir -o output.mlir\r\n```\r\n\r\nRequired adding some additional compiler APIs:\r\n\r\n* `ireeCompilerInvocationRunPassPipeline` to run an arbitrary textual\r\npass pipeline on an invocation.\r\n* `ireeCompilerInvocationOutputIRBytecode` to emit bytecode from an\r\ninvocation.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d56dbcf6d415d22c0f70f69b318654c606ec862c",
      "old_mode": 33188,
      "old_path": "compiler/bindings/c/iree/compiler/embedding_api.h",
      "new_id": "2cb5eddba7136522aa7c487d9ca00a800dc5a3b1",
      "new_mode": 33188,
      "new_path": "compiler/bindings/c/iree/compiler/embedding_api.h"
    },
    {
      "type": "modify",
      "old_id": "60ff4ce11eaba5011eeb6d9de37accf1e5295aee",
      "old_mode": 33188,
      "old_path": "compiler/bindings/c/iree/compiler/loader/handle_symbols.inc",
      "new_id": "665a031aa36c3fa493a81490a48f58726b65ca73",
      "new_mode": 33188,
      "new_path": "compiler/bindings/c/iree/compiler/loader/handle_symbols.inc"
    },
    {
      "type": "modify",
      "old_id": "b4fd6144d34ad4b5db82835cdd7bb3a472f940f9",
      "old_mode": 33188,
      "old_path": "compiler/bindings/c/iree/compiler/loader/loader.cpp",
      "new_id": "0469b2f3703b74728a753fca4f99ccbe19b4d458",
      "new_mode": 33188,
      "new_path": "compiler/bindings/c/iree/compiler/loader/loader.cpp"
    },
    {
      "type": "modify",
      "old_id": "b3566bb320096e31a979d3d41e9001945958a588",
      "old_mode": 33188,
      "old_path": "compiler/bindings/python/CMakeLists.txt",
      "new_id": "206c08542ff373ba358cd1b8085d4ee1538f67a9",
      "new_mode": 33188,
      "new_path": "compiler/bindings/python/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "ee14ee1bea9aa8db3998be588d209c02f58dc64e",
      "old_mode": 33188,
      "old_path": "compiler/bindings/python/iree/compiler/api/ctypes_dl.py",
      "new_id": "40be17a4b9e62e1db638ea8245a3ce1016d67102",
      "new_mode": 33188,
      "new_path": "compiler/bindings/python/iree/compiler/api/ctypes_dl.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4448c9447e1d4bb4b4a3f6b39a48b51594f3bd3b",
      "new_mode": 33188,
      "new_path": "compiler/bindings/python/iree/compiler/tools/ir_tool/__main__.py"
    },
    {
      "type": "modify",
      "old_id": "427116b4d299cf3d3c7e6328ef78a0012be66a65",
      "old_mode": 33188,
      "old_path": "compiler/bindings/python/test/tools/CMakeLists.txt",
      "new_id": "01456f9fb0f9d068291c2f9e94e9c28d381f6b87",
      "new_mode": 33188,
      "new_path": "compiler/bindings/python/test/tools/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2a7a538ffb14a938ab51497b7c9c7e5a9e0930a5",
      "new_mode": 33188,
      "new_path": "compiler/bindings/python/test/tools/ir_tool_test.py"
    },
    {
      "type": "modify",
      "old_id": "37a3aa15c3e5fc3883d32c1cf8b9bb566c92b61a",
      "old_mode": 33188,
      "old_path": "compiler/setup.py",
      "new_id": "ea1859f0dd6015302ebdf858b27a3de21807b8bb",
      "new_mode": 33188,
      "new_path": "compiler/setup.py"
    },
    {
      "type": "modify",
      "old_id": "f9cec5c1139ec1fcbe2092116f710c14dfac4985",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/Internal/BUILD.bazel",
      "new_id": "ab6a55fd39c920280aa9be1193fa5ead4cb4afa0",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/Internal/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "aabf542c71d18c2b29179b44403396fbc744922c",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/Internal/CMakeLists.txt",
      "new_id": "d14608f4d5764160a31fda743696ca0fb9906841",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/Internal/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "044cd6933fee4d5469d1b644fd07b298718f5467",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/Internal/Embed.cpp",
      "new_id": "36801a921a5a2baeef0c3a3f786ca9199299413c",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/Internal/Embed.cpp"
    },
    {
      "type": "modify",
      "old_id": "5a3cae73dfdf9bd84e0749ff2d52e8c89d56ba26",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/api_exports.c",
      "new_id": "114d7ca5991b1d6a36cfdf940a28266204008e75",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/api_exports.c"
    },
    {
      "type": "modify",
      "old_id": "986cb461f06f11cb388cf82a1ed72173a2d26965",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/api_exports.def",
      "new_id": "b07a8a4a647000da2f195f52ba0c04d19d80cade",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/api_exports.def"
    },
    {
      "type": "modify",
      "old_id": "a252dcbce2a1b6f5f2a85c8723f7a62edf857651",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/api_exports.ld",
      "new_id": "f02718fa20a79888e6d108954b949dd5756e9f37",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/api_exports.ld"
    },
    {
      "type": "modify",
      "old_id": "07fb7539c83297a6942a8f916c08f4137e2d0ccc",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/API/api_exports.macos.lst",
      "new_id": "14283da2ec5ab5acff1a67f7cb5035e65af2712a",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/API/api_exports.macos.lst"
    }
  ]
}
