Files
metal2vulkan/crates/metal2vulkan-conformance/recordings/function-facts-mesh.json
T
Anees Iqbal c9a2347fa6 Re-bless the conformance cost records on the M3 Max at 2b55ab415e, four ICB/mesh cases withheld
What: the M3 Max cost records of the whole case set re-measured on this tree (2b55ab415e: the
compressed-extended-range scratch fix 2b5f0731c5 and the no-copy look fix 36ec3efc81 in), debug
build, MoltenVK 1.4.2: `conformance cost --runs 8 --write` over the whole set (1123 cases, 1114
measured, 9 stopped), then `conformance cost --runs 8 --alone --write` over the 820 cases whose
record gained a bound or a record, so every new bound carries its contrast. The draws class's
ceiling in cost::the_creation_prediction rises 45 -> 47 (below), with its table re-read from these
files. AFTER_THE_LAST_RUN names no case and stays empty.

Four cases keep their committed recordings, whole files, new counters and all, because their
gated rises came with stack18's indirect-command-buffer and host-step commits and are not yet
explained: indirect-mesh-commands-object-threadgroup-lengths, mesh-commands-unordered-draws,
mesh-commands-own-state and indirect-render-commands-inherited-state. A `cost --check` on this tree
reads `over` on exactly those four until their cause is fixed or shown to be required and their
records are written in a follow-up.

Differences of this commit's records from the ones they replace, as `cost --check` counts them
(cost::drift of each committed record against this write, before the contrast): 1522 over 558
cases, 45 of them numbers the gate reads.
- 1452 counts newly gated (the counters the old records predate: heap_tables_worked_out in 551
  cases, resident_textures_looked_at 320, dispatch_shapes_made 293, host_steps_recorded 155,
  dispatch_used_resources_listed 47, and others); 25 no longer gated.
- 43 gated bounds moved: 16 fell (bound_notices_made in 14 cases, no_copy_lies_read in two) and
  27 rose. 2 pipelines-per-state ratios rose.

Each rise, bisected with each case alone (`cost --runs 8 --show`, debug builds, one selection at
every candidate commit):
- compressed-blits-bgra10xr and -srgb: command_barriers 5 -> 24, cmd_copy_buffer_to_image
  7 -> 12, cmd_copy_image_to_buffer 6 -> 11, cmd_pipeline_barrier 18 -> 37. 4b194d24af (452c17aa2c
  reads the old figures, 4b194d24af the new ones): under the suite's exact policy
  (ExtendedRangeBlitPolicy::Canonical) each blit into such an image is rewritten in Metal's
  encoding through a scratch copy out, one dispatch a region and a copy back, and each blit out
  into a buffer takes one dispatch. Required for Metal's bytes. 4b194d24af also zeroed that scratch
  in a first-work command buffer of its own (command buffers 11 -> 14, cmd_copy_buffer 2 -> 7,
  7 more barriers), which 2b5f0731c5 removed. Those counts are back at their old bounds.
- xr-draw-bgra10xr-{half,float} and -srgb-{half,float}: cmd_bind_descriptor_sets, cmd_bind_pipeline
  and cmd_push_constants 1 -> 2. xr-clear-routes-bgra10xr and -srgb: the same three 4 -> 12.
  4b194d24af: each blit out of a compressed BGRA10_XR target into a buffer takes one dispatch of
  the canonical encoding (1 and 8 of them). Required for Metal's bytes.
- host-page-writes-kernel-store-read-only: no_copy_lies_read 21 -> 23 (-visibility-read-only and
  -writable fell 18 -> 17). 442a9fd538 and 3fd1f6672b each added a look at a new no-copy buffer's
  pages, which 36ec3efc81 removed. a4546da224 adds 3 looks per dispatch that binds one, in its
  debug-build checks of the kept compute bind state (compute/live.rs, under debug_assertions):
  the case alone reads 22 on a release build of abd5f64c55 and 25 on its debug build. A debug-only
  artifact of the measurement, no product work.
- pixel-samplers-rgba8-linear-edge: pipelines per state 1/3 -> 2/3. 575ac2b103 (its parent
  6c294fe742 reads 1/3): SpecKey::NearestPixelSampler keys a nearest pixel sampler's variant apart
  from a linear one's, so the first linear case after the nearest ones makes its own. Required for
  Metal's nearest texel.
- render-then-sample-magnified-nearest: pipelines per state 2/2 -> 4/2 (alone 4/2 -> 6/2).
  d4fa99a14c (its parent 3fd1f6672b reads the old figures): the half-reading state's creation
  makes its predicted key's general form and hands the predicted key itself to the pool, and the
  draw takes the predicted key. So this case and -magnified-linear each make one general-form
  pipeline no draw takes, 2 -> 3 made and 2 taken, which is what raises the draws class's ceiling
  from 45 to 47. That waste is an open bug (not making the general form where the prediction is
  plain), not a requirement.

The 9 cases that stop do so at the same call as their committed cost records, each a refused row
in known-gaps.tsv: binary-archive-mesh-adder (program),
mesh-object-draws-partial-threadgroup-6-by-4 and -5x3-by-4x2 (drawMeshThreads),
format-footprints-plain-stragglers, -one-plane-ycbcr, -padded-wide-channels and
-two-plane-ten-bit (makes-texture), attribute-stride-inline-bytes (dispatchThreadgroups) and
argb8-targets-destination-alpha (pipeline/argb8).

Verified on the M3 Max: `conformance cost --runs 8 --check` over the whole set, run right after
the contrast and before the four files were put back, exit 0: "no gated bound and no ceiling
moved" (3 reach differences, 0 load-bearing). `cargo nextest run -p metal2vulkan-conformance
--all-features` on this commit's files: 1010 passed.

(cherry picked from commit 572e87eeb81b7bb46de6100a73b00e68c225371f)
(cherry picked from commit 02a0466c43d944a75d9089f45887de2f7e0c29b4)
2026-11-03 10:11:04 -08:00

361 lines
11 KiB
JSON

{
"format": 1,
"case": "function-facts-mesh",
"suite_version": 1,
"shaders": [
{
"fixture": "mesh_draws.ll",
"entry": "mesh_draws_mesh",
"source_sha256": "3d3689026db57166984f585d018b63c37c47a9cd03915380bdd1453b6ad8b3fa"
},
{
"fixture": "mesh_draws.air.ll",
"entry": "mesh_draws_mesh",
"source_sha256": "fa449657f08460681d54420b735459f6c7fc6a5ee92dd56637e8f01a4c3d031c"
}
],
"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": "3d3689026db57166984f585d018b63c37c47a9cd03915380bdd1453b6ad8b3fa"
}
}
},
{
"name": "air-typed",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "fa449657f08460681d54420b735459f6c7fc6a5ee92dd56637e8f01a4c3d031c"
}
}
},
{
"name": "entry",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "5a1b25aa5aef5c76a32c31262d0eb21b50a0476341f3ec17fb60f54eda224e1d"
}
}
},
{
"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": [
"mesh_draws_mesh"
]
}
}
},
{
"name": "function_type",
"observed": {
"value": {
"fields": {
"name": {
"lines": [
"MTLFunctionTypeMesh"
]
},
"raw": {
"uint": 7
}
}
}
}
},
{
"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-mesh",
"calls": 2,
"in_calls": 22482041,
"on_cpu": 588334,
"blocked": 21870709,
"elsewhere": 3875,
"spend": 22482041,
"spend_least": 21923917,
"spend_most": 25853209,
"per_call": [
{
"call": "function_facts",
"least_calls": 1,
"most_calls": 1,
"wall": 6042,
"on_cpu": 6333,
"blocked": 0,
"wall_least": 5917,
"wall_most": 9792,
"wall_total": 6042,
"on_cpu_total": 6333,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 22475750,
"on_cpu": 582292,
"blocked": 21870709,
"wall_least": 21913500,
"wall_most": 25840042,
"wall_total": 22475750,
"on_cpu_total": 582292,
"blocked_total": 21870709
}
]
}
},
{
"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-mesh",
"calls": 2,
"in_calls": 669499,
"on_cpu": 673250,
"blocked": 0,
"elsewhere": 625,
"spend": 670124,
"spend_least": 640084,
"spend_most": 800375,
"per_call": [
{
"call": "function_facts",
"least_calls": 1,
"most_calls": 1,
"wall": 537167,
"on_cpu": 537375,
"blocked": 0,
"wall_least": 507875,
"wall_most": 603625,
"wall_total": 537167,
"on_cpu_total": 537375,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 127791,
"on_cpu": 131292,
"blocked": 0,
"wall_least": 124250,
"wall_most": 196417,
"wall_total": 127791,
"on_cpu_total": 131292,
"blocked_total": 0
}
]
}
}
]
}