Table of Contents

Interface IGpuBridge

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

Main interface for GPU bridge operations

public interface IGpuBridge

Methods

ExecuteKernelAsync(string, object, CancellationToken)

Executes a kernel with dynamic input/output types

[RequiresDynamicCode("Dynamic kernel execution uses runtime reflection to create generic method calls.")]
[RequiresUnreferencedCode("Dynamic kernel execution uses reflection which may not work with trimming.")]
ValueTask<object> ExecuteKernelAsync(string kernelId, object input, CancellationToken ct = default)

Parameters

kernelId string

The kernel identifier

input object

The input data (dynamic typed)

ct CancellationToken

Cancellation token

Returns

ValueTask<object>

The kernel execution result

Remarks

This method provides dynamic kernel execution for scenarios where compile-time type information is not available. Use with caution. TODO: Implement full dynamic kernel execution support

GetDevicesAsync(CancellationToken)

Gets the list of available GPU devices

ValueTask<IReadOnlyList<GpuDevice>> GetDevicesAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

ValueTask<IReadOnlyList<GpuDevice>>

GetInfoAsync(CancellationToken)

Gets information about the GPU bridge and available resources

ValueTask<GpuBridgeInfo> GetInfoAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

ValueTask<GpuBridgeInfo>

GetKernelAsync<TIn, TOut>(KernelId, CancellationToken)

Gets a kernel executor for the specified kernel ID

ValueTask<IGpuKernel<TIn, TOut>> GetKernelAsync<TIn, TOut>(KernelId kernelId, CancellationToken ct = default) where TIn : notnull where TOut : notnull

Parameters

kernelId KernelId
ct CancellationToken

Returns

ValueTask<IGpuKernel<TIn, TOut>>

Type Parameters

TIn
TOut