Skip to main content

oa/runtime/
type.gen.rs

1// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
2// schema=runtime_types.json schema_version=1 generator_version=64
3// schema_sha256=4c89f081a209450e25f6ef82a43a88f27bc16f59a39573a67c382a4348c899d9
4use super::DeviceKind;
5#[derive(Clone, Debug, PartialEq, Eq)]
6pub struct DeviceHardwareInfo {
7	pub(crate) index: usize,
8	pub(crate) name: String,
9	pub(crate) kind: DeviceKind,
10	pub(crate) vendor_id: u32,
11	pub(crate) device_id: u32,
12	pub(crate) local_memory_bytes: u64,
13	pub(crate) local_memory_budget_bytes: Option<u64>,
14	pub(crate) local_memory_usage_bytes: Option<u64>,
15	/// Whether device-local memory is host-visible on this device.
16	pub(crate) local_memory_unified: bool,
17	pub(crate) max_compute_shared_memory_bytes: u32,
18	pub(crate) max_compute_workgroup_invocations: u32,
19	pub(crate) subgroup_size: u32,
20	pub(crate) storage_buffer_descriptors: u32,
21	pub(crate) storage_image_descriptors: u32,
22	pub(crate) graphics: bool,
23	pub(crate) swapchain: bool,
24}
25
26#[derive(Clone, Debug, PartialEq, Eq)]
27pub struct DeviceSoftwareInfo {
28	pub(crate) api_version: String,
29	pub(crate) driver_name: String,
30	pub(crate) driver_info: String,
31	pub(crate) driver_version: u32,
32	pub(crate) capability_identity: u64,
33	pub(crate) shader_float16: bool,
34	pub(crate) shader_float64: bool,
35	pub(crate) shader_integer_dot_product: bool,
36	pub(crate) cooperative_matrix_tuple_count: usize,
37	pub(crate) storage_buffer_16_bit_access: bool,
38}
39
40#[derive(Clone, Debug, PartialEq, Eq)]
41pub struct DeviceInfo {
42	pub hardware: DeviceHardwareInfo,
43	pub software: DeviceSoftwareInfo,
44}
45
46#[derive(Clone, Copy, Debug, PartialEq, Eq)]
47pub struct PresentationCapabilities {
48	pub min_image_count: u32,
49	pub max_image_count: Option<u32>,
50	pub current_extent: Option<[u32; 2]>,
51	pub min_extent: [u32; 2],
52	pub max_extent: [u32; 2],
53	pub format_count: usize,
54	pub present_mode_count: usize,
55	pub supports_color_attachment: bool,
56	pub supports_transfer_dst: bool,
57}
58
59#[derive(Clone, Debug, Default, PartialEq, Eq)]
60pub struct EngineRequirements {
61	pub(crate) graphics: bool,
62	pub(crate) presentation: bool,
63	pub(crate) video_decode: Vec<crate::video::VideoDecodeProfile>,
64	pub(crate) video_encode: Vec<crate::video::VideoEncodeProfile>,
65}
66
67/// Engine-lifetime counters of fusion decisions, decline reasons and JIT admissions.
68#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
69pub struct FusionStats {
70	pub(crate) examined_node_count: u64,
71	pub(crate) disabled_node_count: u64,
72	pub(crate) not_elementwise_node_count: u64,
73	pub(crate) policy_excluded_node_count: u64,
74	pub(crate) hazard_node_count: u64,
75	pub(crate) isolated_node_count: u64,
76	pub(crate) extent_boundary_node_count: u64,
77	pub(crate) cross_invocation_node_count: u64,
78	pub(crate) program_rejected_node_count: u64,
79	pub(crate) foreign_device_node_count: u64,
80	pub(crate) tape_bound_node_count: u64,
81	pub(crate) tape_capacity_node_count: u64,
82	pub(crate) resource_node_count: u64,
83	pub(crate) specialization_declined_node_count: u64,
84	pub(crate) tape_fused_node_count: u64,
85	pub(crate) specialized_fused_node_count: u64,
86	pub(crate) pass_count: u64,
87	pub(crate) structural_region_count: u64,
88	pub(crate) structural_node_count: u64,
89	pub(crate) tape_region_count: u64,
90	pub(crate) specialized_region_count: u64,
91	pub(crate) jit_disabled_count: u64,
92	pub(crate) jit_admitted_count: u64,
93	pub(crate) jit_reused_count: u64,
94	pub(crate) jit_policy_tape_count: u64,
95	pub(crate) jit_cached_negative_count: u64,
96	pub(crate) jit_bound_count: u64,
97	pub(crate) jit_compiler_unavailable_count: u64,
98	pub(crate) jit_compile_rejected_count: u64,
99	pub(crate) jit_pipeline_rejected_count: u64,
100	pub(crate) jit_queued_count: u64,
101	pub(crate) jit_pending_count: u64,
102	pub(crate) jit_compile_count: u64,
103	pub(crate) jit_compile_ns: u64,
104	pub(crate) jit_pipeline_ns: u64,
105	pub(crate) dnn_applied_partition_count: u64,
106	pub(crate) dnn_fallback_partition_count: u64,
107}