Table of Contents

Class GpuTrainingHistory<T>

Namespace
AiDotNet.PhysicsInformed
Assembly
AiDotNet.dll

Training history with GPU-specific metrics.

public class GpuTrainingHistory<T> : TrainingHistory<T>

Type Parameters

T

The numeric type.

Inheritance
GpuTrainingHistory<T>
Inherited Members

Remarks

For Beginners: This class tracks training progress including timing and memory metrics. These metrics help diagnose training issues and optimize performance.

Properties

AverageEpochTimeMs

Gets or sets the average time per epoch in milliseconds.

public double AverageEpochTimeMs { get; }

Property Value

double

KernelTimings

Gets or sets training timing statistics.

public Dictionary<string, long> KernelTimings { get; set; }

Property Value

Dictionary<string, long>

Remarks

Contains timing metrics such as:

  • "TotalEpochs" - Number of epochs trained
  • "AverageEpochMs" - Average time per epoch in milliseconds

PeakManagedMemoryBytes

Gets or sets the peak managed (heap) memory growth during training in bytes.

public long PeakManagedMemoryBytes { get; set; }

Property Value

long

Remarks

Important: This measures .NET managed memory growth (via GC.GetTotalMemory), NOT GPU device memory. Managed memory includes tensor allocations on the CPU heap but does not reflect actual GPU memory usage.

For GPU-specific memory profiling, use external tools:

  • NVIDIA: nvidia-smi, nvml library
  • AMD: rocm-smi
  • General: Visual Studio GPU profiler

TotalTrainingTimeMs

Gets or sets the total training time in milliseconds.

public long TotalTrainingTimeMs { get; set; }

Property Value

long

UseGpuAcceleration

Gets or sets whether GPU acceleration was used during training.

public bool UseGpuAcceleration { get; set; }

Property Value

bool