Class RingKernelConfig
- Namespace
- DotCompute.Backends.CUDA.RingKernels
- Assembly
- DotCompute.Backends.CUDA.dll
Configuration for a ring kernel compilation.
public sealed class RingKernelConfig
- Inheritance
-
RingKernelConfig
- Inherited Members
Remarks
This is a simplified data structure that contains the essential configuration without requiring a reference to the source generators. The source generator will extract these values from the RingKernelAttribute and pass them to the compiler.
Properties
BlockDimensions
Gets or sets the block dimensions.
public int[]? BlockDimensions { get; init; }
Property Value
- int[]
Domain
Gets or sets the application domain.
public RingKernelDomain Domain { get; init; }
Property Value
GridDimensions
Gets or sets the grid dimensions.
public int[]? GridDimensions { get; init; }
Property Value
- int[]
KernelId
Gets or sets the unique kernel identifier.
public required string KernelId { get; init; }
Property Value
MaxInputMessageSizeBytes
Gets or sets the maximum input message size in bytes.
public int MaxInputMessageSizeBytes { get; init; }
Property Value
Remarks
This determines the maximum size of a single input message payload. Used for buffer allocation on GPU device. Default: 65792 bytes (64KB + 256-byte header for MemoryPack serialization).
MaxOutputMessageSizeBytes
Gets or sets the maximum output message size in bytes.
public int MaxOutputMessageSizeBytes { get; init; }
Property Value
Remarks
This determines the maximum size of a single output message payload. Used for buffer allocation on GPU device. Default: 65792 bytes (64KB + 256-byte header for MemoryPack serialization).
MessageTypes
Gets or sets the list of message type names for automatic CUDA serialization includes.
public IReadOnlyList<string>? MessageTypes { get; init; }
Property Value
Remarks
Each message type name will be converted to an #include directive for its serialization file. For example, "VectorAdd" becomes #include "VectorAddSerialization.cu". If null or empty, no message includes will be generated.
MessagingStrategy
Gets or sets the message passing strategy.
public MessagePassingStrategy MessagingStrategy { get; init; }
Property Value
Mode
Gets or sets the execution mode.
public RingKernelMode Mode { get; init; }
Property Value
QueueCapacity
Gets or sets the ring buffer capacity (number of messages the queue can hold).
public int QueueCapacity { get; init; }
Property Value
Remarks
This determines how many messages can be buffered in the queue at once. Default: 1024 messages.
SharedMemorySize
Gets or sets the shared memory size in bytes.
public int SharedMemorySize { get; init; }
Property Value
UseSharedMemory
Gets or sets whether to use shared memory.
public bool UseSharedMemory { get; init; }