Table of Contents

Class KernelCatalog

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

Central catalog for resolving and managing GPU kernel registrations. Provides thread-safe kernel resolution with automatic CPU fallback.

public sealed class KernelCatalog
Inheritance
KernelCatalog
Inherited Members

Constructors

KernelCatalog(ILogger<KernelCatalog>, IOptions<KernelCatalogOptions>)

Initializes a new instance of the KernelCatalog class.

public KernelCatalog(ILogger<KernelCatalog> logger, IOptions<KernelCatalogOptions> options)

Parameters

logger ILogger<KernelCatalog>

Logger for catalog operations.

options IOptions<KernelCatalogOptions>

Catalog configuration options containing kernel descriptors.

Exceptions

ArgumentNullException

Thrown when logger or options are null.

Methods

ResolveAsync<TIn, TOut>(KernelId, IServiceProvider, CancellationToken)

Resolves a kernel instance by its identifier with the specified input and output types. Falls back to CPU passthrough if the kernel is not found in the catalog.

public Task<IGpuKernel<TIn, TOut>> ResolveAsync<TIn, TOut>(KernelId id, IServiceProvider sp, CancellationToken cancellationToken = default) where TIn : notnull where TOut : notnull

Parameters

id KernelId

The kernel identifier.

sp IServiceProvider

The service provider for dependency resolution.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task<IGpuKernel<TIn, TOut>>

A resolved kernel instance.

Type Parameters

TIn

The input type for the kernel.

TOut

The output type for the kernel.

Exceptions

InvalidOperationException

Thrown when kernel resolution fails.