)]}'
{
  "commit": "0c6a151c65285987f5daabc7f76fe57a82b45ab1",
  "tree": "dd71395021f3dae592a49893905adeeed9e832b0",
  "parents": [
    "fecccdc852a7e2dda30cbb924427634acb7eb820"
  ],
  "author": {
    "name": "Benoit Jacob",
    "email": "jacob.benoit.1@gmail.com",
    "time": "Thu Oct 17 18:14:19 2024 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Oct 17 18:14:19 2024 -0400"
  },
  "message": "Warn when --iree-llvmcpu-target-cpu defaults to \"generic\". (#18682)\n\nProgress on https://github.com/iree-org/iree/issues/18561. This\r\nintroduces a warning (which we intend to promote to an error in the\r\nfuture) when targeting a generic CPU without explicitly asking for it.\r\nThis addresses a performance footgun as that IREE default results in low\r\nperformance.\r\n\r\nAlong the way this grew into a substantial change to e2e testing rules:\r\n- `TARGET_CPU` and `TARGET_CPU_FEATURES` arguments are gone (were\r\nredundant with `COMPILER_FLAGS`).\r\n- For `TARGET_CPU_FEATURES_VARIANTS`, the special value `\"default\"` is\r\nrenamed to `\"generic\"` and a new value `\"host\"` is also supported.\r\n\r\nExample warning (this is customized to the target architecture, here\r\nx86):\r\n\r\n```\r\n/home/benoit/matmul_i8.mlir:0:0: warning: while creating CPU target: \r\nDefaulting to targeting a generic CPU for the target architecture will result in poor performance. Please specify a target CPU and/or a target CPU feature set. If it is intended to target a generic CPU, specify \"generic\" as the CPU.\r\n\r\nThis can be done in two ways:\r\n1. With command-line flags:\r\n    --iree-llvmcpu-target-cpu\u003d...\r\n    --iree-llvmcpu-target-cpu-features\u003d...\r\n2. Within the IR:\r\n    #hal.executable.target\u003c ... , cpu\u003d\"...\", cpu_features\u003d\"...\"\u003e\r\n\r\nIn the rest of this message, these fields are referred to as just `cpu` and `cpu_features`.\r\n\r\nExamples:\r\n\r\n    cpu\u003dgeneric\r\n        Target a generic CPU of the target architecture. The generated code will have poor performance, but will run on any CPU.\r\n\r\n    cpu\u003dhost\r\n        Target the host CPU. The generated code will have optimal performance on the host CPU but will crash on other CPUs not supporting the same CPU features.\r\n\r\n    cpu\u003d\"name\"\r\n        Target a specific CPU. This is mostly used on x86. The accepted values are the same as in Clang command lines.\r\n        List of accepted x86 CPUs: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, raptorlake, meteorlake, arrowlake, arrowlake-s, lunarlake, gracemont, pantherlake, sierraforest, grandridge, graniterapids, graniterapids-d, emeraldrapids, clearwaterforest, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, znver4, znver5, x86-64, x86-64-v2, x86-64-v3, x86-64-v4\r\n\r\n    cpu_features\u003d\"+feature1,...\"\r\n        Target a CPU supporting the comma-separated of (+-prefixed) features. The accepted values are the same as in Clang command lines.\r\n```\r\n\r\n---------\r\n\r\nSigned-off-by: Benoit Jacob \u003cjacob.benoit.1@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e76a8fa0f415fe9261214a94e2e09a74695d7629",
      "old_mode": 33188,
      "old_path": "build_tools/bazel/iree_check_test.bzl",
      "new_id": "c4037a3c0d926d26fe174f0f36b6cca4edf25f93",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/iree_check_test.bzl"
    },
    {
      "type": "modify",
      "old_id": "9d17d50808d058337094287f6b42746cad21cd53",
      "old_mode": 33188,
      "old_path": "build_tools/bazel/iree_e2e_generated_runner_test.bzl",
      "new_id": "68115c26e102b754bec9b869991d919684eed57b",
      "new_mode": 33188,
      "new_path": "build_tools/bazel/iree_e2e_generated_runner_test.bzl"
    },
    {
      "type": "modify",
      "old_id": "eb5d2b1ddd679e6e846adee6108c572205666356",
      "old_mode": 33188,
      "old_path": "build_tools/bazel_to_cmake/bazel_to_cmake_converter.py",
      "new_id": "4f8084f14ff8c2ba6f3f8b6ef3f26b91f88ea81d",
      "new_mode": 33188,
      "new_path": "build_tools/bazel_to_cmake/bazel_to_cmake_converter.py"
    },
    {
      "type": "modify",
      "old_id": "cb6d32293d07a87743718d145d1fbb98973fbbc4",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_check_test.cmake",
      "new_id": "b00741c1905cec24925aed482f85c30873a7bd63",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_check_test.cmake"
    },
    {
      "type": "modify",
      "old_id": "585d9906f1129e01d948418d7c249f46de58402c",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_e2e_generated_runner_test.cmake",
      "new_id": "658e7d8d896a9e7c5121a71a0eeb3975fd566d3f",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_e2e_generated_runner_test.cmake"
    },
    {
      "type": "modify",
      "old_id": "5db08d457cd2b1a668eafda64e8b30cade6800ff",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_static_linker_test.cmake",
      "new_id": "09db2eb0701e0516ccfd7459b5ba481fe7b021d0",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_static_linker_test.cmake"
    },
    {
      "type": "modify",
      "old_id": "0e765fc6a4175b96bdd66f9018239cc8b3d2391c",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/BUILD.bazel",
      "new_id": "c086f548118ee1f8b4e9482999c1394a1de602f6",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "5d372d01d35502758ceb75feec1fc7a240e6dc13",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/CMakeLists.txt",
      "new_id": "fea4eb84b118b059309a338dcc0cc4d3a3da4c4c",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "a9da1c9b3f2658046a31df3bf897e9c1bce5b40b",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp",
      "new_id": "80801b8cd6282b3e8cc526d7d457aab07110f4f0",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp"
    },
    {
      "type": "modify",
      "old_id": "3d232386f084adca18999c4de49098f18915d83f",
      "old_mode": 33188,
      "old_path": "compiler/plugins/target/LLVMCPU/LLVMTargetOptions.h",
      "new_id": "0459b2f8b4b7610f661935224f14766990b03c97",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/LLVMTargetOptions.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "552b0b56214642f373df5b7bd81cfdc07ae85823",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/ResolveCPUAndCPUFeatures.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fa23e684c2aef5103cd98607d5069a7ad8075ca7",
      "new_mode": 33188,
      "new_path": "compiler/plugins/target/LLVMCPU/ResolveCPUAndCPUFeatures.h"
    },
    {
      "type": "modify",
      "old_id": "759077aafae866882717e74974c621cfad12dfe2",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_sync/cts/CMakeLists.txt",
      "new_id": "81c3eea4c3e69ef638223ab051db7036d369f5c0",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_sync/cts/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "5658351b02c28af4e0455e91f2e4cf66be04875e",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/drivers/local_task/cts/CMakeLists.txt",
      "new_id": "ed1cf0252ce57c0a8e6fe05d8d0fbf80bc1a8ab9",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/drivers/local_task/cts/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "86b542d65e02154b5ae8565dead3518dfcc33489",
      "old_mode": 33188,
      "old_path": "samples/simple_embedding/BUILD.bazel",
      "new_id": "3f5f5edc3c41b8959eaaa0fd9c693508a8c300f0",
      "new_mode": 33188,
      "new_path": "samples/simple_embedding/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "faac2c38691eb131b78c5dc1c7fc4890a0e590bf",
      "old_mode": 33188,
      "old_path": "samples/simple_embedding/CMakeLists.txt",
      "new_id": "7ab24b7c5f5236959f4b4011ba31d9a83bb11f50",
      "new_mode": 33188,
      "new_path": "samples/simple_embedding/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "7727bd84a60b6bda124e36ed3066918b9b03cef7",
      "old_mode": 33188,
      "old_path": "samples/static_library/CMakeLists.txt",
      "new_id": "49c514a7de1f9bf19436cc0d85efc3d8b56adf5e",
      "new_mode": 33188,
      "new_path": "samples/static_library/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "8ab6ca947dd17aeae35fe94fdd9fd7cf01771821",
      "old_mode": 33188,
      "old_path": "tests/e2e/attention/CMakeLists.txt",
      "new_id": "f7a199223df5fb48a0a231d6f49607dee40f7cdf",
      "new_mode": 33188,
      "new_path": "tests/e2e/attention/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "9847e210158f4ad96ee40644363b32fda3f7ffd1",
      "old_mode": 33188,
      "old_path": "tests/e2e/convolution/BUILD.bazel",
      "new_id": "488c5ab94d5a4322be136cdac9724232518d6906",
      "new_mode": 33188,
      "new_path": "tests/e2e/convolution/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "8ddad849b082130932a5ba257cf243ff2d15d9d4",
      "old_mode": 33188,
      "old_path": "tests/e2e/convolution/CMakeLists.txt",
      "new_id": "977af1c020d3b8ec414b78a774568196da7c54d5",
      "new_mode": 33188,
      "new_path": "tests/e2e/convolution/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "791fd2879b9ddb0155b9be9c665bde2330f68c16",
      "old_mode": 33188,
      "old_path": "tests/e2e/linalg/BUILD.bazel",
      "new_id": "66eeb49cd2707124d9185244eed91da5f67a3185",
      "new_mode": 33188,
      "new_path": "tests/e2e/linalg/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "9794387a9691a87767c593d7f7092c97debf33cc",
      "old_mode": 33188,
      "old_path": "tests/e2e/linalg/CMakeLists.txt",
      "new_id": "9a6cc234b31636b30592494e191a1d316a5bcd1c",
      "new_mode": 33188,
      "new_path": "tests/e2e/linalg/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "7e64cfe8d2b64136098bb7390c33469c869c4f12",
      "old_mode": 33188,
      "old_path": "tests/e2e/linalg_ext_ops/BUILD.bazel",
      "new_id": "f437e9d4d4b87f3de7923318d1954a654363965c",
      "new_mode": 33188,
      "new_path": "tests/e2e/linalg_ext_ops/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "5c36220b2957475a2bcdcfe5358e2a19f3570fd4",
      "old_mode": 33188,
      "old_path": "tests/e2e/linalg_ext_ops/CMakeLists.txt",
      "new_id": "5bc968c6e9b7643cc4e5649f88c33e5b25d31567",
      "new_mode": 33188,
      "new_path": "tests/e2e/linalg_ext_ops/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "17b27573f0326855b1223f5d05826a2b13174bf8",
      "old_mode": 33188,
      "old_path": "tests/e2e/matmul/BUILD.bazel",
      "new_id": "635ee0cc3213bb18f3a293eb3d6f991fda0f487c",
      "new_mode": 33188,
      "new_path": "tests/e2e/matmul/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "df2c92c5607d099947cdc28d8e26d05b16334585",
      "old_mode": 33188,
      "old_path": "tests/e2e/matmul/CMakeLists.txt",
      "new_id": "36e1255c5bfda1197de66b1286100708f1163867",
      "new_mode": 33188,
      "new_path": "tests/e2e/matmul/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "87fdccb5365023555a05cc2df3575f33a1cb83c2",
      "old_mode": 33188,
      "old_path": "tests/e2e/regression/BUILD.bazel",
      "new_id": "dc135e1f7d8274a154971c0ff9c12787bc1b53b0",
      "new_mode": 33188,
      "new_path": "tests/e2e/regression/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "06597e6c65afe919f5ccb8a66201c68e0d45c021",
      "old_mode": 33188,
      "old_path": "tests/e2e/regression/CMakeLists.txt",
      "new_id": "3b7055970591729be4b68d92f4ede68156ad2530",
      "new_mode": 33188,
      "new_path": "tests/e2e/regression/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "fb9a65d470cf711c959b4f5fc08a197371b8b955",
      "old_mode": 33188,
      "old_path": "tests/e2e/stablehlo_ops/BUILD.bazel",
      "new_id": "ae52aefd9d13d66d0fa5129e288021289d0b7b92",
      "new_mode": 33188,
      "new_path": "tests/e2e/stablehlo_ops/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "d5e67dbc4b6a09214a325673110c7412283f67ba",
      "old_mode": 33188,
      "old_path": "tests/e2e/stablehlo_ops/CMakeLists.txt",
      "new_id": "fef9f7338328519e582ee755b63ff9aa9d2ae224",
      "new_mode": 33188,
      "new_path": "tests/e2e/stablehlo_ops/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "4b164e0498115de59d31f65a8f053b9ca7f01d7c",
      "old_mode": 33188,
      "old_path": "tests/e2e/tensor_ops/BUILD.bazel",
      "new_id": "434d6d88c8161fef4325361c0ec69226f0ef1a10",
      "new_mode": 33188,
      "new_path": "tests/e2e/tensor_ops/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "4a6f7185199758e4049db614becbd7aa7f597598",
      "old_mode": 33188,
      "old_path": "tests/e2e/tensor_ops/CMakeLists.txt",
      "new_id": "879629f84ef0cdacea93a3f6fd4b9e671f7c8303",
      "new_mode": 33188,
      "new_path": "tests/e2e/tensor_ops/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "cf3a69048539cf9b747778cb59830e48eba40bb4",
      "old_mode": 33188,
      "old_path": "tests/e2e/tosa_ops/BUILD.bazel",
      "new_id": "41c8b91ec8d15546d6c60e88735725e08efec46f",
      "new_mode": 33188,
      "new_path": "tests/e2e/tosa_ops/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "9e28378701306636a3290fbae5bd3733523b6f50",
      "old_mode": 33188,
      "old_path": "tests/e2e/tosa_ops/CMakeLists.txt",
      "new_id": "8cfd56feafd4891892b3942adc22b338a3fa4a4e",
      "new_mode": 33188,
      "new_path": "tests/e2e/tosa_ops/CMakeLists.txt"
    }
  ]
}
