BalancedTernaryEngine.Benchmark (balanced_ternary_engine v0.1.0-dev)

Copy Markdown

Simple benchmarking helpers for conversion and runtime execution.

Summary

Functions

benchmark_conversion(input_path, output_path, opts \\ [])

@spec benchmark_conversion(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

benchmark_runtime(runtime, input)

@spec benchmark_runtime(BalancedTernaryEngine.Runtime.t(), Nx.Tensor.t()) ::
  {:ok, map()}

measure(fun)

@spec measure((-> any())) :: %{time_us: non_neg_integer(), result: any()}