Table of Contents

Class GpuPipelineBuilder<TIn, TOut>

Namespace
Orleans.GpuBridge.BridgeFX
Assembly
Orleans.GpuBridge.BridgeFX.dll

Typed GPU pipeline builder for strongly-typed kernel execution

public sealed class GpuPipelineBuilder<TIn, TOut> where TIn : notnull where TOut : notnull

Type Parameters

TIn
TOut
Inheritance
GpuPipelineBuilder<TIn, TOut>
Inherited Members

Constructors

GpuPipelineBuilder(IGrainFactory, KernelId)

Initializes a new instance of the GpuPipelineBuilder<TIn, TOut> class.

public GpuPipelineBuilder(IGrainFactory grainFactory, KernelId kernelId)

Parameters

grainFactory IGrainFactory

The Orleans grain factory.

kernelId KernelId

The kernel identifier.

Methods

ExecuteAsync(IReadOnlyList<TIn>, CancellationToken)

Executes the pipeline with the given input data using parallel batch processing

public Task<IReadOnlyList<TOut>> ExecuteAsync(IReadOnlyList<TIn> input, CancellationToken cancellationToken = default)

Parameters

input IReadOnlyList<TIn>
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<TOut>>

Remarks

Uses SemaphoreSlim for concurrency control and implements retry logic with exponential backoff for failed batches (up to 3 attempts).

WithBatchSize(int)

Sets the batch size for processing

public GpuPipelineBuilder<TIn, TOut> WithBatchSize(int batchSize)

Parameters

batchSize int

Returns

GpuPipelineBuilder<TIn, TOut>

WithMaxConcurrency(int)

Sets the maximum concurrency for parallel batch execution

public GpuPipelineBuilder<TIn, TOut> WithMaxConcurrency(int maxConcurrency)

Parameters

maxConcurrency int

Maximum number of concurrent batch operations

Returns

GpuPipelineBuilder<TIn, TOut>

The pipeline builder for fluent chaining

Remarks

Controls how many batches can be processed in parallel. Default is 1 (sequential processing). TODO: Implement parallel batch execution using SemaphoreSlim or similar