Files
metal2vulkan/crates/metal2vulkan-conformance/recordings/function-facts-visible.json
T
Anees Iqbal a6c58e923f Re-record the conformance cost records under record at the call
The M3 Max's and MoltenVK's cost records re-recorded under recording at the call's counts.

One work packet, landed as 3 commits on archive/development-linear-2026-10-29, in order:

* Re-record the conformance cost records on the M3 Max after recording at the call (5556145b53)

Since 6c9d1f4551 `commands_recorded` counts each command at its call across
every command buffer, the scheduler's barrier buffers and primaries begun
ahead included, and the deferred-replay counts (`command_buffers_deferred`,
`command_buffers_replayed`, `command_buffers_replayed_inline`) are gone. The
MoltenVK cost records still held begin/end/barrier bounds from the old,
narrower count, so a replay read them over.

Gate rules first (cost.rs's reported-never-gated table), from replays of
eight-round whole-set measurements that went over on counts that say when a
thread ran or how long the driver took, not what a case did:
- `submit_stalls_on_work` / `submit_stalls_idle` (ELAPSED: a 2 ms threshold;
  moved in 160 cases across the measurement's rounds);
- the seven `heads_held_for_*`, `heads_waiting_at_their_gate`,
  `heads_awaiting_check_signals`, `batches_held_past_a_look` (LOOKS: counted
  at every look of the scheduler's thread; moved in 119 and 51 cases);
- `commands_recorded.begin_command_buffer` (BEGUN: counts the primaries a
  completion thread begins ahead, the race `primaries_begun_ahead` is
  reported for; moved in 238 cases). `command_buffers_begun`, the case's own
  begins, stays gated.

Re-recorded on Apple M3 Max (macOS 27.0.1, MoltenVK 1.4.2), debug build,
through the FIFO Mac GPU lock and memcap.sh:
- `conformance cost --runs 8 --write`, the whole set (1,122 cases: 1,112
  measured, 10 the venue's recorded refusals), one lock hold; taken three
  times as the rules moved (10m40s, 10m49s, 14m23s); these are the third.
- `conformance cost --alone --runs 8 --write` over every case (every stored
  alone reading of `commands_recorded.*` was of the old count): 29 holds of
  40 cases, 898 s held, the longest 78 s.
Bounds: `end_command_buffer` rose in 784 records, `cmd_pipeline_barrier` in
751; the three removed counts left every record. Composed counts 11,480 ->
14,425; every record that holds bounds carries its contrast. The README no
longer names `command_buffers_deferred` as a gated total.

Verified: conformance `cost::` tests 10/10, suite 1007/1007; two whole-set
replays on the committed records: 1,112 within, 10 unmeasured, 0 over (the
replay still exits 1 on six 4:2:2 chroma-pair cases announcing
`decoded-texel-precision` undeclared, from 2f033d3002, not this change).

* Re-pin the runtime sources at the landing tip (34dc77a098)

* Re-record conformance's MoltenVK cost records under record at the call (38da32e606)

Record at the call counts every command buffer in WorkCounts::commands_recorded
(the scheduler's barrier buffers and primaries begun ahead included), and
the round's landings moved other counts (object churn, scheduler passes and
wakes). The records' bounds dated from the earlier counts, so replay read
them as over.

Recorded at 60c300198f on the M3 Max (MoltenVK 1.4.2) by
~/.cache/m2v-orch/recdiff-2026-10-29/costrr.sh: the whole set with
`conformance cost --runs 8 --write` in one GPU-lock hold (exit 0, 337 s), then
the contrast `cost --alone --runs 8 --write` in a second (exit 0, 781 s).
1,122 cases: 1,112 measured, 10 the venue cannot measure, each written down
with its reason. 896 recordings changed.
2026-10-29 15:43:52 +02:00

361 lines
11 KiB
JSON

{
"format": 1,
"case": "function-facts-visible",
"suite_version": 1,
"shaders": [
{
"fixture": "visible_table_functions.ll",
"entry": "table_add",
"source_sha256": "f8484e8c7fa3e0eeb3b812a22ffd727068cd811109a23e29363e0eff535470f0"
},
{
"fixture": "visible_table_functions.air.ll",
"entry": "table_add",
"source_sha256": "3f009dfc20260ffbd454841e8c4c5a1a3c6d4eb0bb317f9eecd5be1e25eb1483"
}
],
"answers": [
{
"key": {
"chip": "apple-m3-max",
"os_version": "27.0.1",
"os_build": "26A434",
"metal_level": "27.0.1"
},
"provenance": "metal_run",
"device": "Apple M3 Max",
"runs": 3,
"outcomes": [
{
"runs": 3,
"transcript": {
"root": {
"name": "case",
"observed": {
"value": "absent"
},
"children": [
{
"name": "inputs",
"observed": {
"value": "absent"
},
"children": [
{
"name": "air",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "f8484e8c7fa3e0eeb3b812a22ffd727068cd811109a23e29363e0eff535470f0"
}
}
},
{
"name": "air-typed",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "3f009dfc20260ffbd454841e8c4c5a1a3c6d4eb0bb317f9eecd5be1e25eb1483"
}
}
},
{
"name": "entry",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "a1c9c5a3498fc46cd8ef0ab27e959a23fb376c7896d09893ce672c4865aea410"
}
}
},
{
"name": "constants",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
}
}
]
},
{
"name": "library",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "facts",
"observed": {
"value": "absent"
},
"children": [
{
"name": "name",
"observed": {
"value": {
"lines": [
"table_add"
]
}
}
},
{
"name": "function_type",
"observed": {
"value": {
"fields": {
"name": {
"lines": [
"MTLFunctionTypeVisible"
]
},
"raw": {
"uint": 5
}
}
}
}
},
{
"name": "patch_type",
"observed": {
"value": {
"fields": {
"name": {
"lines": [
"MTLPatchTypeNone"
]
},
"raw": {
"uint": 0
}
}
}
}
},
{
"name": "patch_control_point_count",
"observed": {
"value": {
"variant": {
"name": "None",
"payload": "absent"
}
}
}
},
{
"name": "options",
"observed": {
"value": {
"fields": {
"names": {
"set": []
},
"raw": {
"uint": 0
}
}
}
}
},
{
"name": "device",
"observed": {
"value": {
"bool": true
}
}
},
{
"name": "vertex_attributes",
"observed": {
"value": {
"variant": {
"name": "None",
"payload": "absent"
}
}
}
},
{
"name": "stage_input_attributes",
"observed": {
"value": {
"variant": {
"name": "None",
"payload": "absent"
}
}
}
},
{
"name": "function_constants",
"observed": {
"value": "absent"
},
"children": [
{
"name": "count",
"observed": {
"value": {
"uint": 0
}
}
}
]
}
]
},
{
"name": "notices",
"observed": {
"value": "absent"
},
"children": [
{
"name": "set",
"observed": {
"value": {
"nothing": "announced_nothing"
}
}
},
{
"name": "counts",
"observed": {
"value": {
"fields": {}
}
}
}
]
}
]
}
}
}
],
"validated": "ran"
}
],
"costs": [
{
"venue": "Apple M3 Max",
"runs": 8,
"measured": "8 run(s) of the whole selection on Apple M3 Max, in the case set's own order, the largest each count reached",
"contrasted": "8 run(s) of each case on its own on Apple M3 Max, nothing before it on the device, the largest each count reached",
"bounds": {}
}
],
"times": [
{
"leg": "metal",
"venue": "native Metal",
"chip": "apple-m3-max",
"os_build": "26A434",
"rounds": 8,
"measured": "8 round(s) of the whole selection, in the case set's own order, each round on a fresh device, our shader cache carried over between the cases of a round; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 3.18 and ours at 2.63; the legs run one after the other, so the per-call margin is judged only when both are 26.0 or under and within 2.0x of each other",
"instrument": 236,
"times": {
"case": "function-facts-visible",
"calls": 2,
"in_calls": 22019541,
"on_cpu": 600666,
"blocked": 21405208,
"elsewhere": 2958,
"spend": 22022957,
"spend_least": 21438834,
"spend_most": 25991667,
"per_call": [
{
"call": "function_facts",
"least_calls": 1,
"most_calls": 1,
"wall": 6708,
"on_cpu": 6875,
"blocked": 0,
"wall_least": 6167,
"wall_most": 9000,
"wall_total": 6708,
"on_cpu_total": 6875,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 22012791,
"on_cpu": 594208,
"blocked": 21405208,
"wall_least": 21427583,
"wall_most": 25980750,
"wall_total": 22012791,
"on_cpu_total": 594208,
"blocked_total": 21405208
}
]
}
},
{
"leg": "ours",
"venue": "Apple M3 Max",
"chip": "apple-m3-max",
"os_build": "26A434",
"rounds": 8,
"measured": "8 round(s) of the whole selection, in the case set's own order, each round on a fresh device, our shader cache carried over between the cases of a round; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 3.18 and ours at 2.63; the legs run one after the other, so the per-call margin is judged only when both are 26.0 or under and within 2.0x of each other",
"instrument": 233,
"times": {
"case": "function-facts-visible",
"calls": 2,
"in_calls": 75083,
"on_cpu": 75625,
"blocked": 0,
"elsewhere": 291,
"spend": 75374,
"spend_least": 72834,
"spend_most": 106458,
"per_call": [
{
"call": "function_facts",
"least_calls": 1,
"most_calls": 1,
"wall": 1417,
"on_cpu": 1542,
"blocked": 0,
"wall_least": 1166,
"wall_most": 2291,
"wall_total": 1417,
"on_cpu_total": 1542,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 73792,
"on_cpu": 74209,
"blocked": 0,
"wall_least": 71417,
"wall_most": 103750,
"wall_total": 73792,
"on_cpu_total": 74209,
"blocked_total": 0
}
]
}
}
]
}