Repository navigation
[RFC] Benchmarking Strategy - #75
Conversation
| * **[P0]** see the evolution of high-level performance metrics such as latency and memory consumption for XLA:CPU/GPU and IREE:CPU/GPU over time (“Progression”). This allows me to judge the impact of my efforts, and make informed decisions about future engineering choices. | ||
| * **[P0]** see comparisons of aforementioned metrics for a variety of compilers and frameworks including 3P over time (“Competition”). This way, I can compare the performance of XLA:CPU/GPU and IREE:CPU/GPU with multiple baselines to evaluate competitiveness and success metrics for our compilers, and judge where to invest my efforts to make progress towards target metrics. | ||
| * **[P0]** be able to reproduce the results of all benchmarks locally to work on improving performance. This includes easy reproducibility of the environment, ideally by means as simple as selecting an appropriate VM on a cloud service, or at least having all steps to set up a run on a custom device (such as a mobile device) clearly documented. We must ensure benchmarks are run on a stack that is available to 3P users, and all artifacts and commands required for execution are accessible. | ||
| * **[P1]** see aforementioned benchmark results over a wide variety of models so I can analyze how different types of models perform. This will maximize the meaningfulness of the gathered results, and expose each compiler’s strengths and weaknesses. |
There was a problem hiding this comment.
These models are important -- so selecting a live list of SoTA would be awesome. Of course we can have the Resnets and mobilenets -- but having a few LLaMAs and Whispers goes a long way in showing broad applicability of OpenXLA
| 2. We want to provide **interactive** **dashboards** accessible to the OSS community to evaluate _Progression_ and _Competition_, including comparisons with frameworks and compilers outside of the OpenXLA umbrella. We also provide _Regression_ dashboards for _IREE:CPU and IREE:GPU_ on a common infra stack. Regression dashboards for _XLA:CPU and XLA:GPU_ are not the primary focus as of now and may be considered in the future. | ||
| 3. We focus on **high-level metrics** such as wall-time and max memory consumption that can be obtained without instrumentation. For training, this includes framework overhead, and it is up to the benchmark selection and detailed dashboard design to ensure comparability. The infrastructure design must be flexible enough to support instrumented metrics and microbenchmarks, but we defer the detailed requirements and design. | ||
|
|
||
| Initial focus will be on Progression and Competition for XLA:CPU/GPU and IREE:CPU/GPU to analyze E2E latency and memory. It will show comparisons over time on an initial set of agreed-upon models (as listed under “Detailed Requirements”), which will also define the frameworks to support. Dashboards will update automatically at least once a week, ideally nightly, using the latest head or nightly release (whereas 3P compilers will use a stable baseline). |
There was a problem hiding this comment.
The 3P compilers baseline works on the short term, but we need a plan for upgrading 3P compilers as well, as new released come out.
More immediately: frameworks are upgraded as well: are we gonna take a stable pip release of TF/JAX/PyTorch and use this with the compiler? Otherwise how do we manage to track changes to the frameworks themselves? What about the bridges to the compiler?
There was a problem hiding this comment.
FWIW, I believe as expressed, this paragraph is a statement of Google's priorities, and not one concerning the design of the system. The system should be designed to be modular, and the question of additional benchmark targets should mostly concern code organization, bring-up, and maintenance responsibilities.
There was a problem hiding this comment.
Did you mean this as an answer to this particular comment? I'm struggling to see how this connect: I'm not asking anything about "additional benchmark".
Here is the part I was answering:
Dashboards will update automatically at least once a week, ideally nightly, using the latest head or nightly release (whereas 3P compilers will use a stable baseline).
My question is not about the benchmarks, but the compilers/framework versioning: it is mentioned that "3P compilers will use a stable baseline", so two things:
- we need to plan for when to upgrade the 3P compilers obviously: we can't just freeze a single version forever.
- what about things that aren't in OpenXLA but aren't compilers (JAX, TensorFlow, PyTorch for example): are they frozen to a stable version or are they taken from HEAD? In the latter case, it's not clear to me how to differentiate a benchmark result change coming from a change to OpenXLA from one coming from a change to the framework (or the bridge)
There was a problem hiding this comment.
Did you mean this as an answer to this particular comment? I'm struggling to see how this connect: I'm not asking anything about "additional benchmark".
I think the confusion is my fault. I used the term "benchmark targets" to mean the compilers and frameworks that are targeted by the benchmarks.
In the design, which we'll share in some quick-follow RFCs, we're defining "compiler-level benchmarks" that take as input StableHLO, and "framework-level benchmarks", which take as input programs supported by that framework (e.g., JAX). Both benchmark types are important. Compiler-level benchmarks let us isolate and measure performance at that layer, and framework-level makes us aware of performance issues that arise in the interaction of and integration layers of framework / bridge / plug-in / compiler.
Also in the design, we want to support adding new frameworks and compilers by the community, and aim to facilitate making apples-to-apples comparisons across them by sharing environments, methodologies, etc. (With a proper integration, we'd see regular reporting on framework and compiler releases not against static versions, but on whatever release schedule is desired.) This is not an easy problem, and introduces a large maintenance burden. Google plans on investing in bringing up and maintaining frameworks and compilers that are important to its priorities, and we'll need various approaches to governance around these as well as community contributions. Models where you "bring your benchmarks" but leverage the OOBI orchestration, data collection, and reporting may be possible as well, but the near-term RFCs don't cover those details extensively.
There was a problem hiding this comment.
, we're defining "compiler-level benchmarks" that take as input StableHLO, and "framework-level benchmarks",
Ah, that's very useful to mention, and it's great that you're including both!
(so my question was about "framework-level benchmarks" here)
There was a problem hiding this comment.
"framework-level makes us aware of performance issues that arise in the interaction of and integration layers of framework / bridge / plug-in / compiler." - who would be tracking/acting on these?
There was a problem hiding this comment.
I stole some of Julian's wording directly from the comment above and added these explanations around framework- and compiler-level benchmarks to the "Types of Benchmarks" section below.
The 3P compilers baseline works on the short term, but we need a plan for upgrading 3P compilers as well, as new released come out
I actually think the wording "baseline" is misleading here. My suggestion is not to freeze the 3P compilers and frameworks to a fixed version, I wanted to express that for these we may rely on official releases instead of nightlies depending on their availability, release strategy and stability. We absolutely should use up-to-date versions of frameworks and 3P compilers, IMO.
There was a problem hiding this comment.
I think freezing workloads vs using the latest versions will need to be evaluated case-by-case. For example, regression benchmarks need to reduce noise/variability as much as possible and fixing the versions would eliminate one source of variability. We would need to be deliberate about updating these artifacts. On the other hand, comparative benchmarks would want to use the bleeding edge so this would require a more frequent update cadence. The shared model library should offer both and let each project decide on the strategy that works for their use case.
There was a problem hiding this comment.
I was referring to comparative benchmarking with my comment above. Agree for regression benchmarks.
| * A100, Ampere GA100 | ||
| * H100, Hopper GH100 **- when available** | ||
|
|
||
| All tooling will be OSS and available through the OpenXLA repository, enabling partners to run the benchmarks on their own hardware, e.g. on-premise or through self-hosted GitHub Action runners. |
There was a problem hiding this comment.
I think we (the OpenXLA project) need a bit more than just the tooling available: we need partners to be able to provide their own CI and submit results to the dashboard/database for tracking. (this may be what you intended, but the phrasing isn't explicit on this).
There was a problem hiding this comment.
Can you describe a use case you have in mind in more detail? This proposal is trying to avoid the scope creep of becoming "benchmarking as a service" to customers of OpenXLA. That said, there are likely use cases where OpenXLA contributors would improve OpenXLA through richer benchmarking integrations that aren't yet represented here.
There was a problem hiding this comment.
Do we have members in the OpenXLA community using other cloud providers (AWS / Azure / etc.)? I'm wondering if a webhook-style mechanism for listening to benchmark requests and then uploading results would help add modularity.
There was a problem hiding this comment.
Can you describe a use case you have in mind in more detail?
It seems quite likely to me that folks will want to provide CI for platforms that don't run on GCP, for example Amazon is a member of OpenXLA: how do you envision them being included in the overall OpenXLA benchmarking?
The part about "enabling partners to run the benchmarks on their own hardware, e.g. on-premise" is nice, but that does not make it a dashboard for the OpenXLA project.
I'm wondering if a webhook-style mechanism for listening to benchmark requests and then uploading results would help add modularity.
Yes: decoupling the "data producers" from the "data consumers" is what I'm alluding to: the proposal has to components and I'm trying to make sure they are decoupled: it is fantastic that Google will invest time to put together runners on GCP, but I don't quite see why the dashboard/database/comparison should be coupled to this?
There was a problem hiding this comment.
It sounds like core requirement is capturing the entire environment in a way that is reliably reproducible and way to submit data by partners. For partners, would all information be stored in same database, would information be queried from multiple?
There was a problem hiding this comment.
we need partners to be able to provide their own CI and submit results to the dashboard/database for tracking
There shouldn't be anything preventing partners from doing that in theory. As I wrote in the design overview below, the goal is to keep the components for data production and consumption separate, so the dashboards won't really care where the data is produced.
I think for both adding hardware and adding new models, it comes down to two things:
- Is whatever we are adding "relevant" enough to be included, or is it only interesting to one specific use-case of one partner? As Julian stated, the goal of this is not to completely replace everyone's own benchmarking solutions.
- Who will maintain these integrations once they are added?
For partners, would all information be stored in same database, would information be queried from multiple?
We haven't really had that discussion. Both is technically possible.
There was a problem hiding this comment.
Yeah I think there are a few different axes here. There's making sure everything is built so that we're not deeply coupling it to a particular infrastructure. I believe this design is mostly focused on that.
Separately, there's:
- What Google, specifically, wants to invest time into maintaining.
- What other contributors want to invest time into maintaining.
- What Google is willing to provide GCP resources for.
- What other contributors are willing to provide compute resources for.
- What models/architectures/configurations the members of the OpenXLA project broadly think are useful for showing in a shared dashboard.
- "" being a GitHub Actions workflow in the repository.
- "" running on postsubmit and posting statuses on GitHub.
- "" being available to trigger on presubmit.
- Auth questions around who can push to shared storage.
I think I'd like to see us start (or quickly adopt) a federated model where it's easy to adapt the end dashboard to pull from different data sources (including forking it into your own cloud project, if necessary). Then what makes it into "The Dashboard" is slightly less important. It seems still useful to have an agreed upon set that everyone thinks is important though.
The discussion of what makes the cut will need to be ongoing, but Google is mostly interested in tracking a certain set of models and configurations, so if Google's providing the compute and engineering resources, the set of models is likely to look quite a bit like that. At the point where someone else is saying "hey I'm generating this data how do I make it show up in the dashboard" I think it becomes mostly a community decision. I do think we should have some kind of filter though or we end up with something that's really unfocused. I would propose reproducibility and transparency as some of the criteria, for instance: if you want to include something on the "main" dashboard, then the code for executing it has to be open source and it has to be clear what the configuration. For inclusion as a GitHub action, we'd need stability as well. Adding webhooks so that others can trigger whatever they want should be easy. I've never really understood why GitHub's auth model makes it so that you can't "subscribe" to a repository to get webhooks for events in it (well you can for email, I guess...). We could consider creating a pub/sub feed or something to make this self-service.
For model selection, I think it should be about which models provide a useful signal of the overall performance of the compiler for a general class of models of interest. If someone is really interested in optimizing the crap out of some very specific models, that should be on their own dashboard (I can say that Google will be doing this 😛).
There was a problem hiding this comment.
I think it's worth discussing all of this in a follow-up RFC. We need to establish a process for adding models to the automatically executed benchmarks and dashboards, but this should not be in the scope of this doc.
|
|
||
|  | ||
|
|
||
| The new infrastructure components, named **OOBI** **(OpenXLA OSS Benchmarking Infrastructure)**, will be part of the OpenXLA repositories, along with the models selected as a benchmarking set. We will rely on GitHub Actions and GCP Runners to run benchmarks. Results are stored in JSON files in a public GCS bucket with additional artifacts alongside. A Cloud Function will then import the JSON file contents into BigQuery for analytics, and we will use [Looker Studio](https://cloud.google.com/looker-studio) - GCP’s reporting and dashboarding solution - for visualization. This approach enables us to create powerful dashboards from multiple sources with potentially different JSON formats, while also empowering the community to run their own analytics solution on the raw data. |
There was a problem hiding this comment.
Similar nit to the "1P / 3P" phrasing - is "OSS" useful to include here (presumably standing for "Open Source "Software")?
| * A100, Ampere GA100 | ||
| * H100, Hopper GH100 **- when available** | ||
|
|
||
| All tooling will be OSS and available through the OpenXLA repository, enabling partners to run the benchmarks on their own hardware, e.g. on-premise or through self-hosted GitHub Action runners. |
There was a problem hiding this comment.
Do we have members in the OpenXLA community using other cloud providers (AWS / Azure / etc.)? I'm wondering if a webhook-style mechanism for listening to benchmark requests and then uploading results would help add modularity.
jpienaar
left a comment
There was a problem hiding this comment.
Great to see this coming up!
|
|
||
| 1. For all compilers under the OpenXLA umbrella - _XLA:GPU, XLA:CPU, IREE:GPU (CUDA backend) and IREE:CPU_ (x86 llvm-cpu backend) - we want to provide an **infrastructure** to run benchmarks in an OSS-first way that puts 1P (Google) and 3P engineers on equal footing. 3P engineers must be able to re-run and reproduce the results of a benchmark in the exact environment without 1P support. | ||
| 2. We want to provide **interactive** **dashboards** accessible to the OSS community to evaluate _Progression_ and _Competition_, including comparisons with frameworks and compilers outside of the OpenXLA umbrella. We also provide _Regression_ dashboards for _IREE:CPU and IREE:GPU_ on a common infra stack. Regression dashboards for _XLA:CPU and XLA:GPU_ are not the primary focus as of now and may be considered in the future. | ||
| 3. We focus on **high-level metrics** such as wall-time and max memory consumption that can be obtained without instrumentation. For training, this includes framework overhead, and it is up to the benchmark selection and detailed dashboard design to ensure comparability. The infrastructure design must be flexible enough to support instrumented metrics and microbenchmarks, but we defer the detailed requirements and design. |
There was a problem hiding this comment.
Can you clarify what you mean by this comment?
| 2. We want to provide **interactive** **dashboards** accessible to the OSS community to evaluate _Progression_ and _Competition_, including comparisons with frameworks and compilers outside of the OpenXLA umbrella. We also provide _Regression_ dashboards for _IREE:CPU and IREE:GPU_ on a common infra stack. Regression dashboards for _XLA:CPU and XLA:GPU_ are not the primary focus as of now and may be considered in the future. | ||
| 3. We focus on **high-level metrics** such as wall-time and max memory consumption that can be obtained without instrumentation. For training, this includes framework overhead, and it is up to the benchmark selection and detailed dashboard design to ensure comparability. The infrastructure design must be flexible enough to support instrumented metrics and microbenchmarks, but we defer the detailed requirements and design. | ||
|
|
||
| Initial focus will be on Progression and Competition for XLA:CPU/GPU and IREE:CPU/GPU to analyze E2E latency and memory. It will show comparisons over time on an initial set of agreed-upon models (as listed under “Detailed Requirements”), which will also define the frameworks to support. Dashboards will update automatically at least once a week, ideally nightly, using the latest head or nightly release (whereas 3P compilers will use a stable baseline). |
There was a problem hiding this comment.
"framework-level makes us aware of performance issues that arise in the interaction of and integration layers of framework / bridge / plug-in / compiler." - who would be tracking/acting on these?
|
|
||
| It is currently not in scope to explicitly measure framework overhead, but this could be added later if we include the same benchmarks with and without framework. | ||
|
|
||
| Running microbenchmarks has to be supported by the infrastructure, but we expect additional requirements on the dashboards (e.g. grouping of hundreds of small benchmarks) which are out of scope for now. |
There was a problem hiding this comment.
I'm not sure I follow what is different here vs microbenchmarks. Is this related to computing aggregates across? (else this feels like you have a database of results and configs and query, and its a question how the database & query scale)
There was a problem hiding this comment.
Some differences with micro-benchmarks compared to the framework-level and compiler-level benchmarks:
- We want to be able to support parameterized sweeps over micro-benchmarks, and corpuses of explicit micro-benchmarks.
- Generally it's more meaningful to compare against other sources of kernels, like cutlass, cublas, etc. I.e., we might find compiler-level comparisons of micro-benchmarks useful... but probably not as useful as comparing what they bottom out on directly. There's problem an analogy to the framework-level / compiler-level comparisons here. We're likely to use the IREE Dispatch Profiler to specify and orchestrate the micro-benchmarks.
- When doing regression testing, dashboarding, etc. we likely want to use aggregate statistics across corpuses, and only use the detailed micro-benchmark data when digging in on a self-serve analysis.
These things aren't fundamentally different w.r.t. the infrastructure, just sufficiently different that we're choosing to prioritize it after we get e2e benchmarks up and running.
There was a problem hiding this comment.
@jpienaar Do you think this needs to be clarified in the doc?
| * A100, Ampere GA100 | ||
| * H100, Hopper GH100 **- when available** | ||
|
|
||
| All tooling will be OSS and available through the OpenXLA repository, enabling partners to run the benchmarks on their own hardware, e.g. on-premise or through self-hosted GitHub Action runners. |
There was a problem hiding this comment.
It sounds like core requirement is capturing the entire environment in a way that is reliably reproducible and way to submit data by partners. For partners, would all information be stored in same database, would information be queried from multiple?
|
|
||
|  | ||
|
|
||
| The new infrastructure components, named **OOBI** **(OpenXLA OSS Benchmarking Infrastructure)**, will be part of the OpenXLA repositories, along with the models selected as a benchmarking set. We will rely on GitHub Actions and GCP Runners to run benchmarks. Results are stored in JSON files in a public GCS bucket with additional artifacts alongside. A Cloud Function will then import the JSON file contents into BigQuery for analytics, and we will use [Looker Studio](https://cloud.google.com/looker-studio) - GCP’s reporting and dashboarding solution - for visualization. This approach enables us to create powerful dashboards from multiple sources with potentially different JSON formats, while also empowering the community to run their own analytics solution on the raw data. |
There was a problem hiding this comment.
Why not just OBI? Or OpenXLA Community Benchmarking Infra.
* Clarified wording around "We", Google's involvement and target audience * Replace IREE:GPU with IREE:CUDA where applicable, added IREE:Vulkan as regression target * Adjusted priority for TVM
* Explanation of compiler- and framework-level benchmarks added * Clarified "stable baseline" for 3P frameworks
* Added requirement to store generated artifacts * Moved PT/TorchInductor to P0 * Aded param counts to models
| 1. For all compilers under the OpenXLA umbrella - _XLA:GPU, XLA:CPU, IREE:CUDA | ||
| and IREE:CPU_ (x86 llvm-cpu backend) - we want to provide an | ||
| **infrastructure** to run automated benchmarks regularly. OpenXLA engineers | ||
| must be able to re-run and reproduce the results of a benchmark in the exact |
There was a problem hiding this comment.
So depending on how you read this, it is either quite straightforward (have this run presubmit and then people just push PRs) or really complicated (anyone can on-demand get access to ssh into the exact GCP VM). I think what we care about is actually more about debugging and reproduction being easy and ergonomic. To me, that means that running the benchmark locally needs to be relatively straightforward. This will necessarily mean a different hardware environment, but we can provide a reproducible software environment through containerization. This is a lot easier to iterate on. Separately we provide the ability to run benchmarks on presubmit (like we've already got in IREE) so that people can run benchmarks with new code.
The other component is transparency on what exactly we're benchmarking. That means clear definitions and documentation.
I think these pretty well cover the goals here and we're on track to have them, but I don't think it's necessarily implied by what you say here.
| * A100, Ampere GA100 | ||
| * H100, Hopper GH100 **- when available** | ||
|
|
||
| All tooling will be OSS and available through the OpenXLA repository, enabling partners to run the benchmarks on their own hardware, e.g. on-premise or through self-hosted GitHub Action runners. |
There was a problem hiding this comment.
Yeah I think there are a few different axes here. There's making sure everything is built so that we're not deeply coupling it to a particular infrastructure. I believe this design is mostly focused on that.
Separately, there's:
- What Google, specifically, wants to invest time into maintaining.
- What other contributors want to invest time into maintaining.
- What Google is willing to provide GCP resources for.
- What other contributors are willing to provide compute resources for.
- What models/architectures/configurations the members of the OpenXLA project broadly think are useful for showing in a shared dashboard.
- "" being a GitHub Actions workflow in the repository.
- "" running on postsubmit and posting statuses on GitHub.
- "" being available to trigger on presubmit.
- Auth questions around who can push to shared storage.
I think I'd like to see us start (or quickly adopt) a federated model where it's easy to adapt the end dashboard to pull from different data sources (including forking it into your own cloud project, if necessary). Then what makes it into "The Dashboard" is slightly less important. It seems still useful to have an agreed upon set that everyone thinks is important though.
The discussion of what makes the cut will need to be ongoing, but Google is mostly interested in tracking a certain set of models and configurations, so if Google's providing the compute and engineering resources, the set of models is likely to look quite a bit like that. At the point where someone else is saying "hey I'm generating this data how do I make it show up in the dashboard" I think it becomes mostly a community decision. I do think we should have some kind of filter though or we end up with something that's really unfocused. I would propose reproducibility and transparency as some of the criteria, for instance: if you want to include something on the "main" dashboard, then the code for executing it has to be open source and it has to be clear what the configuration. For inclusion as a GitHub action, we'd need stability as well. Adding webhooks so that others can trigger whatever they want should be easy. I've never really understood why GitHub's auth model makes it so that you can't "subscribe" to a repository to get webhooks for events in it (well you can for email, I guess...). We could consider creating a pub/sub feed or something to make this self-service.
For model selection, I think it should be about which models provide a useful signal of the overall performance of the compiler for a general class of models of interest. If someone is really interested in optimizing the crap out of some very specific models, that should be on their own dashboard (I can say that Google will be doing this 😛).
Co-authored-by: Geoffrey Martin-Noble <[email protected]>
Co-authored-by: Geoffrey Martin-Noble <[email protected]>
Co-authored-by: Geoffrey Martin-Noble <[email protected]>
Co-authored-by: Geoffrey Martin-Noble <[email protected]>
Co-authored-by: Geoffrey Martin-Noble <[email protected]>
| software versions (e.g. supported versions of OS Kernel, drivers, and | ||
| CUDA-libraries). | ||
|
|
||
| - CPU X86_64 |
There was a problem hiding this comment.
I saw on GPU benchmarks we clearly stats NVIDIA GPU (single-GPU setups). Do we also only consider single-CPU benchmarks in the initial focus set?
There was a problem hiding this comment.
Glancing through, I'm not seeing super material objections. I propose that we land and iterate on updates if needed. Having this as a draft PR makes it hard to build off of.
Maybe add a section at the end for ongoing discussion points so that we can capture them and iterate at head.
@stellaraccident I've added a section to the end, and linked to this PR for any minor discussions that may not have made it in there. Could you squash & merge this? I do not have write access. |
This is the subsequent RFC of the high-level benchmarking strategy for OpenXLA #75. It proposes to create a benchmark suite to fulfill the benchmarking requirements in the strategy.
Request for comments on our high-level benchmarking strategy for OpenXLA.