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
Methods
ExecuteAsync(ICompiledKernel, ExecutionConfiguration, KernelArguments, CancellationToken)
Executes a compiled kernel.
ValueTask<KernelExecutionResult> ExecuteAsync(ICompiledKernel kernel, ExecutionConfiguration configuration, KernelArguments arguments, CancellationToken cancellationToken = default)
Parameters
kernelICompiledKernelThe compiled kernel to execute.
configurationExecutionConfigurationExecution configuration.
argumentsKernelArgumentsKernel arguments.
cancellationTokenCancellationTokenCancellation 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
kernelICompiledKernelThe kernel to analyze.
dataSizeintThe size of the data to process.
Returns
- ExecutionConfiguration
Recommended execution configuration.
SynchronizeAsync(CancellationToken)
Synchronizes all pending operations.
ValueTask SynchronizeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken