Files
metal2vulkan/crates/metal2vulkan-conformance/recordings/blit-optimize-indirect-command-buffer.json
T
Anees Iqbal da929c8a96 Re-bless the cost records at d0f0419800
A whole-set cost --runs 8 --write on the M3 Max, then --alone over the cases it
changed: images' blocks at 64 MiB (device_memory_allocated of the cases that
read 68 MiB) and what else moved since 9b046a7cf8 (dv-m3d).
2026-11-11 01:51:58 -08:00

875 lines
29 KiB
JSON

{
"format": 1,
"case": "blit-optimize-indirect-command-buffer",
"suite_version": 1,
"shaders": [
{
"fixture": "icb_replay_template.ll",
"entry": "icb_replay_template",
"source_sha256": "fee2985635a8e466a450ee0fe473abdc5faa0694ddcc5b5bdc15d67c10842479"
},
{
"fixture": "icb_replay_template.air.ll",
"entry": "icb_replay_template",
"source_sha256": "dcfcf642972c3bc8d9d7a93a304adf8aecf78a19cd03e9468a8b3f90dee453c9"
}
],
"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": "fee2985635a8e466a450ee0fe473abdc5faa0694ddcc5b5bdc15d67c10842479"
}
}
},
{
"name": "air-typed",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "dcfcf642972c3bc8d9d7a93a304adf8aecf78a19cd03e9468a8b3f90dee453c9"
}
}
},
{
"name": "icb-descriptor",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "2eabc39eb6a932ff8294ff3e76704207a90169b9cf3d9962ea772370d5dc64f1"
}
}
},
{
"name": "commands",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "fd0c14f69fb7d0ff44833c289bd703d209c10da8b6019c432d83ae75a4bf3f21"
}
}
},
{
"name": "call",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "e3c5c23247d2ecf62052172298f828bbacadb90d63773921cd58f8edfd1938bd"
}
}
},
{
"name": "ranges",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "176604f90ed3c4af95f459d13249e2c912b91f8a1c78b09b150827c4dd611a2a"
}
}
},
{
"name": "buffer:params",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "b9c747836e2eb1e439310c47919daf8f387a8882cc54fad97829b6c910f35214"
}
}
},
{
"name": "buffer:out",
"observed": {
"value": "absent",
"digest": {
"kind": "sha256",
"hex": "e32ff50f2220f543bcbc30f110bdc5e7f0bb3bc265390ecae964a7440c61f9d0"
}
}
}
]
},
{
"name": "library",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "pipeline",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "buffer/params",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-none/out",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-none/source",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-0/out",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-0/source",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-2/out",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-2/source",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-whole/out",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-whole/source",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "program",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "program-calls",
"observed": {
"value": "absent"
},
"children": [
{
"name": "calls",
"observed": {
"value": "absent"
},
"children": [
{
"name": "0-optimizeIndirectCommandBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "1-executeCommandsInBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "2-optimizeIndirectCommandBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "3-executeCommandsInBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "4-optimizeIndirectCommandBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "5-executeCommandsInBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "6-optimizeIndirectCommandBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "7-executeCommandsInBuffer",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
}
]
},
{
"name": "status",
"observed": {
"value": {
"variant": {
"name": "Completed",
"payload": "absent"
}
}
}
}
]
},
{
"name": "read-back/range-none",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-none",
"observed": {
"value": {
"bytes": "ZwAAAGoAAABtAAAAcAAAAO7u7u7u7u7u7u7u7u7u7u7NAAAA0gAAANcAAADcAAAA7u7u7u7u7u7u7u7u7u7u7jMBAAA6AQAAQQEAAEgBAADu7u7u7u7u7u7u7u7u7u7umwEAAKYBAACxAQAAvAEAAO7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7g=="
},
"shape": {
"bytes": {
"region": {
"buffer": {
"offset": 0,
"length": 160
}
},
"element": "u32",
"row_offset": 0,
"row_elements": 40,
"row_pitch": 160,
"rows": 1,
"image_pitch": 160,
"images": 1,
"gaps": "ignored"
}
}
}
},
{
"name": "read-back/range-one-at-0",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-0",
"observed": {
"value": {
"bytes": "ZwAAAGoAAABtAAAAcAAAAO7u7u7u7u7u7u7u7u7u7u7NAAAA0gAAANcAAADcAAAA7u7u7u7u7u7u7u7u7u7u7jMBAAA6AQAAQQEAAEgBAADu7u7u7u7u7u7u7u7u7u7umwEAAKYBAACxAQAAvAEAAO7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7g=="
},
"shape": {
"bytes": {
"region": {
"buffer": {
"offset": 0,
"length": 160
}
},
"element": "u32",
"row_offset": 0,
"row_elements": 40,
"row_pitch": 160,
"rows": 1,
"image_pitch": 160,
"images": 1,
"gaps": "ignored"
}
}
}
},
{
"name": "read-back/range-one-at-2",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-one-at-2",
"observed": {
"value": {
"bytes": "ZwAAAGoAAABtAAAAcAAAAO7u7u7u7u7u7u7u7u7u7u7NAAAA0gAAANcAAADcAAAA7u7u7u7u7u7u7u7u7u7u7jMBAAA6AQAAQQEAAEgBAADu7u7u7u7u7u7u7u7u7u7umwEAAKYBAACxAQAAvAEAAO7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7g=="
},
"shape": {
"bytes": {
"region": {
"buffer": {
"offset": 0,
"length": 160
}
},
"element": "u32",
"row_offset": 0,
"row_elements": 40,
"row_pitch": 160,
"rows": 1,
"image_pitch": 160,
"images": 1,
"gaps": "ignored"
}
}
}
},
{
"name": "read-back/range-whole",
"observed": {
"value": {
"variant": {
"name": "Ok",
"payload": "absent"
}
}
}
},
{
"name": "range-whole",
"observed": {
"value": {
"bytes": "ZwAAAGoAAABtAAAAcAAAAO7u7u7u7u7u7u7u7u7u7u7NAAAA0gAAANcAAADcAAAA7u7u7u7u7u7u7u7u7u7u7jMBAAA6AQAAQQEAAEgBAADu7u7u7u7u7u7u7u7u7u7umwEAAKYBAACxAQAAvAEAAO7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7g=="
},
"shape": {
"bytes": {
"region": {
"buffer": {
"offset": 0,
"length": 160
}
},
"element": "u32",
"row_offset": 0,
"row_elements": 40,
"row_pitch": 160,
"rows": 1,
"image_pitch": 160,
"images": 1,
"gaps": "ignored"
}
}
}
},
{
"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": {
"addressable_buffers_made": 1,
"arena_pools_made": 1,
"argument_objects_retained": 8,
"argument_tables_retained": 4,
"bare_starts": 1,
"batches_with_none_pending": 1,
"blocks_ahead_waited_for": 1,
"command_barriers": 12,
"command_buffers_begun": 18,
"command_buffers_begun_batch_barriers": 1,
"command_buffers_begun_batch_work": 1,
"command_buffers_begun_continuations": 4,
"command_buffers_begun_encoders": 8,
"command_buffers_begun_segments": 4,
"command_buffers_submitted": 18,
"commands_recorded.begin_command_buffer": 17,
"commands_recorded.cmd_bind_descriptor_sets": 16,
"commands_recorded.cmd_bind_pipeline": 16,
"commands_recorded.cmd_copy_buffer": 1,
"commands_recorded.cmd_dispatch": 16,
"commands_recorded.cmd_pipeline_barrier": 23,
"commands_recorded.cmd_push_constants": 16,
"commands_recorded.end_command_buffer": 18,
"commits_handed_off": 1,
"commits_taken_in": 1,
"completed_waits": 4,
"completed_where_seen": 1,
"completion_arms": 1,
"completion_arms_after_a_wake": 1,
"completion_waiter_parks": 1,
"creation_pipelines_made": 0,
"device_memory_allocated": 205520896,
"dispatches_planned_as_before": 15,
"encoder_command_buffers_begun": 16,
"fence_waits": 1,
"finales_apart": 1,
"functions_shared": 1,
"functions_translated": 1,
"gate_waits": 1,
"gate_waits_slept": 1,
"heap_tables_worked_out": 1,
"image_blocks_made_ahead": 1,
"image_blocks_made_in_place": 1,
"indirect_record_bytes_copied": 35968,
"indirect_record_runs_read": 4,
"indirect_records_read": 16,
"live_tables_uploaded": 1,
"new_buffer_bytes_cleared": 38176,
"object_churn.buffers_parked": 14,
"object_churn.buffers_recycled": 14,
"pipeline_layouts_made": 1,
"plain_buffer_blocks_made": 2,
"pooled_memory_blocks_made": 3,
"queue_submissions": 1,
"queues_sharing_a_vk_queue": 1,
"resident_address_indexes_made": 4,
"resident_resources_joined": 8,
"resident_textures_looked_at": 4,
"scheduled_where_submitted": 1,
"scheduler_passes": 1,
"scheduler_passes_by_waiters": 1,
"scheduler_sleeps": 1,
"scheduler_wakes_commit": 1,
"set_zero_sets_reused": 12,
"shader_modules_made": 1,
"slot_returns": 1,
"spare_command_pools_taken": 1,
"stage_entries_specialized": 1,
"submit_infos": 2,
"trail_waits": 1,
"variant_pipelines_made": 1,
"variants_taken_back": 1,
"wakes_completion_waiters": 1,
"wakes_spared": 8
},
"moving": {
"gate_waits_slept": 0
},
"composed": {
"addressable_buffers_made": 1,
"arena_pools_made": 1,
"blocks_ahead_waited_for": 1,
"command_buffers_begun": 18,
"command_buffers_begun_batch_work": 1,
"command_buffers_submitted": 18,
"commands_recorded.cmd_copy_buffer": 1,
"commands_recorded.cmd_pipeline_barrier": 23,
"commands_recorded.end_command_buffer": 18,
"creation_pipelines_made": 0,
"device_memory_allocated": 201326592,
"functions_translated": 1,
"image_blocks_made_ahead": 1,
"image_blocks_made_in_place": 0,
"plain_buffer_blocks_made": 2,
"queues_sharing_a_vk_queue": 0,
"stage_entries_specialized": 1,
"variant_pipelines_made": 1
},
"ceilings": {
"addressable_buffers_made": 1,
"arena_pools_made": 1,
"pipeline_layouts_made": 1,
"pooled_memory_blocks_made": 3,
"shader_modules_made": 1,
"variant_pipelines_made": 1
},
"per_state": {
"pipelines": 0,
"states": 1
}
}
],
"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": "blit-optimize-indirect-command-buffer",
"calls": 16,
"in_calls": 26248081,
"on_cpu": 977878,
"blocked": 25219750,
"elsewhere": 3254500,
"spend": 29377417,
"spend_least": 28265998,
"spend_most": 31586456,
"per_call": [
{
"call": "buffer",
"least_calls": 5,
"most_calls": 5,
"wall": 2250,
"on_cpu": 2333,
"blocked": 0,
"wall_least": 2083,
"wall_most": 2750,
"wall_total": 27916,
"on_cpu_total": 28584,
"blocked_total": 0
},
{
"call": "compute_pipeline_for_commands",
"least_calls": 1,
"most_calls": 1,
"wall": 75292,
"on_cpu": 75583,
"blocked": 0,
"wall_least": 64208,
"wall_most": 86458,
"wall_total": 75292,
"on_cpu_total": 75583,
"blocked_total": 0
},
{
"call": "indirect_command_buffer",
"least_calls": 4,
"most_calls": 4,
"wall": 8375,
"on_cpu": 8542,
"blocked": 0,
"wall_least": 7750,
"wall_most": 11708,
"wall_total": 57751,
"on_cpu_total": 58416,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 22200291,
"on_cpu": 621375,
"blocked": 21559250,
"wall_least": 21557375,
"wall_most": 23101333,
"wall_total": 22200291,
"on_cpu_total": 621375,
"blocked_total": 21559250
},
{
"call": "read_buffer",
"least_calls": 4,
"most_calls": 4,
"wall": 83,
"on_cpu": 209,
"blocked": 0,
"wall_least": 41,
"wall_most": 208,
"wall_total": 874,
"on_cpu_total": 1457,
"blocked_total": 0
},
{
"call": "render",
"least_calls": 1,
"most_calls": 1,
"wall": 3895791,
"on_cpu": 184125,
"blocked": 3723332,
"wall_least": 3403291,
"wall_most": 4874416,
"wall_total": 3895791,
"on_cpu_total": 184125,
"blocked_total": 3723332
}
]
}
},
{
"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": "blit-optimize-indirect-command-buffer",
"calls": 16,
"in_calls": 1349958,
"on_cpu": 318416,
"blocked": 1014291,
"elsewhere": 305792,
"spend": 1635000,
"spend_least": 1500085,
"spend_most": 1811039,
"per_call": [
{
"call": "buffer",
"least_calls": 5,
"most_calls": 5,
"wall": 750,
"on_cpu": 833,
"blocked": 0,
"wall_least": 667,
"wall_most": 917,
"wall_total": 4667,
"on_cpu_total": 5333,
"blocked_total": 0
},
{
"call": "compute_pipeline_for_commands",
"least_calls": 1,
"most_calls": 1,
"wall": 82709,
"on_cpu": 82958,
"blocked": 0,
"wall_least": 75125,
"wall_most": 93667,
"wall_total": 82709,
"on_cpu_total": 82958,
"blocked_total": 0
},
{
"call": "indirect_command_buffer",
"least_calls": 4,
"most_calls": 4,
"wall": 4166,
"on_cpu": 4291,
"blocked": 0,
"wall_least": 3875,
"wall_most": 4458,
"wall_total": 18791,
"on_cpu_total": 19209,
"blocked_total": 0
},
{
"call": "library",
"least_calls": 1,
"most_calls": 1,
"wall": 88000,
"on_cpu": 89500,
"blocked": 0,
"wall_least": 80542,
"wall_most": 98916,
"wall_total": 88000,
"on_cpu_total": 89500,
"blocked_total": 0
},
{
"call": "read_buffer",
"least_calls": 4,
"most_calls": 4,
"wall": 250,
"on_cpu": 375,
"blocked": 0,
"wall_least": 166,
"wall_most": 250,
"wall_total": 958,
"on_cpu_total": 1542,
"blocked_total": 0
},
{
"call": "render",
"least_calls": 1,
"most_calls": 1,
"wall": 1135833,
"on_cpu": 118583,
"blocked": 1014291,
"wall_least": 1038250,
"wall_most": 1218125,
"wall_total": 1135833,
"on_cpu_total": 118583,
"blocked_total": 1014291
}
]
}
}
]
}