Skip to content

feat: move Workloads/ to a tag-addressed graph store (migration, --tag, s3:// source, Workloads removal) - #139

Merged
tvy-amd merged 12 commits into
mainfrom
fm/wft-s0
Nov 23, 2026
Merged

tvy-amd merged 12 commits into
mainfrom
fm/wft-s0

Conversation

@tvy-amd

@tvy-amd tvy-amd commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR replaces the Workloads/ DVC tarballs with a flat graph store: one JSON object per graph geometry, <sha256>.json, selected by the tags in its metadata. It has one commit per step, plus 9dc5487, which removes the S0 migration script again, and the unrelated CI changes listed below:

Commit Step Content
b5be84d and earlier S0 The one-time conversion of the 34 Workloads/ sets into store objects, with a measured dry run (below).
06c6311 D2 --tag KEY=VALUE on every graph source, -g s3://BUCKET/PREFIX/ as a graph source with a local cache, docs/graph-store.md.
7390b44 D3 Delete Workloads/, .dvc/, .dvcignore and applicability_results/; drop the DVC data step and the Workloads/** path triggers; tools/sdpa_fwd_to_bwd.py writes store objects; README and usage examples use tag queries.

This PR uploads nothing and writes nothing to S3. The store was populated separately with the migration output.

Merge order

Do not merge yet. Merge only when all are true:

  1. feat(results): schema 3 with a geometry-hash graph_id #138 (results schema 3) has merged. Schema 2 graph_id is the first 12 hex characters of the SHA-256 of the whole canonical graph JSON, name and metadata included, so a tag-only retag in the store changes the result id and breaks the join between runs; schema 3 graph_id is the geometry hash, which is the store key without .json.
  2. The store s3://therock-dvc/dnn-benchmarking-graphs/ is populated. Done: it holds the 22,787 objects of the migration (bucket versioning on). This PR itself writes nothing to S3.
  3. Every consumer that reads the Workloads/ pointers from this repository has switched to the store. After this PR, a ref at or after it has no pointers; refs before it still have them, and the old tarballs stay in S3.

Unrelated CI changes carried here

  • 0687346 ci(check-deserialize): setup_env.py ... --no-aiter. The check imports only hipdnn_frontend; the AITER stage fails on that runner (get_hip_version: ROCm version file not found, no /opt/rocm). The same line on main fails for any PR that triggers this workflow; this PR triggers it because D3 edits the workflow. check-deserialize now passes.
  • ba14813 test(integration): the pmc, trace and oracle integration tests now print each graph's status and message, each row's status and message, and the CLI stderr when no row succeeds.
  • e542165, 9cc9fef, 6aa938e: a temporary diagnostic step in the gfx950 job, removed again in f1dfa0a (no net change to setup.yml).

Known CI state

  • gpu-tests (gfx950, full suite) fails, not because of this PR. The same 3 tests fail on other open PRs since the ROCm nightly wheels moved from 10.3.0a20261120 (last green run of this branch) to 10.3.0a20261123, with the same rocm-libraries pin: test_profiling.py::test_pmc_basic_populates_counters, test_profiling.py::test_trace_records_pftrace_artifact, test_suite_execution.py::test_oracle_times_a_knob_built_plan. All three report no_engines: Failed to get ranked engine ids: No engine configurations available for the graph. for sample_conv_fwd.
    • Cause: setup_env.py builds the MIOpen provider from the pinned rocm-libraries (bfbd6d7, 2026-11-12) against the nightly MIOpen. In the nightly, the private MIOpen library exports miopenConvolution{Forward,BackwardData,BackwardWeights}GetWorkSpaceSizeRange only as ..._impl (ROCm/rocm-libraries fb4dff7b0d, 2026-11-19). The pinned provider's MiopenApiPrivateRename.hpp does not rename these three, so libmiopen_plugin.so fails to load with undefined symbol: miopenConvolutionForwardGetWorkSpaceSizeRange, and hipDNN silently loads only the hipBLASLt and hip-kernel providers. In a process that imports torch first, torch's public libMIOpen.so.1 supplies the symbols, which is why the in-process tests still pass.
    • Fix: move the rocm-libraries submodule pin to fb4dff7b0d or later. The dependabot bump to 4577381 (chore(deps): bump rocm-libraries from 4577381 to 28f91cf #142) removes these 3 failures, but there test_rocke_benchmark.py::test_rocke_rows_launch_hipdnn_kernels_and_match_pytorch fails instead: no rocke:attention_dense.* row, probably because ROCm/rocm-libraries 1423e5c928 (2026-11-19) collapsed the gfx950 dense attention catalog. That bump needs a rocKE catalog update in this repository as well.
    • This PR does not change the pin or rocKE. A separate PR fixes the gfx950 failure (pin bump plus the rocKE catalog update); its link follows.
  • setup (aws-windows-scale-rocm-prod, windows) stays pending: the Windows runner pool has an outage.

D2: --tag and the s3:// graph source

  • --tag KEY=VALUE, repeatable: AND across keys, OR within a key. It reads metadata.<KEY> (an array of tokens or one scalar, compared lowercase) and applies to every --graph source: files, directories, globs, tarballs and store URLs. Config key tags = ["KEY=VALUE", ...]. No match exits 1; a term without KEY=VALUE exits 2.
  • -g s3://BUCKET/PREFIX/: lists the prefix anonymously over HTTPS (ListObjectsV2, all pages), downloads only new or changed ETags into <work>/graph-store/<bucket>/<prefix>/ (16 worker threads, one HTTPS keep-alive connection each; connection errors, timeouts, 429 and 5xx retried up to 6 attempts with exponential backoff, 403/404 not retried; the ETag index is written every 500 downloads and when the sync stops, so a failed sync resumes), checks that each object hashes to its key (a mismatch is skipped with a warning and not cached), removes cached objects that the store no longer lists, and never writes to S3. Standard library only; HTTPS only. A malformed URL exits 2; a listing or download error exits 1. A config graphs entry s3://... stays a URL.
  • A local directory of store objects (the cache, or the --out folder of tools/sdpa_fwd_to_bwd.py) is an ordinary -g directory, so --tag works on it the same way. This is how the tests and the smoke run below use the dry-run objects.
  • src/dnn_benchmarking/graph/store.py holds the store rules once: object key, tag vocabulary, object validation, the object file format and the anonymous reads. While the migration script was on this branch, it used these rules and its dry-run output stayed byte-identical (22,787 files, diff -r clean, same report).
  • docs/graph-store.md: key rule, tag rules, vocabulary, the conditional-write upload procedure (If-None-Match: * for a new key; If-Match: <etag> with a tag union for an existing key; never delete to retag), and the tag query of each old Workloads/ set (including the models/ source and model). It says that the one-time migration was done outside the repository. docs/usage.md, README.md and the sample config document --tag, the store source, the cache and the exit codes.

D3: Workloads/ removal

  • Deleted Workloads/ (34 pointers and the corpus notes), .dvc/, .dvcignore, applicability_results/. The DVC use in setup_env.py (rocm-libraries provider descriptors) is a different repository and stays.
  • check-deserialize checks the checked-in graphs/ only: the DVC install, pull and tarball extraction steps are gone. No workflow has a Workloads/** path trigger.
  • tools/sdpa_fwd_to_bwd.py reads graph files, directories, globs or tarballs (usually the store copy) and writes <key>.json store objects into an empty --out folder, with store tags (workload=corpus, source=sdpa_fwd_to_bwd, operation, direction, dtype, layout, mode, phase, model, model_family) and notes (origin, attention_type, mask, sink). It takes the tag logic of data(workloads): conform workload metadata tags to the corpus convention; remove microbench/rocke #132's version of the tool. It skips inputs whose only source is sdpa_fwd_to_bwd (its own earlier outputs) and remakes them, and it validates every object before it writes.
  • README, docs/usage.md and the CLI epilog select graphs with --tag on the store.
  • tools/workloads_to_store.py and its tests are removed (9dc5487): the migration runs once, outside this repository. It read the pointers with git show <ref>:..., so it did not need Workloads/ in the tree; its full dry run ran from this branch after the deletion with the same result.

Verification

  • Unit tests: pytest tests/unit -m "not gpu": 2,134 passed, 11 skipped (CPU torch, Linux, after the script removal). New: tests/unit/graph/test_store.py (key, query semantics, sync pages, ETag reuse, retag, removal, hash mismatch, ignored names, errors) and tests/unit/cli/test_graph_selection.py (local store folder + tags, s3:// source + tags through main, config tags, exit 1 and 2 cases), with a fake bucket instead of the network. pre-commit run and bandit -lll -r src tools are clean.
  • Migration dry run from this branch at 7390b44, Workloads/ deleted: exit 0, 0 validation failures, 34 of 34 queries exact, 22,787 objects, byte-identical to the S0 dry run.
  • Store source, full size: the 22,787 dry-run objects served through a fake HTTPS listing (1,000-key pages) to dnn-benchmark -g s3://therock-dvc/dnn-benchmarking-graphs/: first run 22,787 downloaded in 19 s; second run 0 downloaded in 1.2 s. --tag workload=headline --tag operation=convolution selects 174 graphs and --tag workload=microbench --tag source=rocke --tag operation=convolution 32, the same as the conversion queries.
  • Real store, first sync from scratch (48b032d, dev host, empty work dir): 22,787 objects downloaded in 168 s wall time; the cache is byte-identical to the migration dry run. Second sync: 0 downloaded, listing only, 6 s. On the real cache, workload=headline selects 1,137, workload=headline operation=convolution 174, and workload=microbench source=rocke operation=convolution 32. (The first version of the sync failed on this store after about 437 s on one connection reset and kept no progress; 48b032d fixes that.)
  • Unit tests for the sync: retry then success (reset, timeout, 503, 429), retry exhaustion, no retry on 403/404, and resume after a failed sync.
  • -g s3://therock-dvc/dnn-benchmarking lists the old DVC prefix and ignores its non-key names.
  • tools/sdpa_fwd_to_bwd.py on the dry-run store: 4,789 objects (101 captured, 4,774 converted, 6 model specs), 0 validation problems, check_deserialize --level json 4,789 ok. Against the 4,790 source=sdpa_fwd_to_bwd objects of the migration: 4,789 equal keys with equal tags and notes, 0 extra, 1 missing, 64 different names. The missing one is the no-dropout copy of a headline backward graph (llama-3-8b-sft__..._idx35_..._bwd) that the old corpus held; it stays in the store through its bench_cases source. The names differ because a duplicate takes the first input's name.
  • check_deserialize --level json on the 22,787 dry-run objects: 22,787 ok, 131 DECODE (57 of them workload=corpus direction=bwd); README and the tool docstring now give these counts.

S0: migration (script not committed)

The migration script is not part of this PR: 9dc5487 removes it, because the conversion runs once. The facts below are its measured dry run. The script:

The script:

  1. Reads the Workloads/**/*.tar.gz.dvc pointers at --ref, downloads each tarball anonymously from the DVC remote, and checks its md5 and size. --archive SET=PATH@MD5 adds a set, or replaces the archive of a set, from a local file with a known md5.
  2. For each graph file: computes the key (sha256 of the canonical JSON without the top-level name and metadata), sets workload and source from the set, derives exactly one operation and the dtype from the graph (and direction when it is missing), normalizes the tags to sorted unique lowercase arrays, applies the model alias table, and moves keys outside the vocabulary into metadata.notes.
  3. Merges the copies of each key. The name comes from the highest-priority set (headline > corpus > microbench > models; ties go to the sorted set path, then the member path). Tags are combined. metadata.notes.sets lists every source set.
  4. Validates every object (key = geometry hash, vocabulary, non-empty name, at least one source tag, exactly one operation) and checks that each set's conversion query returns exactly that set. It stops on any failure and writes nothing.
  5. Writes the objects to --out (the dry run) and re-hashes a 1% sample.
  6. Only with --upload s3://BUCKET/PREFIX/: uploads every object with If-None-Match: *, 16 in parallel, then lists the prefix anonymously, checks the key count and re-hashes a 1% sample. This step was not run. The prefix name, write access and bucket versioning must be confirmed first.

Inputs

The base is the retagged graphs of #132 (branch fm/dnn-bench-workload-tags-v2, 47a598e): the 33 archives that its pointers reference, plus two archives that were prepared after its last push and are not in the DVC store yet:

Set md5 Change
microbench/rocke ce25ae2cd7346bebf7eeccb9247c085c (2,087 bytes) the 32 convolution graphs, put back (#132 removed the set)
microbench/cudnn_frontend 6b974fde3ba5e1c38f4f694c2ca05b6a (9,797 bytes) phase chunked_prefill -> prefill fix

The script reads these two by path and checks the md5. This PR does not commit archive bytes. Upload them to the DVC store, or attach them, before the real run.

Tag vocabulary

Key Values
workload headline, microbench, corpus, model, integration
source bench_cases, synthetic, hipblaslt, cudnn_frontend, aiter, aotriton, conv_sweep, cudnn_attention_inference, cudnn_attention_training, cudnn_bench_moe, cudnn_gemm, hipkittens, pytorch, rocke, hf_config, mad, brad_corpus, sdpa_fwd_to_bwd, integration_tests
tier quick, standard, full, comprehensive
operation convolution, sdpa, matmul, moe, norm, batchnorm, pointwise, reduction, resample, quantize. Exactly one value
direction fwd, bwd, dgrad, wgrad
dtype float32, float16, bfloat16, fp8_e4m3
layout nchw, nhwc, ncdhw, ndhwc, bshd, bhsd
mode training, inference
phase prefill, chunked_prefill, decode
model_family, model, use_case, capability, variant, priority, purpose, suite open lowercase tokens

metadata.notes holds free-form provenance and is not a tag.

operation: from #132's node-type values to one value

#132 tags one operation value per node type. The store keeps one value per graph, derived from the node types. The script stops if a #132 tag disagrees with the derived value.

#132 value(s) Store value Files Objects
convolution convolution 10,165 10,133
sdpa sdpa 10,030 9,763
matmul matmul 1,670 1,607
pointwise pointwise 331 330
rmsnorm norm 188 179
layernorm norm 172 172
batchnorm batchnorm 150 150
block_scale_quantize quantize 144 144
block_scale_dequantize quantize 144 144
moe_grouped_matmul + pointwise moe 77 66
moe_grouped_matmul moe 41 30
resample resample 34 34
reduction reduction 16 16
matmul + pointwise matmul 14 14
convolution + pointwise convolution 5 5

Rule for several node kinds: pointwise, quantize and reduction count only when the graph has no other operation. So the 96 multi-valued files (85 objects) resolve to their primary operation: moe (77 files), matmul (14) and convolution (5). Two primary operations, or an unknown node type, stop the migration (none in the data).

Other changes to #132's tags

Keys that change because of #132

#132 removed the top-level _comment key from 2,345 graphs: microbench/aiter 2,306, microbench/aotriton 32, models/gpt_oss 5, microbench/cudnn_frontend 2. _comment is part of the geometry hash, so these 2,345 graphs get new keys. Existing result history recorded under their old keys does not join the new objects. This is accepted; the migration does not restore _comment and does not record the old keys. Without _comment, the 5 models/gpt_oss graphs are equal to microbench/cudnn_attention_training graphs and merge with them. For every other graph, the key is the same as on main.

Dry run (measured)

Command:

python tools/workloads_to_store.py --ref origin/fm/dnn-bench-workload-tags-v2 \
    --cache /tmp/dvc-cache --out /tmp/store \
    --archive microbench/rocke=<path>@ce25ae2cd7346bebf7eeccb9247c085c \
    --archive microbench/cudnn_frontend=<path>@6b974fde3ba5e1c38f4f694c2ca05b6a

Result: exit 0, 0 validation failures, 34 of 34 conversion queries exact, 228 written objects (1%) re-hashed. Run time about 21 s.

Measure #132-based inputs main (for comparison)
Sets 34 34
Graph files 23,181 23,353
Objects 22,787 22,792
Keys with more than one copy 349 (394 redundant copies, at most 8 copies) 495 (561)
Keys whose copies have different names 209 209
Name taken from headline 1,137, corpus 14,382, microbench 7,210, models 58 headline 1,137, corpus 14,382, microbench 7,210, models 63
Objects with more than one workload / source 213 / 185 359 / 185
Size of all objects (indent=2) 67.3 MB

microbench/rocke has 32 files instead of 204, because #132 removed its SDPA copies of corpus/SDPA.

Per set and conversion query

The query uses AND across keys and OR within a key (|). Two kinds of query differ from the plain workload=<x>, source=<set> form:

Set Files Keys Same-set duplicates Query Extra Missing
corpus/Convolution 9471 9471 0 workload=corpus, operation=convolution 0 0
corpus/SDPA 164 164 0 workload=corpus, operation=sdpa, direction=fwd 0 0
corpus/SDPABackward 4790 4790 0 workload=corpus, operation=sdpa, direction=bwd 0 0
headline/attn 217 208 9 workload=headline, operation=sdpa 0 0
headline/bnorm 24 24 0 workload=headline, operation=batchnorm 0 0
headline/conv 179 174 5 workload=headline, operation=convolution 0 0
headline/hipblaslt 578 578 0 workload=headline, source=hipblaslt 0 0
headline/moe 165 123 42 `workload=headline, source=bench_cases, operation=moe matmul` 0
headline/norm 34 30 4 workload=headline, operation=norm 0 0
microbench/aiter 4988 4988 0 workload=microbench, source=aiter 0 0
microbench/aotriton 48 48 0 workload=microbench, source=aotriton 0 0
microbench/conv_sweep 429 402 27 workload=microbench, source=conv_sweep 0 0
microbench/cudnn_attention_inference 428 386 42 workload=microbench, source=cudnn_attention_inference 0 0
microbench/cudnn_attention_training 141 141 0 workload=microbench, source=cudnn_attention_training 0 0
microbench/cudnn_bench_moe 26 24 2 workload=microbench, source=cudnn_bench_moe 0 0
microbench/cudnn_frontend 49 49 0 workload=microbench, source=cudnn_frontend 0 0
microbench/cudnn_gemm 5 4 1 workload=microbench, source=cudnn_gemm 0 0
microbench/hipkittens 73 62 11 workload=microbench, source=hipkittens 0 0
microbench/pytorch 1200 1200 0 workload=microbench, source=pytorch 0 0
microbench/rocke 32 32 0 workload=microbench, source=rocke, operation=convolution 0 0
models/auto_regressive_dit 5 5 0 workload=model, source=cudnn_attention_training, model=auto_regressive_dit 0 0
models/dsv3 10 10 0 workload=model, source=cudnn_attention_training, model=deepseek_v3 0 0
models/glm_5_2_moe 20 20 0 workload=model, source=hf_config, model=glm5_2 0 0
models/gpt_oss 5 5 0 workload=model, source=cudnn_attention_training, model=gpt_oss 0 0
models/kimiK26 10 10 0 workload=model, source=cudnn_attention_training, model=kimi_k2_6 0 0
models/llama3.1 10 10 0 workload=model, source=cudnn_attention_training, model=llama3_1 0 0
models/ltx2 5 5 0 workload=model, source=cudnn_attention_training, model=ltx2 0 0
models/mad_llama3_1_8b_train 8 8 0 workload=model, source=mad, model=llama3_1_8b 0 0
models/qwen35 5 5 0 workload=model, source=cudnn_attention_training, model=qwen3_5 0 0
models/qwen3_235b_a22b_moe 15 15 0 workload=model, source=hf_config, model=qwen3_235b_a22b 0 0
models/qwen3_30b_a3b_moe 15 15 0 workload=model, source=hf_config, model=qwen3_30b_a3b 0 0
models/qwen3_32b 14 14 0 workload=model, source=hf_config, model=qwen3_32b 0 0
models/qwen3_8b 13 13 0 workload=model, source=hf_config, model=qwen3_8b 0 0
models/wan22_a14b 5 5 0 workload=model, source=cudnn_attention_training, model=wan2_2_a14b 0 0

Cross-set duplicates

Cross-set pairs with shared keys:

Set A Set B Shared
corpus/SDPABackward microbench/cudnn_attention_training 68
corpus/SDPABackward headline/attn 32
microbench/hipkittens microbench/pytorch 16
headline/hipblaslt microbench/aiter 14
corpus/SDPA headline/attn 11
microbench/cudnn_attention_training models/dsv3 10
microbench/cudnn_attention_training models/kimiK26 10
microbench/cudnn_attention_training models/llama3.1 10
headline/attn microbench/pytorch 5
microbench/cudnn_attention_training models/auto_regressive_dit 5
microbench/cudnn_attention_training models/gpt_oss 5
microbench/cudnn_attention_training models/ltx2 5
microbench/cudnn_attention_training models/qwen35 5
microbench/cudnn_attention_training models/wan22_a14b 5
headline/attn microbench/cudnn_attention_inference 4
microbench/aiter microbench/pytorch 4
microbench/cudnn_attention_inference microbench/pytorch 4
headline/attn models/qwen3_235b_a22b_moe 3
headline/attn models/qwen3_32b 3
headline/attn models/qwen3_8b 3
microbench/cudnn_attention_inference microbench/cudnn_attention_training 3
microbench/cudnn_attention_inference models/qwen35 3
microbench/cudnn_attention_inference models/qwen3_30b_a3b_moe 3
microbench/cudnn_attention_inference models/qwen3_32b 3
microbench/pytorch models/qwen3_30b_a3b_moe 3
corpus/SDPA microbench/cudnn_attention_inference 2
headline/attn microbench/aiter 2
microbench/aiter microbench/hipkittens 2
microbench/aiter models/qwen3_235b_a22b_moe 2
models/qwen3_235b_a22b_moe models/qwen3_8b 2
headline/hipblaslt microbench/hipkittens 1
headline/hipblaslt microbench/pytorch 1
headline/hipblaslt models/glm_5_2_moe 1
headline/hipblaslt models/qwen3_32b 1
headline/hipblaslt models/qwen3_8b 1
microbench/hipkittens models/qwen3_8b 1
models/glm_5_2_moe models/qwen3_8b 1
models/qwen3_235b_a22b_moe models/qwen3_30b_a3b_moe 1
models/qwen3_235b_a22b_moe models/qwen3_32b 1
models/qwen3_30b_a3b_moe models/qwen3_8b 1
models/qwen3_32b models/qwen3_8b 1

Tags on the 22,787 objects

Tags on the objects (objects per value):

  • direction on 22787 objects, 0 with more than one value: fwd 12583, bwd 4866, dgrad 2687, wgrad 2651
  • dtype on 22787 objects, 0 with more than one value: float16 10378, bfloat16 10125, float32 2278, fp8_e4m3 6
  • layout on 20057 objects, 0 with more than one value: bshd 9707, nchw 7508, nhwc 2788, bhsd 54
  • mode on 16069 objects, 291 with more than one value: training 12798, inference 3562
  • model on 22196 objects, 1500 with more than one value: synthetic 10914, yolo11 788, sd15_unet 775, sdxl_unet 756, maskrcnn_resnet50_fpn 669, retinanet_resnet50_fpn 640, hrnet_w32 624, mobilenet_v3_large 624, hifigan 588, efficientnet_v2_s 534, regnet_y_8gf 432, resnext50_32x4d 387, ... (126 values)
  • model_family on 22190 objects, 84 with more than one value: synthetic 10890, cls 3707, detection 1932, llm 1582, diffusion 1535, video3d 755, segmentation 665, audio1d 641, med3d 342, superres 186, multimodal 34, ssm 11
  • operation on 22787 objects, 0 with more than one value: convolution 10138, sdpa 9763, matmul 1621, norm 351, pointwise 330, quantize 288, batchnorm 150, moe 96, resample 34, reduction 16
  • phase on 9871 objects, 0 with more than one value: chunked_prefill 4599, prefill 4349, decode 923
  • priority on 331 objects, 14 with more than one value: p0 188, p1 142, p2 18
  • purpose on 331 objects, 18 with more than one value: acceptance 172, perf_diagnostic 127, frontier 28, ep_scaling 16, coverage_gap 12
  • source on 22787 objects, 185 with more than one value: brad_corpus 9471, aiter 4988, sdpa_fwd_to_bwd 4790, pytorch 1200, hipblaslt 578, bench_cases 505, conv_sweep 402, cudnn_attention_inference 386, rocke 196, cudnn_attention_training 141, cudnn_frontend 79, hf_config 70, ... (18 values)
  • suite on 331 objects, 14 with more than one value: regular 188, extended 157
  • workload on 22787 objects, 213 with more than one value: corpus 14425, microbench 7307, headline 1137, model 133

Keys in metadata.notes (objects):
attention_type 9763, convolution_type 10138, from_transpose 9471, mask 9763, origin 4790, sets 22787, sink 9763, size 9471, tensor_parallel 386

Tests (S0)

  • While the script was on this branch, its unit tests covered operation derivation, tag conversion, unmapped sets and contradicting tags, merge name priority and tag union, validation failures, the conversion query check, and pointers read at a ref after Workloads/ left the tree. They are removed with the script.
  • The upload path was exercised only with a stub S3 client in a throwaway script. Nothing was written to S3.

…migration

Add a one-shot script that converts the Workloads/ DVC tarballs into flat
graph-store objects, one <geometry_sha>.json per graph geometry, selected by
the tags in metadata.

- Read the .dvc pointers at a git ref, download each tarball anonymously,
  and check its md5 and size. --archive SET=PATH@MD5 supplies a local
  archive for a set.
- Set workload and source from the set, derive one operation, dtype and a
  missing direction from the graph, normalize the tags, apply the model
  alias table, and move keys outside the vocabulary to metadata.notes.
- Merge copies by key: headline > corpus > microbench > models for the name,
  union of tags, notes.sets lists every source set.
- Validate every object and check that each set's conversion query returns
  exactly that set. Stop on any failure.
- Write a local dry run and re-hash a 1% sample. --upload uploads with
  If-None-Match: * and verifies the prefix; it is off by default.
@tvy-amd
tvy-amd requested a review from a team as a code owner November 20, 2026 20:33
Pass usedforsecurity=False to hashlib.md5: the md5 checks DVC archive
integrity. Read every URL through one helper that rejects schemes other
than https.
--tag KEY=VALUE (repeatable) keeps the graphs whose metadata matches:
AND across keys, OR within a key. It applies to every --graph source and
to the config key tags.

-g s3://BUCKET/PREFIX/ lists the prefix anonymously over HTTPS, copies new
or changed objects (by ETag) into <work>/graph-store, checks that each
object hashes to its key, and never writes to S3. Standard library only.

graph/store.py holds the store rules: the object key, the tag vocabulary
and the anonymous reads. tools/workloads_to_store.py now uses them; its
dry-run output is byte-identical. docs/graph-store.md documents the rules
and the conditional-write upload procedure.
Delete Workloads/, .dvc/, .dvcignore and applicability_results/. The
graphs are objects in the graph store (docs/graph-store.md); the old
tarballs stay in S3, and tools/workloads_to_store.py still reads their
pointers from a pinned git ref.

check-deserialize checks the checked-in sample graphs only: the DVC pull
and tarball extraction steps are gone. No workflow has a Workloads/**
path trigger.

tools/sdpa_fwd_to_bwd.py reads graph files, directories or a store copy,
and writes flat tagged store objects (<key>.json) instead of a tarball.
It skips its own earlier outputs and remakes them.

README and usage examples select graphs with --tag on the store.
@tvy-amd tvy-amd changed the title feat(tools): add workloads_to_store.py, the Workloads to graph-store migration feat: move Workloads/ to a tag-addressed graph store (migration, --tag, s3:// source, Workloads removal) Nov 23, 2026
The Workloads/ to graph-store conversion runs once, outside this
repository. Delete tools/workloads_to_store.py and its tests.
docs/graph-store.md keeps the store rules, the upload procedure and the
tag query of each old Workloads/ set, now with the models/ mapping.
# Keys and tags


def geometry_key(graph: Mapping[str, Any]) -> str:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

geometry_key() ignores metadata, but the current result ID hashes the entire graph JSON. I checked a tag-only edit: the S3 key stayed the same, but the result ID changed, so two schema-2 runs no longer join on that graph. Is #138 intended to land before this PR? Could we record that dependency in the merge-order section?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes. #138 lands first, and I recorded it as item 1 of the merge-order section in the description. Schema 2 graph_id hashes the whole graph JSON, metadata included, so a tag-only retag changes the id; schema 3 graph_id is the geometry hash, which is the store key without .json (I checked: a retag of sample_conv_fwd changes the schema 2 id and keeps the store key).

The check imports only hipdnn_frontend. The AITER stage of setup_env.py
fails on this runner (no ROCm version file), so skip it with --no-aiter.
The pmc, trace and oracle integration tests failed on gfx950 with no
cause in the log. Their failure messages now carry each graph's status
and message, each row's status and message, and the CLI stderr.
Find which variable that cli.main sets makes hipDNN return no engine for
sample_conv_fwd on the 10.3.0a20261123 ROCm wheels. Reverted after the run.
It found the cause of the gfx950 failures: the MIOpen plugin built from
the pinned rocm-libraries does not load against the current ROCm nightly
(undefined miopenConvolution*GetWorkSpaceSizeRange), so hipDNN finds no
MIOpen engine.
A first sync of the real store failed on one connection reset and kept
no progress. Now:

- Each GET retries connection errors, timeouts, 429 and 5xx up to 6
  attempts with exponential backoff; 403, 404 and other statuses fail
  at once.
- Each worker thread keeps one HTTPS keep-alive connection instead of a
  new TLS connection per object.
- The ETag index is written every 500 downloads and when the sync
  stops, so the next sync downloads only what is missing or changed.

A first sync of the public store (22,787 objects) takes 168 s on a dev
host; the next sync lists only (6 s).
@tvy-amd
tvy-amd merged commit 25f3676 into main Nov 23, 2026
17 of 19 checks passed
@tvy-amd
tvy-amd deleted the fm/wft-s0 branch November 23, 2026 19:03
GarbyGilbertAMD added a commit that referenced this pull request Nov 23, 2026
Bring in the result schema version 3 (#138), the Workloads restructure
(#139) and #136. No conflicts.

ALMIOPEN-3178
tvy-amd added a commit that referenced this pull request Nov 23, 2026
…pen (#144)

## Summary

Bump the `rocm-libraries` submodule from `bfbd6d7` to `4577381`. This
fixes the three gfx950 GPU tests that fail on every PR since the ROCm
nightly `10.3.0a20261123`. This PR supersedes
#142 (the same bump from
dependabot, on an older `main`). This PR does not close it.

## Root cause

1. The `gpu-tests (gfx950, full suite)` job installs the latest ROCm
nightly. `10.3.0a20261120` was green. `10.3.0a20261123` is red.
2. The `10.3.0a20261123` MIOpen needs the `_impl` symbol renames from
rocm-libraries fb4dff7b0d (ROCm/rocm-libraries#16128).
3. The pinned `bfbd6d7` does not contain fb4dff7b0d. It builds
`libmiopen_plugin.so` without the renames.
4. The plugin does not load: undefined symbol
`miopenConvolutionForwardGetWorkSpaceSizeRange`. No MIOpen engines
exist.
5. Three tests need `MIOPEN_ENGINE` rows and fail:
-
`tests/integration/test_profiling.py::test_pmc_basic_populates_counters`
-
`tests/integration/test_profiling.py::test_trace_records_pftrace_artifact`
-
`tests/integration/test_suite_execution.py::test_oracle_times_a_knob_built_plan`

## The bump

`4577381` is the commit that dependabot proposes. It contains
fb4dff7b0d. The smallest commit that contains fb4dff7b0d is fb4dff7b0d
itself. I did not use it for these reasons:

- It also contains 1423e5c928 (below), so it needs the same rocKE
handling.
- The #142 CI run already
shows that `4577381` clears the three MIOpen tests on gfx950.

## rocKE: `test_rocke_rows_launch_hipdnn_kernels_and_match_pytorch`

On #142, this test fails on
gfx950. The run has only the auto row and no `rocke:attention_dense.*`
row:

```
AssertionError: ['rocke:auto:rocke_attention_unified_2d_fp16_hd128_bs16_gqa32x8_tl']
```

- **Cause:** rocm-libraries 1423e5c928 (ROCm/rocm-libraries#14901) is in
the bump range. It collapses the gfx950 dense attention catalog from 840
descriptors to 52. The descriptor metadata no longer has
`num_query_heads` or `num_kv_heads` (at `4577381`,
`gfx950_attention_dense.yaml` records `dtype, head_size, causal, ragged,
sliding_window, batch, seqlen_q, seqlen_kv, block_m, block_n`). The old
`rocke_sdpa.catalog_kernels` compared the missing head counts with the
graph's head counts, so no variant matched. The `assert session.catalog`
line passed, so the descriptors loaded.
- **Fix:** already on `main` in
#136. The catalog compares
head counts only when the descriptor records them, and puts the graph's
head counts into the spec. Dependabot's branch starts at `e31db1d`,
which is before that fix. This branch starts at the current `main`, so
it has the fix.
- **Check without a GPU:** I made the 24 D128 catalog entries of the
`4577381` manifest with their recorded metadata. Then I ran
`catalog_kernels` on the test's graph (fp16, causal, B1, Hq 32, Hkv 8, S
512, D 128) with the `4577381` rocKE package:
- `rocke_sdpa.py` at `e31db1d` (the base of
#142): 0 variants. This is
the CI failure.
- `rocke_sdpa.py` on this branch: 6 variants
(`attention_dense.fp16_d128_c1_bm{128,256}_bn{32,64,128}.gfx950`), each
with heads 32/8.

Other rocKE changes in the range: `Gfx950AttentionDenseSpec` only adds
an optional `kv_storage_dtype` field, with `None` as the default. The
kernel argument names do not change.

## Documentation

- `docs/usage.md`: the `rocke:<variant>` name example has no
`_hq.._kv..` segment, as in the new descriptors.
- `docs/methodology.md`: name the new pin. `4630e167ce1` is in the
history of `4577381`, so the statement is still true.
- Merge of `main`: `main` deleted `Workloads/` in
#139. This branch only
changed the pin in `Workloads/corpus/SDPABackward/Explanation.md`, so
the merge accepts the deletion.

## Verification

- `pytest tests/unit -m "not gpu"` (CPU torch): 2178 passed, 17 skipped
(after the merge of `main`).
- `tests/unit/execution/test_rocke_sdpa.py` and `test_rocke_executor.py`
with the `4577381` rocKE package on `PYTHONPATH`: 48 passed. Without the
package, 14 of these tests skip.
- `pre-commit run --all-files`: passed.
- GPU: this host has no GPU. The `gpu-tests (gfx950, full suite)` job of
this PR gives the GPU proof.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants