Table of Contents

Class MPSPerformanceMetrics

Namespace
DotCompute.Backends.Metal.MPS
Assembly
DotCompute.Backends.Metal.dll

Performance metrics comparing MPS execution vs custom kernel execution.

public sealed record MPSPerformanceMetrics : IEquatable<MPSPerformanceMetrics>
Inheritance
MPSPerformanceMetrics
Implements
Inherited Members

Properties

CustomKernelTime

Time taken by custom kernel (if measured)

public TimeSpan CustomKernelTime { get; init; }

Property Value

TimeSpan

DataSize

Data size processed

public int DataSize { get; init; }

Property Value

int

GPUFamily

Device GPU family

public string GPUFamily { get; init; }

Property Value

string

MPSExecutionTime

Time taken by MPS execution

public TimeSpan MPSExecutionTime { get; init; }

Property Value

TimeSpan

MPSWasFaster

Whether MPS was faster than custom kernel

public bool MPSWasFaster { get; init; }

Property Value

bool

OperationType

Operation type that was executed

public MPSOperationType OperationType { get; init; }

Property Value

MPSOperationType

SpeedupFactor

Speedup factor (CustomTime / MPSTime)

public double SpeedupFactor { get; init; }

Property Value

double

Timestamp

Timestamp when measurement was taken

public DateTime Timestamp { get; init; }

Property Value

DateTime

Methods

Create(MPSOperationType, TimeSpan, TimeSpan, int, string)

Creates a performance metric from execution times.

public static MPSPerformanceMetrics Create(MPSOperationType operationType, TimeSpan mpsTime, TimeSpan customTime, int dataSize, string gpuFamily)

Parameters

operationType MPSOperationType
mpsTime TimeSpan
customTime TimeSpan
dataSize int
gpuFamily string

Returns

MPSPerformanceMetrics