Table of Contents

Class PersistentKernelInstance

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

Represents a running persistent kernel instance

public sealed class PersistentKernelInstance : IDisposable
Inheritance
PersistentKernelInstance
Implements
Inherited Members

Constructors

PersistentKernelInstance(string, KernelId, IGpuKernel<byte[], byte[]>, PersistentKernelOptions, ILogger)

Initializes a new instance of the PersistentKernelInstance class.

public PersistentKernelInstance(string instanceId, KernelId kernelId, IGpuKernel<byte[], byte[]> kernel, PersistentKernelOptions options, ILogger logger)

Parameters

instanceId string

The unique instance identifier.

kernelId KernelId

The kernel identifier.

kernel IGpuKernel<byte[], byte[]>

The GPU kernel to execute.

options PersistentKernelOptions

The execution options.

logger ILogger

The logger for diagnostic output.

Properties

InstanceId

Gets the unique identifier for this kernel instance.

public string InstanceId { get; }

Property Value

string

KernelId

Gets the kernel identifier.

public KernelId KernelId { get; }

Property Value

KernelId

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetStatus()

Gets the current status of the kernel instance.

public KernelInstanceStatus GetStatus()

Returns

KernelInstanceStatus

The kernel instance status.

RestartAsync(CancellationToken)

Restarts the kernel instance by stopping and starting it.

public Task RestartAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token.

Returns

Task

A task representing the asynchronous operation.

StartAsync(CancellationToken)

Starts the kernel instance.

public Task StartAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token.

Returns

Task

A task representing the asynchronous operation.

StopAsync(CancellationToken)

Stops the kernel instance.

public Task StopAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token.

Returns

Task

A task representing the asynchronous operation.