1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//! Provider-neutral GPU extension vocabulary (issue #1597).
//!
//! These types describe capabilities and stable device identity without
//! forcing CUDA-, CubeCL-, or WebGPU-specific concepts into a shared surface.
//! Backend-specific operations live in their provider namespaces
//! (`cuda`, `webgpu`); the types here are shared vocabulary only.
use fmt;
/// Stable physical or MIG device identity as a 16-byte UUID.
///
/// This is the durable comparison identity for diagnostics and topology. It is
/// distinct from the process-visible ordinal [`CudaDeviceId`](crate::cuda::CudaDeviceId);
/// the two must never be conflated in equality semantics.
///
/// # Examples
///
/// ```
/// use tenferro_gpu::cuda::CudaDeviceUuid;
///
/// let uuid = CudaDeviceUuid::from_bytes([7; 16]);
/// assert_eq!(uuid.to_bytes(), [7; 16]);
/// assert_eq!(uuid, CudaDeviceUuid::from_bytes([7; 16]));
/// ```
;
/// CUDA compute capability `major.minor` (e.g. 9.0 for Hopper-class parts).
///
/// # Examples
///
/// ```
/// use tenferro_gpu::cuda::CudaComputeCapability;
///
/// let cc = CudaComputeCapability { major: 9, minor: 0 };
/// assert_eq!(cc.major, 9);
/// assert_eq!(cc.minor, 0);
/// ```
/// Capability a GPU extension may query before using a provider-specific path.
///
/// [`CudaExecSession::supports`](crate::cuda::CudaExecSession::supports) reports
/// whether the capability is plausibly available on the current session. This is
/// orthogonal to the primitive [`OperationCapability`](tenferro_tensor::OperationCapability)
/// matrix: extension capabilities describe what the extension seam itself can
/// do, not which tensor operations the backend implements.
///
/// # Examples
///
/// ```
/// use tenferro_gpu::cuda::GpuExtensionCapability;
///
/// let capability = GpuExtensionCapability::RawStream;
/// assert!(matches!(capability, GpuExtensionCapability::RawStream));
/// ```