Table of Contents

Class CpuAcceleratorOptions

Namespace
DotCompute.Backends.CPU.Accelerators
Assembly
DotCompute.Backends.CPU.dll

Configuration options for the CPU accelerator.

public sealed class CpuAcceleratorOptions
Inheritance
CpuAcceleratorOptions
Inherited Members

Properties

ComputeThreadPriority

Gets or sets the thread priority for compute threads.

public ThreadPriority ComputeThreadPriority { get; set; }

Property Value

ThreadPriority

DisabledInstructionSets

Gets or sets instruction sets to avoid.

public IList<string> DisabledInstructionSets { get; }

Property Value

IList<string>

EffectiveVectorWidth

Gets the effective vector width based on configuration and hardware capabilities.

public int EffectiveVectorWidth { get; }

Property Value

int

The vector width in bits (128, 256, or 512).

EnableAutoVectorization

Gets or sets whether to enable automatic vectorization.

public bool EnableAutoVectorization { get; set; }

Property Value

bool

EnableFrequencyScalingDetection

Gets or sets whether to enable CPU frequency scaling detection.

public bool EnableFrequencyScalingDetection { get; set; }

Property Value

bool

EnableHardwareCounters

Gets or sets whether to enable hardware performance counters.

public bool EnableHardwareCounters { get; set; }

Property Value

bool

EnableKernelCaching

Gets or sets whether to enable kernel caching.

public bool EnableKernelCaching { get; set; }

Property Value

bool

EnableLoopUnrolling

Gets or sets whether to enable loop unrolling optimizations.

public bool EnableLoopUnrolling { get; set; }

Property Value

bool

EnableMemoryPrefetching

Gets or sets whether to enable memory prefetching.

public bool EnableMemoryPrefetching { get; set; }

Property Value

bool

EnableNumaAwareAllocation

Gets or sets whether to enable NUMA-aware memory allocation.

public bool EnableNumaAwareAllocation { get; set; }

Property Value

bool

EnableProfiling

Gets or sets whether to enable performance profiling.

public bool EnableProfiling { get; set; }

Property Value

bool

MaxCachedKernels

Gets or sets the maximum number of cached kernels.

public int MaxCachedKernels { get; set; }

Property Value

int

MaxMemoryAllocation

Gets or sets the maximum memory allocation size in bytes.

public long MaxMemoryAllocation { get; set; }

Property Value

long

MaxWorkGroupSize

Gets or sets the maximum work group size. If null, uses the system's processor count.

public int? MaxWorkGroupSize { get; set; }

Property Value

int?

MemoryAlignment

Gets or sets the memory alignment requirement in bytes.

public int MemoryAlignment { get; set; }

Property Value

int

MemoryPrefetchDistance

Gets or sets the memory prefetch distance in cache lines.

public int MemoryPrefetchDistance { get; set; }

Property Value

int

MinVectorizationWorkSize

Gets or sets the minimum work size for vectorization to be considered beneficial.

public int MinVectorizationWorkSize { get; set; }

Property Value

int

PerformanceMode

Gets or sets the performance mode for the CPU accelerator. Controls optimization level and resource usage patterns. Default: Balanced

public CpuPerformanceMode PerformanceMode { get; set; }

Property Value

CpuPerformanceMode

PreferPerformanceOverPower

Gets or sets whether to prefer performance over power efficiency.

public bool PreferPerformanceOverPower { get; set; }

Property Value

bool

PreferredInstructionSets

Gets or sets custom instruction set preferences. Empty list means use all available instruction sets.

public IList<string> PreferredInstructionSets { get; }

Property Value

IList<string>

ProfilingSamplingIntervalMs

Gets or sets the profiling sampling interval in milliseconds.

public int ProfilingSamplingIntervalMs { get; set; }

Property Value

int

TargetVectorWidth

Gets or sets the target vector width in bits. If 0, the system will automatically detect the best width.

public int TargetVectorWidth { get; set; }

Property Value

int

UseHugePages

Gets or sets whether to use huge pages when available.

public bool UseHugePages { get; set; }

Property Value

bool

Methods

GetEffectiveWorkGroupSize()

Gets the effective work group size based on configuration and system capabilities.

public int GetEffectiveWorkGroupSize()

Returns

int

ShouldUseInstructionSet(string)

Determines if the specified instruction set should be used.

public bool ShouldUseInstructionSet(string instructionSet)

Parameters

instructionSet string

Returns

bool

Validate()

Validates the options and returns any validation errors.

public IList<string> Validate()

Returns

IList<string>