Table of Contents

Interface IKernelExecutionPort

Namespace
DotCompute.Abstractions.Ports
Assembly
DotCompute.Abstractions.dll

Port interface for kernel execution operations. Part of hexagonal architecture - defines the contract that backend adapters must implement.

public interface IKernelExecutionPort

Properties

Capabilities

Gets execution capabilities.

ExecutionCapabilities Capabilities { get; }

Property Value

ExecutionCapabilities

Methods

ExecuteAsync(ICompiledKernel, ExecutionConfiguration, KernelArguments, CancellationToken)

Executes a compiled kernel.

ValueTask<KernelExecutionResult> ExecuteAsync(ICompiledKernel kernel, ExecutionConfiguration configuration, KernelArguments arguments, CancellationToken cancellationToken = default)

Parameters

kernel ICompiledKernel

The compiled kernel to execute.

configuration ExecutionConfiguration

Execution configuration.

arguments KernelArguments

Kernel arguments.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<KernelExecutionResult>

Execution result with timing information.

GetOptimalConfiguration(ICompiledKernel, int)

Gets the optimal execution configuration for a kernel.

ExecutionConfiguration GetOptimalConfiguration(ICompiledKernel kernel, int dataSize)

Parameters

kernel ICompiledKernel

The kernel to analyze.

dataSize int

The size of the data to process.

Returns

ExecutionConfiguration

Recommended execution configuration.

SynchronizeAsync(CancellationToken)

Synchronizes all pending operations.

ValueTask SynchronizeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask