Class ManagedCompiledKernel
- Namespace
- DotCompute.Abstractions.Kernels.Compilation
- Assembly
- DotCompute.Abstractions.dll
Abstract representation of a managed compiled kernel. This interface provides a contract for kernel execution statistics and lifecycle management.
public abstract class ManagedCompiledKernel : IAsyncDisposable
- Inheritance
-
ManagedCompiledKernel
- Implements
- Inherited Members
Properties
AverageExecutionTime
Gets the average execution time per invocation.
public abstract TimeSpan AverageExecutionTime { get; }
Property Value
- TimeSpan
The mean execution time, or zero if no executions have occurred.
CompilationTime
Gets the compilation timestamp.
public abstract DateTimeOffset CompilationTime { get; }
Property Value
- DateTimeOffset
The date and time when this kernel was compiled.
Device
Gets the target device.
public abstract IAccelerator Device { get; }
Property Value
- IAccelerator
The accelerator device this kernel was compiled for.
ExecutionCount
Gets the number of times this kernel has been executed.
public abstract long ExecutionCount { get; }
Property Value
- long
The total execution count since compilation.
Kernel
Gets the compiled kernel implementation.
public abstract ICompiledKernel Kernel { get; }
Property Value
- ICompiledKernel
The compiled kernel implementation.
Name
Gets the kernel name.
public abstract string Name { get; }
Property Value
- string
The unique name identifier for this kernel.
TotalExecutionTime
Gets the total execution time across all invocations.
public abstract TimeSpan TotalExecutionTime { get; }
Property Value
- TimeSpan
The cumulative execution time for all kernel invocations.
Methods
DisposeAsync()
Asynchronously disposes the managed kernel and its resources.
public abstract ValueTask DisposeAsync()
Returns
- ValueTask
A task representing the disposal operation.
RecordExecution(double)
Records an execution of this kernel for performance tracking. Thread-safe method to update execution statistics.
public abstract void RecordExecution(double executionTimeMs)
Parameters
executionTimeMsdoubleThe execution time in milliseconds for this invocation.
Exceptions
- ArgumentOutOfRangeException
Thrown when executionTimeMs is negative.