Class CudaArchitectureHelper
- Namespace
- DotCompute.Backends.CUDA.Discovery
- Assembly
- DotCompute.Backends.CUDA.dll
Provides architecture detection and capability mapping for CUDA devices. Centralizes architecture-specific logic for compute capability determination.
public static class CudaArchitectureHelper
- Inheritance
-
CudaArchitectureHelper
- Inherited Members
Methods
GetArchitectureGeneration(int, int)
Gets the architecture generation name based on compute capability.
public static string GetArchitectureGeneration(int major, int minor)
Parameters
Returns
- string
The architecture generation name.
GetCudaCoresPerSM(int, int)
Gets the CUDA cores per streaming multiprocessor for the given architecture.
public static int GetCudaCoresPerSM(int major, int minor)
Parameters
Returns
- int
The number of CUDA cores per SM.
GetFeatureSupport(int, int)
Gets the feature support flags for a given compute capability.
public static IReadOnlyDictionary<string, bool> GetFeatureSupport(int major, int minor)
Parameters
Returns
- IReadOnlyDictionary<string, bool>
A dictionary of feature names and their support status.
GetSMArchitecture(int, int)
Gets the SM architecture code (e.g., "sm_89" for Ada Lovelace).
public static string GetSMArchitecture(int major, int minor)
Parameters
Returns
- string
The SM architecture code string.
GetTensorCoresPerSM(int, int)
Gets the Tensor Cores per streaming multiprocessor for the given architecture.
public static int GetTensorCoresPerSM(int major, int minor)
Parameters
Returns
- int
The number of Tensor Cores per SM.
IsCuda13Compatible(int, int)
Checks if the compute capability is compatible with CUDA 13.0.
public static bool IsCuda13Compatible(int major, int minor)
Parameters
Returns
- bool
True if compatible with CUDA 13.0.
IsRTX2000Ada(int, int, string)
Detects if a device is an RTX 2000 Ada Generation GPU.
public static bool IsRTX2000Ada(int major, int minor, string deviceName)
Parameters
majorintCompute capability major version.
minorintCompute capability minor version.
deviceNamestringThe device name.
Returns
- bool
True if the device is an RTX 2000 Ada GPU.
SupportsComputeCapability(int, int, int, int)
Checks if the compute capability supports the specified capability level.
public static bool SupportsComputeCapability(int deviceMajor, int deviceMinor, int requiredMajor, int requiredMinor)
Parameters
deviceMajorintDevice compute capability major version.
deviceMinorintDevice compute capability minor version.
requiredMajorintRequired compute capability major version.
requiredMinorintRequired compute capability minor version.
Returns
- bool
True if the device supports the required capability or higher.