[AIROCMLIR-560] Implement per-problem narrowing in the quick-tuning DB#2361
Draft
mirza-halilcevic wants to merge 1 commit intodevelopfrom
Draft
[AIROCMLIR-560] Implement per-problem narrowing in the quick-tuning DB#2361mirza-halilcevic wants to merge 1 commit intodevelopfrom
mirza-halilcevic wants to merge 1 commit intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures Rock’s quick-tuning “DB” into a curated QuickTuningDb with optional per-problem narrowing (via a problem-key hash) and a configurable cap (ROCMLIR_QUICK_TUNING_LIST_MAX) to reduce compile-time spent sweeping large perfconfig lists.
Changes:
- Introduces
QuickTuningDb+ runtime problem-key hashing (xxh3_64) to optionally narrow perfconfig sweeps to a per-problem subset. - Threads an optional
problemKeyHashthrough quick-tuning plumbing so both compile-time selection and tuning sweeps can benefit. - Migrates the perfconfig data into per-(arch, op, dtype) auto-generated
.incshards, and adds C++/Python goldens + DB invariant tests.
Reviewed changes
Copilot reviewed 121 out of 122 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mlir/utils/performance/tests/test_quickTuningGen.py | Adds pytest goldens for problem-key formatting, bool-cast behavior at ingest, and pinned xxh3_64 hashes. |
| mlir/unittests/Dialect/Rock/ParamLookupTableTests.cpp | Removes legacy ParamLookupTable fallback-policy tests (superseded by QuickTuningDb tests). |
| mlir/unittests/Dialect/Rock/CMakeLists.txt | Switches unit tests to QuickTuningDbTests.cpp and adds MLIRParser for parsing MLIR test snippets. |
| mlir/unittests/Dialect/Rock/QuickTuningDbTests.cpp | Adds gtests for DB invariants, resolveKey fallback policy, and problem-key hash goldens. |
| mlir/lib/Dialect/Rock/Tuning/RockTuningImpl.cpp | Threads problemKeyHash into quick tuning range creation so tuning sweeps can narrow lists too. |
| mlir/lib/Dialect/Rock/Tuning/GridwiseGemmParams.cpp | Populates PopulateParamsInfo::problemKeyHash from the op (when computable). |
| mlir/lib/Dialect/Rock/Tuning/GridwiseGemmGemmParams.cpp | Switches GemmGemm quick-tuning lookup to QuickTuningDb and computes optional problem hash. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb.cpp | Implements key resolution + lookup (including per-problem selection + list cap). |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningProblemKey.cpp | Implements op→problem-key string formatting and xxh3_64 hashing to match Python generator. |
| mlir/lib/Dialect/Rock/Tuning/CMakeLists.txt | Replaces ParamLookupTable sources with QuickTuningDb sources; generates QuickTuningDb.inc by globbing/sorting per-key .inc files. |
| mlir/lib/Dialect/Rock/Tuning/ParamLookupTable.cpp | Removes legacy ParamLookupTable implementation. |
| mlir/include/mlir/Dialect/Rock/Tuning/QuickTuningDb.h | Adds the public QuickTuningDb API (lookup/resolveKey/problem hashing + invariants for tests). |
| mlir/include/mlir/Dialect/Rock/Tuning/ParamLookupTable.h | Removes legacy ParamLookupTable API. |
| mlir/include/mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc | Removes the previous monolithic quick-tuning perfconfig include. |
| mlir/include/mlir/Dialect/Rock/Tuning/GridwiseGemmParams.h | Switches tuning parameter plumbing to QuickTuningDb and adds problemKeyHash to PopulateParamsInfo. |
| mlir/include/mlir/Dialect/Rock/Tuning/GridwiseGemmGemmParams.h | Switches GemmGemm tuning to QuickTuningDb. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000ConvFp8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000GemmFp8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1000GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1100GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1101AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1101AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1101AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1103GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1150GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1151GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1152GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx1201GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx900AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx900AttentionF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx900ConvFp8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx900GemmFp8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908AttentionF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx908GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aAttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aAttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aAttentionF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aAttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aGemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aGemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx90aGemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942AttentionF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942GemmI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950AttentionBf16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950AttentionF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950AttentionF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950AttentionI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950ConvF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950ConvF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950ConvI8.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950GemmF16.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950GemmF32.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950GemmFp4.inc | Auto-generated per-key set-cover shard. |
| mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx950GemmI8.inc | Auto-generated per-key set-cover shard. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+237
to
+240
| auto mismatchNext = | ||
| std::mismatch(target.begin(), target.end(), itKey.begin()); | ||
| auto mismatchPrev = | ||
| std::mismatch(target.begin(), target.end(), prevKey.begin()); |
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.
Motivation
Quick-tuning compile time was dominated by the size of the perfconfig list we swept for each kernel. We previously sent the entire per-(arch, op, dtype) set-cover at every kernel, even when the problem at hand was already represented in our tuning campaigns and a much smaller subset would have sufficed.
This PR addresses that on two fronts:
ROCMLIR_QUICK_TUNING_LIST_MAX(default 30). The set-cover is already sorted by descending coverage count, so head-truncating preserves the configs that win on the most problems; statistically the right tradeoff when we have no problem-specific signal.The branch also lands a few quality-of-life cleanups around the quick-tuning plumbing that were prerequisites for the per-problem mapping.
The existing quick-tune lists were migrated to the new per-key
.incformat in this PR; the migration carries the set-covers only and does not include problem maps. Regenerating the lists with problem maps populated will land in a follow-up. Until then, all entries take the unknown-problem path (full set-cover, capped toROCMLIR_QUICK_TUNING_LIST_MAX).Technical Details
Quick-tuning DB layout
.incfile per(arch, op, dtype)key (mlir/lib/Dialect/Rock/Tuning/QuickTuningDb/Gfx942ConvF16.inc, etc.). The previous monolithicQuickTuningPerfconfigs.incis gone. CMake globs the per-key files in sorted order and generates a singleQuickTuningDb.incthat the lookup TU includes twice (once withQUICK_TUNING_DB_ARRAYSto emit the static arrays, once withQUICK_TUNING_DB_ENTRIESto emit the table initializer). Sorted filenames ↔ sorted snake_case keys, which is the precondition the binary-search lookup relies on.ParamLookupTable→QuickTuningDb, restructured from a class into a namespace. The semantics (lookup-by-key with arch-family fallback) are now closer to a curated database than a generic param table, and the new name reflects that. Private helpers moved into anonymous namespaces in the cpp.quickTuningGen.pyauto-detects op type from the input.debugheaders (Chipcolumn for arch, dataframe columns for op). One invocation now handles a mixed bag of gemm/conv/attention runs without per-op flags.The problem map
Each table entry has the shape:
A
ProblemRefis a (hash, offset, count) triple. To answer "what configs should we sweep for this problem?" we:(arch, op, dtype, isAccel)via binary-search with arch-family fallback (e.g.gfx940 → gfx942,bf16 → f16).problemMapfor the hash. On hit, takeindices[offset .. offset+count)and gather those positions out ofsetCover. On miss, fall back to the full set-cover.ROCMLIR_QUICK_TUNING_LIST_MAX(default 30).The flat-
indiceslayout means a single.inccarries one set-cover plus a compact per-problem index ribbon; no duplicated config strings, no per-problem allocations.Problem keys
The on-disk hashes are
xxh3_64of a'_'-joined column tuple. Python is the authoritative producer (quickTuningGen.py:make_problem_key/hash_problem_key); C++ rebuilds the same byte sequence at runtime so the hashes line up:intat DataFrame ingest, so the wire format is0/1(wasTrue/False). C++ mirrors this inQuickTuningProblemKey.cpp.*_COLUMNSconstants in the generator (GEMM_COLUMNS,CONV_COLUMNS,ATTENTION_COLUMNS).mlir/utils/performance/tests/test_quickTuningGen.pyandmlir/unittests/Dialect/Rock/QuickTuningDbTests.cpp. Drift on either side fails both suites.Wiring on the consumer side
PopulateParamsInfocarries an optionalproblemKeyHash, populated viaQuickTuningDb::computeProblemKeyHash(op)(returnsFailureOr<uint64_t>).PopulateParams,PopulateParamsXDL,PopulateParamsWmma, andPopulateParamsGemmGemmthread the hash intoQuickTuningDb::lookup.RockTuningImpl::createGemmTuningRangeQuickdoes the same in the tuning sweep, so tuning runs also benefit from the narrowing.Test Plan
QuickTuningDbTestscovers DB invariants (sorted by key, per-entry problem maps sorted by hash),resolveKeyfallback policy (exact / older-relative / younger-relative / equidistant tiebreak / non-accel →gfx1*+f32/bf16→f16), and per-op problem-key goldens for gemm/conv/attention.test_quickTuningGen.pycoversmake_problem_keyformat, the bool-cast at ingest, and golden hashes shared with the C++ side.Test Result
Submission Checklist