Repository navigation
[ET-VK][test] Move operator benchmark binaries under ops/benchmark - #23724
Closed
pytorchbot wants to merge 1 commit into
Closed
pytorchbot wants to merge 1 commit into
pytorchbot wants to merge 1 commit into
Conversation
Pull Request resolved: #23597 ## Ulterior Motive Restructure the Vulkan operator test+benchmark binaries around a single `etvk_benchmark` entry point with registered, per-operator test case sets, so related cases (such as a model's bottleneck shapes) can be grouped and run in isolation. ## Rationale **What**: Move the test+benchmark binaries, their shared utilities, and the test-only ops and shaders from `test/custom_ops/` into `test/ops/benchmark/`, with one subdirectory per operator under `cases/`, and split the monolithic `utils.{h,cpp}` by topic. **Why**: The flat `custom_ops/` directory mixes benchmark binaries, framework code, test-only ops, and correctness-only gtests, and `utils.{h,cpp}` (3.5k lines) mixes value specs, test cases, execution, and reporting. Grouping the binaries by operator gives the upcoming case-set registration a home for each operator's cases and reference code. ## Details - Layout under `test/ops/benchmark/` - `framework/`: test framework utilities, `conv2d_utils`, `cm_utils`, and `test_coopmat_probe`. - `test_ops/impl/` and `test_ops/glsl/`: test-only ops and shaders, formerly `impl/` and `glsl/`. - `cases/`: one directory per operator, `conv2d/` (direct, depthwise, pointwise), `conv1d/`, `q8csw_conv2d/`, `q4gsw_linear/` (including `test_fpa_q4gsw_linear` and `test_coopmat_linear_bench`), `q8csw_linear/`, `mm/`, `sdpa/`, `embedding_q4gsw/`, `choose_qparams_per_row/`, `add/`; `cases/q8ta/` collects the q8ta operators: `conv2d/`, `conv2d_transposed/`, `linear/`, `binary/`, `unary/`, `clone/`, `pixel_shuffle/`, `qdq/`. - `utils.{h,cpp}` split - `config`: global output and debugging options. - `labels.h`: test case naming helpers. - `value_spec`: `ValueSpec`, data generation, half-precision conversion, and `print_valuespec_data`. - `test_case`: `ReferenceKey`, the shader filter defaults, and `TestCase`. - `results`: `BenchmarkResult`, `TestResult`, and table printing. - `runner`: graph setup, `RepeatedGraphExecutor`, and `execute_test_case(s)`. - `weight_utils`: weight canvases and weight sum helpers. - `utils.h` includes all of the above, so binaries are unchanged. - Moving code into new files exposes it to CLANGTIDY, so its findings are fixed: braces around single-statement bodies, `explicit` on the single-argument `BenchmarkResult`, `TestResult`, and `TestCase` constructors, `const&` for the generator, reference, FLOP calculator, and `op_name` parameters, `utils::safe_downcast<int>` for one narrowing, `(void)` for an unused parameter, and `NOLINTNEXTLINE` on enum `switch`es that list only some enumerators (each has a `default`) and on the `using namespace vkcompute` that binaries rely on. `utils.h` no longer includes `<iostream>`. - Build - `test/ops/benchmark/{BUCK,targets.bzl}` define the binaries, `prototyping_utils`, `operator_implementations`, and `custom_ops_shaderlib`. Binary target names are unchanged; only the package path changes. - The CMake project and `build_and_run.sh` move with the binaries and take source paths from the new subdirectories. - The correctness-only gtests (`utils_test`, `q8ta_conv2d_route_test`, `q8ta_conv2d_stream_plan_test`) stay in `test/custom_ops/`; `utils_test` now depends on `prototyping_utils` in its new package. - Binaries include framework headers by full path (`executorch/backends/vulkan/test/ops/benchmark/framework/utils.h`). - CI references move to the new package: the GPU-host and Eureka Skycastle workflows, and the OSS `vulkan.yml` and `pull.yml` workflows. - Moved files are recorded as renames; the new `BUCK`/`targets.bzl` and the split framework files are recorded as copies. Binary sources, test cases, and test-only ops are otherwise unchanged. ghstack-source-id: 446951727 @exported-using-ghexport Differential Revision: [D123690842](https://our.internmc.facebook.com/intern/diff/D123690842/)
pytorchbot
requested review from
SS-JIA,
kirklandsign and
larryliu0820
as code owners
October 13, 2026 01:39
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23724
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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: #23597 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/666/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/666/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/660/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/666/orig
Differential Revision: D123690842
@diff-train-skip-merge