Table of Contents

Class KernelExecutionResult

Namespace
DotCompute.Abstractions.Interfaces.Kernels
Assembly
DotCompute.Abstractions.dll

Kernel execution result.

public sealed class KernelExecutionResult
Inheritance
KernelExecutionResult
Inherited Members

Properties

AcceleratorName

Gets the name of the accelerator used for execution.

public string? AcceleratorName { get; init; }

Property Value

string

AcceleratorType

Gets the type of accelerator used for execution.

public AcceleratorType AcceleratorType { get; init; }

Property Value

AcceleratorType

BackendType

Gets the type of backend used for execution.

public string? BackendType { get; init; }

Property Value

string

ConfigurationUsed

Gets the execution configuration used.

public object? ConfigurationUsed { get; init; }

Property Value

object

Error

Gets the execution error if failed.

public Exception? Error { get; init; }

Property Value

Exception

ErrorMessage

Gets the error message if execution failed.

public string? ErrorMessage { get; init; }

Property Value

string

ExecutedAt

Gets when the kernel was executed.

public DateTime? ExecutedAt { get; init; }

Property Value

DateTime?

ExecutionId

Gets the execution ID (convenience accessor for Handle.Id).

public Guid ExecutionId { get; }

Property Value

Guid

Handle

Gets the execution handle.

public required KernelExecutionHandle Handle { get; init; }

Property Value

KernelExecutionHandle

KernelName

Gets the name of the kernel that was executed.

public string? KernelName { get; init; }

Property Value

string

OptimizationsApplied

Gets whether optimizations were applied during execution.

public bool? OptimizationsApplied { get; init; }

Property Value

bool?

Output

Gets the execution output data.

public object? Output { get; init; }

Property Value

object

PerformanceCounters

Gets performance counters if available.

public Dictionary<string, object>? PerformanceCounters { get; init; }

Property Value

Dictionary<string, object>

Success

Gets whether the execution was successful.

public required bool Success { get; init; }

Property Value

bool

Timings

Gets the execution timings if captured.

public KernelExecutionTimings? Timings { get; init; }

Property Value

KernelExecutionTimings

Methods

CreateFailure(KernelExecutionHandle, Exception)

Creates a failed execution result.

public static KernelExecutionResult CreateFailure(KernelExecutionHandle handle, Exception error)

Parameters

handle KernelExecutionHandle

The execution handle.

error Exception

The error that occurred.

Returns

KernelExecutionResult

A failed execution result.

CreateSuccess(KernelExecutionHandle)

Creates a successful execution result.

public static KernelExecutionResult CreateSuccess(KernelExecutionHandle handle)

Parameters

handle KernelExecutionHandle

The execution handle.

Returns

KernelExecutionResult

A successful execution result.