Table of Contents

Class DeviceBroker

Namespace
Orleans.GpuBridge.Runtime
Assembly
Orleans.GpuBridge.Runtime.dll

Device benchmarking methods for performance measurement

public sealed class DeviceBroker : IDisposable
Inheritance
DeviceBroker
Implements
Inherited Members

Constructors

DeviceBroker(ILogger<DeviceBroker>, IOptions<GpuBridgeOptions>)

Initializes a new instance of the DeviceBroker class

public DeviceBroker(ILogger<DeviceBroker> logger, IOptions<GpuBridgeOptions> options)

Parameters

logger ILogger<DeviceBroker>

Logger instance for diagnostics

options IOptions<GpuBridgeOptions>

GPU bridge configuration options

Properties

CurrentQueueDepth

Gets the current queue depth across all devices

public int CurrentQueueDepth { get; }

Property Value

int

DeviceCount

Gets the total number of available devices

public int DeviceCount { get; }

Property Value

int

TotalMemoryBytes

Gets the total memory across all devices in bytes

public long TotalMemoryBytes { get; }

Property Value

long

Methods

Dispose()

Disposes the device broker and releases all resources

public void Dispose()

GetBestDevice()

Gets the best available GPU device based on current load and capabilities

public GpuDevice? GetBestDevice()

Returns

GpuDevice

The best GPU device, or null if none available

GetDevice(int)

Gets a specific GPU device by index

public GpuDevice? GetDevice(int index)

Parameters

index int

Device index

Returns

GpuDevice

The GPU device, or null if not found

GetDevices()

Gets all available GPU devices

public IReadOnlyList<GpuDevice> GetDevices()

Returns

IReadOnlyList<GpuDevice>

A read-only list of GPU devices

InitializeAsync(CancellationToken)

Initializes the device broker and detects available GPUs

public Task InitializeAsync(CancellationToken ct)

Parameters

ct CancellationToken

Cancellation token

Returns

Task

ShutdownAsync(CancellationToken)

Shuts down the device broker and stops all work queues

public Task ShutdownAsync(CancellationToken ct)

Parameters

ct CancellationToken

Cancellation token

Returns

Task