PerformanceBenchmark

Performance benchmarking utilities for StableHLO conversion.

This class provides comprehensive benchmarking capabilities for measuring the performance of StableHLO conversion operations, including timing, memory usage, and throughput metrics.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun benchmarkConversion(converter: StableHloConverter, graph: ComputeGraph, functionName: String = "main"): ConversionMetrics

Benchmark a single conversion operation

Link copied to clipboard

Benchmark memory usage during conversion

Link copied to clipboard
fun benchmarkMultipleRuns(converter: StableHloConverter, graph: ComputeGraph, runs: Int = 10, testName: String = "Conversion Benchmark"): BenchmarkResults

Run multiple benchmark iterations and collect statistics

Link copied to clipboard
fun benchmarkThroughput(converter: StableHloConverter, graphs: List<ComputeGraph>, timeLimit: Duration = Duration.parse("10s")): ThroughputMetrics

Benchmark conversion throughput (operations per second)

Link copied to clipboard

Compare performance between different converters

Link copied to clipboard

Generate a performance report