Table of Contents

Interface IComputeDevice

Namespace
Orleans.GpuBridge.Abstractions.Providers
Assembly
Orleans.GpuBridge.Abstractions.dll

Represents a compute device (GPU, CPU, etc.) that can execute computational tasks. This interface provides access to device properties, capabilities, and status information needed for device selection and management in the GPU bridge framework.

public interface IComputeDevice

Properties

Architecture

Gets the device architecture identifier. Examples include "Ampere", "RDNA2", "x86-64", which indicate the underlying hardware architecture.

string Architecture { get; }

Property Value

string

AvailableMemoryBytes

Gets the currently available memory on the device in bytes. This value may change as memory is allocated and freed during device usage.

long AvailableMemoryBytes { get; }

Property Value

long

ComputeCapability

Gets the compute capability version of the device. This represents the feature set and capabilities supported by the device, such as CUDA compute capability for NVIDIA GPUs.

Version ComputeCapability { get; }

Property Value

Version

ComputeUnits

Gets the number of compute units available on the device. This represents streaming multiprocessors (SMs) for NVIDIA, compute units (CUs) for AMD, or cores for CPU devices.

int ComputeUnits { get; }

Property Value

int

DeviceId

Gets the unique identifier for the device. This ID is persistent across application runs and uniquely identifies the device in the system.

string DeviceId { get; }

Property Value

string

Index

Gets the device index in the system. This is typically the enumeration order of devices as discovered by the backend provider.

int Index { get; }

Property Value

int

MaxClockFrequencyMHz

Gets the maximum clock frequency of the device in MHz. This represents the peak operating frequency of the compute units.

int MaxClockFrequencyMHz { get; }

Property Value

int

MaxThreadsPerBlock

Gets the maximum number of threads per block or workgroup. This is a fundamental limit for kernel launch configurations.

int MaxThreadsPerBlock { get; }

Property Value

int

MaxWorkGroupDimensions

Gets the maximum workgroup dimensions supported by the device. This array specifies the maximum size in each dimension (x, y, z) for workgroup configurations.

int[] MaxWorkGroupDimensions { get; }

Property Value

int[]

Name

Gets the display name of the device. This is a human-readable name that can be shown in user interfaces for device selection.

string Name { get; }

Property Value

string

Properties

Gets device-specific properties as a read-only dictionary. This allows backend providers to expose additional device characteristics that may not be covered by the standard properties.

IReadOnlyDictionary<string, object> Properties { get; }

Property Value

IReadOnlyDictionary<string, object>

TotalMemoryBytes

Gets the total memory available on the device in bytes. This is the physical memory capacity of the device.

long TotalMemoryBytes { get; }

Property Value

long

Type

Gets the type of compute device. Indicates whether this is a GPU, CPU, or other type of compute device.

DeviceType Type { get; }

Property Value

DeviceType

Vendor

Gets the vendor of the device. Common values include "NVIDIA", "AMD", "Intel", etc.

string Vendor { get; }

Property Value

string

WarpSize

Gets the warp size (NVIDIA) or wave size (AMD) for the device. This represents the number of threads that execute in lockstep within a compute unit.

int WarpSize { get; }

Property Value

int

Methods

GetStatus()

Gets the current operational status of the device.

DeviceStatus GetStatus()

Returns

DeviceStatus

The current device status indicating availability, utilization, or error states.

SupportsFeature(string)

Checks if the device supports a specific feature.

bool SupportsFeature(string feature)

Parameters

feature string

The feature identifier to check for support.

Returns

bool

True if the device supports the specified feature; otherwise, false.