A probe for the NVIDIA queue plan's cost: Vulkan devices of 1 to 18 queues made and destroyed in turn (vkCreateDevice and vkDestroyDevice wall times, slope per queue), held four at once with nvidia-smi's framebuffer and BAR1 use, the runtime's own device under each queue limit, and an opt-in exhaust across processes (how many devices of the plan's and the least plan's shape the GPU holds at once). Not yet run; numbers follow from potluck jobs.
135 lines
5.1 KiB
TOML
135 lines
5.1 KiB
TOML
[package]
|
|
name = "metal2vulkan-runtime"
|
|
version = "0.2.0"
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
description = "The Metal API on Vulkan: Metal's objects and calls run on a Vulkan device through ash"
|
|
readme = "README.md"
|
|
repository.workspace = true
|
|
documentation = "https://docs.rs/metal2vulkan-runtime"
|
|
keywords = ["metal", "vulkan", "gpu", "graphics"]
|
|
categories = ["graphics", "api-bindings"]
|
|
# No crate root can appear unannounced, so validation's product fingerprint follows exactly the
|
|
# runtime's module tree (build_support.rs). Each example is listed below.
|
|
autobins = false
|
|
autoexamples = false
|
|
# The runtime's tests read the repository's profiles, fixtures and guide beside this directory.
|
|
exclude = ["/target/", "**/*.air", "**/*.metallib", "**/*.spv"]
|
|
|
|
[lib]
|
|
name = "metal2vulkan_runtime"
|
|
path = "src/lib.rs"
|
|
|
|
# Runnable examples for consumers (README.md, "Examples"): each runs the owned fixture
|
|
# validation/fixtures/public/examples/runtime_examples.metal on the system default device, from the
|
|
# workspace checkout (its committed LLVM text, assembled by `llvm-as`), or a metallib passed as the
|
|
# first argument.
|
|
[[example]]
|
|
name = "compute_dispatch"
|
|
path = "examples/compute_dispatch.rs"
|
|
|
|
[[example]]
|
|
name = "render_to_texture"
|
|
path = "examples/render_to_texture.rs"
|
|
|
|
[[example]]
|
|
name = "indirect_command_buffer"
|
|
path = "examples/indirect_command_buffer.rs"
|
|
|
|
[[example]]
|
|
name = "heap_placement"
|
|
path = "examples/heap_placement.rs"
|
|
|
|
[[example]]
|
|
name = "adopted_buffer"
|
|
path = "examples/adopted_buffer.rs"
|
|
|
|
# Not a consumer's example: the host A/B benchmark, the same Metal workloads natively on Metal
|
|
# and through the runtime, with a table of the two (examples/host_ab/main.rs).
|
|
[[example]]
|
|
name = "host_ab"
|
|
path = "examples/host_ab/main.rs"
|
|
|
|
# Not a consumer's example: a command buffer's fixed cost on the submit and completion path, from
|
|
# commit to its handler, and the CPU of the runtime's threads per command buffer
|
|
# (examples/submit_path.rs).
|
|
[[example]]
|
|
name = "submit_path"
|
|
path = "examples/submit_path.rs"
|
|
|
|
# Not a consumer's example: the CPU cost of an indirect command buffer's command setters, a
|
|
# render and a compute command encoded field by field (examples/icb_setters.rs).
|
|
[[example]]
|
|
name = "icb_setters"
|
|
path = "examples/icb_setters.rs"
|
|
|
|
# Not a consumer's example: command queues sharing `VkQueue`s, each workload under the policy its
|
|
# arguments name (examples/queue_share.rs).
|
|
[[example]]
|
|
name = "queue_share"
|
|
path = "examples/queue_share.rs"
|
|
|
|
# Not a consumer's example: what a draw costs the thread that encodes it, in three shapes of a
|
|
# guest's render work: a compositor's binds, many short command buffers, and long ones
|
|
# (examples/draw_costs.rs).
|
|
[[example]]
|
|
name = "draw_costs"
|
|
path = "examples/draw_costs.rs"
|
|
|
|
# Not a consumer's example: the GPU's bandwidth through 256 MiB buffers of each storage mode, over
|
|
# the caller's pages and the runtime's own (examples/managed_bandwidth.rs).
|
|
[[example]]
|
|
name = "managed_bandwidth"
|
|
path = "examples/managed_bandwidth.rs"
|
|
|
|
# Not a consumer's example: the GPU's bandwidth through 256 MiB buffers of the runtime's own memory,
|
|
# made after other buffers went (examples/private_bandwidth.rs).
|
|
[[example]]
|
|
name = "private_bandwidth"
|
|
path = "examples/private_bandwidth.rs"
|
|
|
|
# Not a consumer's example: what copies between host and device memory cost on the graphics
|
|
# queue and on a copy engine, alone and beside a compute load, on a Vulkan device of its own
|
|
# (examples/copy_engine.rs).
|
|
[[example]]
|
|
name = "copy_engine"
|
|
path = "examples/copy_engine.rs"
|
|
|
|
# Not a consumer's example: what a device's `VkQueue`s cost the driver to make, drop and hold, by
|
|
# how many it takes (examples/queue_plan_cost.rs).
|
|
[[example]]
|
|
name = "queue_plan_cost"
|
|
path = "examples/queue_plan_cost.rs"
|
|
|
|
[dependencies]
|
|
# The translator, through its public API only: the compiler checks that the runtime
|
|
# reaches nothing else. `ash` gives `ash_interop`'s conversions and `DeviceDescription::query`.
|
|
metal2vulkan = { version = "0.2.0", path = "../metal2vulkan", features = ["ash"] }
|
|
# `ash/loaded` opens the Vulkan loader with `dlopen` when a device is created; nothing is linked at
|
|
# build time.
|
|
ash = { workspace = true, features = ["std", "loaded"] }
|
|
# No-copy buffers take the host's page size on unix; elsewhere they are
|
|
# refused typed. It also registers the exit guard's exit handler on unix.
|
|
libc.workspace = true
|
|
# The shader cache's entry names and the binary archive's keys.
|
|
sha2.workspace = true
|
|
|
|
[dev-dependencies]
|
|
serde_json.workspace = true
|
|
# `llvm-as` for the device tests' owned fixture (`tests/pipeline_wait_order.rs`).
|
|
metal2vulkan-devtools = { path = "../metal2vulkan-devtools" }
|
|
|
|
# The host A/B benchmark's native side (examples/host_ab): Metal itself, on macOS.
|
|
[target.'cfg(target_os = "macos")'.dev-dependencies]
|
|
block2 = "0.6"
|
|
objc2 = "0.6"
|
|
objc2-foundation = "0.3"
|
|
objc2-metal = "0.3"
|
|
|
|
# The device tests compile only under the validation crate's GPU safety cfgs (`tests/mod.rs`).
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(m2v_gpu)", "cfg(m2v_cpu_icd)", "cfg(m2v_gpu_hazards)", "cfg(m2v_no_recycle)"] }
|
|
|