Class CudaEnvironmentProbe
Probes the current CUDA bridge state and available devices. 探测当前 CUDA bridge 状态和可用设备。
public static class CudaEnvironmentProbe
- Inheritance
-
CudaEnvironmentProbe
- Inherited Members
Methods
GetCurrent()
Collects the current CUDA bridge, runtime, and device snapshot. 收集当前 CUDA bridge、runtime 与设备快照。
public static CudaEnvironmentSnapshot GetCurrent()
Returns
- CudaEnvironmentSnapshot
The current CUDA environment snapshot. 当前 CUDA 环境快照。
GetDeviceCount()
Gets the CUDA device count visible to the current process. 获取当前进程可见的 CUDA 设备数量。
public static int GetDeviceCount()
Returns
- int
The number of visible CUDA devices. 可见 CUDA 设备数量。
TryCreateStream(out string)
Tries to create a CUDA stream to confirm runtime usability. 尝试创建 CUDA stream 以确认 runtime 可用性。
public static bool TryCreateStream(out string message)
Parameters
messagestringReturns a success or diagnostic message. 返回成功信息或诊断信息。