Class P2PMemoryCoherenceManager
- Namespace
- DotCompute.Core.Memory
- Assembly
- DotCompute.Core.dll
Advanced P2P memory coherence manager that maintains consistency across multiple GPU devices. Handles lazy synchronization, conflict resolution, and access pattern optimization.
public sealed class P2PMemoryCoherenceManager : IAsyncDisposable
- Inheritance
-
P2PMemoryCoherenceManager
- Implements
- Inherited Members
Constructors
P2PMemoryCoherenceManager(ILogger)
Initializes a new instance of the P2PMemoryCoherenceManager class.
public P2PMemoryCoherenceManager(ILogger logger)
Parameters
loggerILoggerThe logger.
Properties
OverheadPercentage
Gets coherence overhead percentage.
public double OverheadPercentage { get; }
Property Value
Methods
DisposeAsync()
Gets dispose asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
The result of the operation.
GetStatistics()
Gets comprehensive coherence statistics.
public CoherenceStatistics GetStatistics()
Returns
OptimizeP2PPlacementAsync(IAccelerator[], Dictionary<string, Dictionary<string, P2PConnectionCapability>>, CancellationToken)
Optimizes buffer placement based on P2P topology and access patterns.
public ValueTask OptimizeP2PPlacementAsync(IAccelerator[] devices, Dictionary<string, Dictionary<string, P2PConnectionCapability>> p2pMatrix, CancellationToken cancellationToken = default)
Parameters
devicesIAccelerator[]p2pMatrixDictionary<string, Dictionary<string, P2PConnectionCapability>>cancellationTokenCancellationToken
Returns
RecordBufferAccess<T>(IUnifiedMemoryBuffer<T>, AccessType)
Records a buffer access for coherence tracking and optimization.
public void RecordBufferAccess<T>(IUnifiedMemoryBuffer<T> buffer, AccessType accessType) where T : unmanaged
Parameters
bufferIUnifiedMemoryBuffer<T>accessTypeAccessType
Type Parameters
T
SynchronizeBufferAsync<T>(IUnifiedMemoryBuffer<T>, CancellationToken)
Synchronizes a buffer across all devices that have copies of it.
public ValueTask SynchronizeBufferAsync<T>(IUnifiedMemoryBuffer<T> buffer, CancellationToken cancellationToken = default) where T : unmanaged
Parameters
bufferIUnifiedMemoryBuffer<T>cancellationTokenCancellationToken
Returns
Type Parameters
T
TrackP2PBuffer<T>(P2PBuffer<T>, IUnifiedMemoryBuffer<T>, int, int, P2PConnectionCapability?)
Tracks a P2P buffer with coherence information and topology awareness.
public void TrackP2PBuffer<T>(P2PBuffer<T> buffer, IUnifiedMemoryBuffer<T> sourceBuffer, int offset, int count, P2PConnectionCapability? p2pCapability) where T : unmanaged
Parameters
bufferP2PBuffer<T>sourceBufferIUnifiedMemoryBuffer<T>offsetintcountintp2pCapabilityP2PConnectionCapability
Type Parameters
T