Enum ComputeDeviceType
- Namespace
- DotCompute.Abstractions.Models.Device
- Assembly
- DotCompute.Abstractions.dll
Defines the types of compute devices available in the DotCompute framework. Each device type has different characteristics, capabilities, and optimization strategies.
public enum ComputeDeviceType
Fields
Accelerator = 3Custom hardware accelerator device.
Accelerator devices include specialized processors like TPUs, DSPs, or custom ASICs. They are optimized for specific computational domains or algorithms. Examples include tensor processing units for AI, digital signal processors for audio/video processing, or custom chips for cryptocurrency mining.
CPU = 0Central Processing Unit (CPU) device.
CPU devices provide general-purpose computing with high single-threaded performance. They typically support complex control flow, large caches, and sophisticated branch prediction. Best suited for tasks requiring irregular memory access patterns, complex algorithms, or when debugging is needed.
FPGA = 2Field-Programmable Gate Array (FPGA) device.
FPGA devices offer customizable hardware acceleration with ultra-low latency. They can be reconfigured to implement specialized computational circuits. Best suited for high-frequency trading, real-time signal processing, custom algorithms, and applications requiring deterministic timing.
GPU = 1Graphics Processing Unit (GPU) device.
GPU devices excel at massively parallel computations with thousands of cores. They provide high memory bandwidth and are optimized for data-parallel workloads. Best suited for mathematical operations, image processing, machine learning, and scientific computing tasks that can be parallelized effectively.
Virtual = 4Virtual compute device for testing and simulation.
Virtual devices simulate hardware behavior without requiring physical hardware. They are useful for testing, debugging, profiling, and development scenarios where the target hardware is not available. Performance characteristics can be configured to match real hardware for accurate testing.
Remarks
The device type determines the compilation target, execution model, and available features. Different device types may support different kernel languages and optimization techniques.