axiolid_backend_gpu/
device.rs

1//! API-neutral GPU device description.
2
3use axiolid_contracts::BackendId;
4
5/// Relevant compute features without exposing CUDA, Metal, Vulkan, or WebGPU
6/// types in the public kernel contract.
7#[derive(Debug, Clone, Copy, PartialEq, Eq)]
8pub struct GpuFeatures {
9    /// Native binary64 shader/compute arithmetic.
10    pub float64: bool,
11    /// Subgroup/warp operations.
12    pub subgroups: bool,
13    /// Host-visible unified memory.
14    pub unified_memory: bool,
15    /// Maximum workgroup size reported by the concrete API.
16    pub max_workgroup_size: u32,
17}
18
19/// Runtime GPU identity for diagnostics and selection.
20#[derive(Debug, Clone, PartialEq, Eq)]
21pub struct GpuDeviceDescriptor {
22    /// Stable operation-provider/device identifier.
23    pub id: BackendId,
24    /// Human-readable adapter name.
25    pub name: String,
26    /// Driver/API name, e.g. CUDA, Metal, Vulkan, or WebGPU.
27    pub api: String,
28    /// Relevant features.
29    pub features: GpuFeatures,
30}