HardwareCostModel<T>

Models & Types · AiDotNet.AutoML.NAS

Models hardware costs for neural architecture search operations using FLOP-based estimation. Supports latency, energy, and memory cost estimation for different hardware platforms.

Constructors

Constructor Summary
HardwareCostModel(HardwarePlatform platform)

Properties

Property Summary
HardwarePlatform Platform { get; } Gets the target hardware platform.
PlatformCharacteristics Characteristics { get; } Gets the platform characteristics used for cost estimation.

Methods

Method Summary
Dictionary<string, HardwareCost<T>> GetCostBreakdown(Architecture<T> architecture, int inputChannels, int spatialSize) Gets a breakdown of costs per operation in the architecture.
HardwareCost<T> EstimateArchitectureCost(Architecture<T> architecture, int inputChannels, int spatialSize) Estimates the total cost for an entire architecture.
HardwareCost<T> EstimateOperationCost(string operation, int inputChannels, int outputChannels, int spatialSize) Estimates the hardware cost for a given operation using FLOP-based calculation.
bool MeetsConstraints(Architecture<T> architecture, HardwareConstraints<T> constraints, int inputChannels, int spatialSize) Checks if an architecture meets the hardware constraints.
double CalculateOperationFlops(string operation, int inputChannels, int outputChannels, int spatialSize) Calculates the number of floating-point operations for a given operation.
double CalculateOperationMemory(string operation, int inputChannels, int outputChannels, int spatialSize) Calculates the memory footprint (weights) for a given operation in bytes.
double GetCalibrationFactor(string operation) Gets the calibration factor for an operation, or 1.0 if not set.
double GetTotalFlops(Architecture<T> architecture, int inputChannels, int spatialSize) Calculates total FLOPs for an architecture.
double GetTotalParameters(Architecture<T> architecture, int inputChannels) Calculates total parameters (weights) for an architecture.
void ClearCalibration() Clears all calibration factors.
void SetCalibrationFactor(string operation, double factor) Sets a calibration factor for a specific operation based on actual measurements.