Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

[RFC] Benchmarking Strategy - #75

Merged
stellaraccident merged 16 commits into
openxla:mainfrom
reichlfl:benchmarking-strategy-rfc
May 30, 2023
Merged

stellaraccident merged 16 commits into
openxla:mainfrom
reichlfl:benchmarking-strategy-rfc

Conversation

@reichlfl

@reichlfl reichlfl commented May 5, 2023

Copy link
Copy Markdown
Contributor

Request for comments on our high-level benchmarking strategy for OpenXLA.

@reichlfl
reichlfl marked this pull request as ready for review May 5, 2023 09:16
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
* **[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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@julianwa julianwa May 5, 2023 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@julianwa julianwa May 5, 2023 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, 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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to comparative benchmarking with my comment above. Agree for regression benchmarks.

Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
* 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@julianwa julianwa May 5, 2023 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. What Google, specifically, wants to invest time into maintaining.
  2. What other contributors want to invest time into maintaining.
  3. What Google is willing to provide GCP resources for.
  4. What other contributors are willing to provide compute resources for.
  5. What models/architectures/configurations the members of the OpenXLA project broadly think are useful for showing in a shared dashboard.
  6. "" being a GitHub Actions workflow in the repository.
  7. "" running on postsubmit and posting statuses on GitHub.
  8. "" being available to trigger on presubmit.
  9. 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 😛).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated

![Separation of execution, storage and analytics](20230505-benchmarking-strategy/execution-storage-analytics.png)

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar nit to the "1P / 3P" phrasing - is "OSS" useful to include here (presumably standing for "Open Source "Software")?

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
* 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 jpienaar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this coming up!

Comment thread rfcs/20230505-benchmarking-strategy.md Outdated

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wall-time of model execution?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify what you mean by this comment?

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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?

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@julianwa julianwa May 8, 2023 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some differences with micro-benchmarks compared to the framework-level and compiler-level benchmarks:

  1. We want to be able to support parameterized sweeps over micro-benchmarks, and corpuses of explicit micro-benchmarks.
  2. 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.
  3. 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpienaar Do you think this needs to be clarified in the doc?

Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
* 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated

![Separation of execution, storage and analytics](20230505-benchmarking-strategy/execution-storage-analytics.png)

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just OBI? Or OpenXLA Community Benchmarking Infra.

reichlfl added 4 commits May 8, 2023 08:27
* 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
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
reichlfl added 2 commits May 15, 2023 07:43
* Added requirement to store generated artifacts
* Moved PT/TorchInductor to P0
* Aded param counts to models
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Resolved
Comment thread rfcs/20230505-benchmarking-strategy.md Outdated
* 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. What Google, specifically, wants to invest time into maintaining.
  2. What other contributors want to invest time into maintaining.
  3. What Google is willing to provide GCP resources for.
  4. What other contributors are willing to provide compute resources for.
  5. What models/architectures/configurations the members of the OpenXLA project broadly think are useful for showing in a shared dashboard.
  6. "" being a GitHub Actions workflow in the repository.
  7. "" running on postsubmit and posting statuses on GitHub.
  8. "" being available to trigger on presubmit.
  9. 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 😛).

reichlfl and others added 5 commits May 24, 2023 16:29
software versions (e.g. supported versions of OS Kernel, drivers, and
CUDA-libraries).

- CPU X86_64

@pzread pzread May 24, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@stellaraccident
stellaraccident self-requested a review May 26, 2023 02:52

@stellaraccident stellaraccident left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@reichlfl

Copy link
Copy Markdown
Contributor Author

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.

@stellaraccident
stellaraccident merged commit 2ff5020 into openxla:main May 30, 2023
GMNGeoffrey pushed a commit that referenced this pull request May 31, 2023
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.
@jpienaar jpienaar mentioned this pull request Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.