Repository navigation
[ET-VK][benchmark] Add JSON operator and shader benchmark cases - #24391
Merged
Merged
Conversation
Pull Request resolved: #24344 ## Ulterior Motive Replace C++ benchmark case definitions with JSON specifications. ## Rationale Introduce `etvk_ops_bench` with inline tensor arguments, deterministic initialization, dtype/storage and shader/workgroup sweeps, operator routes, independent CPU references, and registered throughput estimates. Generate host tensor data once per case and share it between the staged validation graph and a separate benchmark graph using automatic calibration. Select validation scope with `--validation_mode=all|first|none`, defaulting to all cases. Default to compact `json` reports; provide condensed tables and detailed `json_full` reports with per-batch GPU/operator samples and shader statistics. Record Android GPU clock start/end snapshots per measurement pass, adjacent to the corresponding batch timing arrays. Tables show observed minimum/maximum GPU clocks across each case and profiling-only ranges for shader rows. Document measurement boundaries, clock units, and shader percentile sampling. Migrate 64 sets into 4,560 definitions using production operators directly, without a dependency on the old benchmark directory. Keep quantized references, route checks, and scripts together. Case JSONs and reports omit `legacy_case`. Review framework parsing/execution/reporting first, then operator references/routes and JSON cases, then usage documentation. This remains one commit above the five runtime commits. Runtime-specific generator tests accompany their implementation; workgroup tests and their Buck target live in `test/api_abstractions/`. Benchmark validation also covers rejection of unrecognized SPIR-V capabilities before pipeline creation. Non-constant tensor inputs display their configured memory layout after the dtype; constant tensors omit this suffix because operator prepacking selects their GPU layout. `json` uses untruncated input strings, min/median/max batch timing summaries, and per-pass clock extrema. Float arguments and list elements in input strings use three significant figures. `json_full` preserves tensor descriptions and individual batch samples. Both retain shader timing statistics. The public README describes the binary, layout, JSON schema, validation, and timing. Internal helper scripts and Buck build instructions are documented under `fb/README.md`; migration documents and the TODO file are omitted. CI workflow integration will follow separately. Authored with Codex (AI). ghstack-source-id: 461636577 Differential Revision: [D128509578](https://our.internmc.facebook.com/intern/diff/D128509578/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24391
Note: Links to docs will display an error until the docs builds have been completed. ❌ 24 Pending, 6 Unclassified FailuresAs of commit cb0cf38 with merge base aed328d ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
SS-JIA
approved these changes
Oct 31, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #24344 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/678/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/678/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/677/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/678/orig
Differential Revision: D128509578
@diff-train-skip-merge