Class KernelExecutionResult
- Namespace
- DotCompute.Abstractions.Ports
- Assembly
- DotCompute.Abstractions.dll
Result of kernel execution.
public sealed record KernelExecutionResult : IEquatable<KernelExecutionResult>
- Inheritance
-
KernelExecutionResult
- Implements
- Inherited Members
Properties
Duration
Execution duration.
public TimeSpan Duration { get; init; }
Property Value
ErrorMessage
Error message if failed.
public string? ErrorMessage { get; init; }
Property Value
GpuDuration
GPU-side duration if available.
public TimeSpan? GpuDuration { get; init; }
Property Value
Success
Whether execution succeeded.
public required bool Success { get; init; }
Property Value
Methods
Failed(string)
Creates a failed result.
public static KernelExecutionResult Failed(string error)
Parameters
errorstring
Returns
Succeeded(TimeSpan, TimeSpan?)
Creates a successful result.
public static KernelExecutionResult Succeeded(TimeSpan duration, TimeSpan? gpuDuration = null)