commit | 0c6a151c65285987f5daabc7f76fe57a82b45ab1 | [log] [tgz] |
---|---|---|
author | Benoit Jacob <jacob.benoit.1@gmail.com> | Thu Oct 17 18:14:19 2024 -0400 |
committer | GitHub <noreply@github.com> | Thu Oct 17 18:14:19 2024 -0400 |
tree | dd71395021f3dae592a49893905adeeed9e832b0 | |
parent | fecccdc852a7e2dda30cbb924427634acb7eb820 [diff] |
Warn when --iree-llvmcpu-target-cpu defaults to "generic". (#18682) Progress on https://github.com/iree-org/iree/issues/18561. This introduces a warning (which we intend to promote to an error in the future) when targeting a generic CPU without explicitly asking for it. This addresses a performance footgun as that IREE default results in low performance. Along the way this grew into a substantial change to e2e testing rules: - `TARGET_CPU` and `TARGET_CPU_FEATURES` arguments are gone (were redundant with `COMPILER_FLAGS`). - For `TARGET_CPU_FEATURES_VARIANTS`, the special value `"default"` is renamed to `"generic"` and a new value `"host"` is also supported. Example warning (this is customized to the target architecture, here x86): ``` /home/benoit/matmul_i8.mlir:0:0: warning: while creating CPU target: Defaulting 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. This can be done in two ways: 1. With command-line flags: --iree-llvmcpu-target-cpu=... --iree-llvmcpu-target-cpu-features=... 2. Within the IR: #hal.executable.target< ... , cpu="...", cpu_features="..."> In the rest of this message, these fields are referred to as just `cpu` and `cpu_features`. Examples: cpu=generic Target a generic CPU of the target architecture. The generated code will have poor performance, but will run on any CPU. cpu=host 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. cpu="name" Target a specific CPU. This is mostly used on x86. The accepted values are the same as in Clang command lines. 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 cpu_features="+feature1,..." Target a CPU supporting the comma-separated of (+-prefixed) features. The accepted values are the same as in Clang command lines. ``` --------- Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels
Package | Release status |
---|---|
GitHub release (stable) | |
GitHub release (nightly) | |
Python iree-compiler | |
Python iree-runtime |
Host platform | Build status |
---|---|
Linux | |
macOS | |
Windows |
For the full list of workflows see https://iree.dev/developers/general/github-actions/.
See our website for more information.
Community meeting recordings: IREE YouTube channel
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.