Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::AlgorithmProfiler Class Reference

Algorithm profiler for mixed-precision analysis. More...

#include <algorithm_profiler.hpp>

Static Public Member Functions

static AlgorithmProfile profileGEMM (uint64_t M, uint64_t N, uint64_t K, const std::string &precision, int bit_width, const CacheConfig &cache=CacheConfig())
 Profile a GEMM operation (C = A * B).
static AlgorithmProfile profileDotProduct (uint64_t N, const std::string &precision, int bit_width, const CacheConfig &cache=CacheConfig())
 Profile a dot product operation.
static AlgorithmProfile profileGEMV (uint64_t M, uint64_t N, const std::string &precision, int bit_width, const CacheConfig &cache=CacheConfig())
 Profile a matrix-vector multiply (y = A * x).
static AlgorithmProfile profileConv2D (uint64_t H, uint64_t W, uint64_t C_in, uint64_t C_out, uint64_t K, const std::string &precision, int bit_width, const CacheConfig &cache=CacheConfig())
 Profile convolution (simplified 2D).
static PrecisionComparison compare (const AlgorithmProfile &baseline, const AlgorithmProfile &alternative)
 Compare two profiles.
static void compareMultiple (std::ostream &ostr, const std::vector< AlgorithmProfile > &profiles)
 Generate comparison table for multiple precisions.

Detailed Description

Algorithm profiler for mixed-precision analysis.

Member Function Documentation

◆ compare()

PrecisionComparison sw::universal::AlgorithmProfiler::compare ( const AlgorithmProfile & baseline,
const AlgorithmProfile & alternative )
inlinestatic

Compare two profiles.

◆ compareMultiple()

void sw::universal::AlgorithmProfiler::compareMultiple ( std::ostream & ostr,
const std::vector< AlgorithmProfile > & profiles )
inlinestatic

Generate comparison table for multiple precisions.

◆ profileConv2D()

AlgorithmProfile sw::universal::AlgorithmProfiler::profileConv2D ( uint64_t H,
uint64_t W,
uint64_t C_in,
uint64_t C_out,
uint64_t K,
const std::string & precision,
int bit_width,
const CacheConfig & cache = CacheConfig() )
inlinestatic

Profile convolution (simplified 2D).

◆ profileDotProduct()

AlgorithmProfile sw::universal::AlgorithmProfiler::profileDotProduct ( uint64_t N,
const std::string & precision,
int bit_width,
const CacheConfig & cache = CacheConfig() )
inlinestatic

Profile a dot product operation.

◆ profileGEMM()

AlgorithmProfile sw::universal::AlgorithmProfiler::profileGEMM ( uint64_t M,
uint64_t N,
uint64_t K,
const std::string & precision,
int bit_width,
const CacheConfig & cache = CacheConfig() )
inlinestatic

Profile a GEMM operation (C = A * B).

◆ profileGEMV()

AlgorithmProfile sw::universal::AlgorithmProfiler::profileGEMV ( uint64_t M,
uint64_t N,
const std::string & precision,
int bit_width,
const CacheConfig & cache = CacheConfig() )
inlinestatic

Profile a matrix-vector multiply (y = A * x).


The documentation for this class was generated from the following file: