From 42e9cf557d645ba49d7e8104222786a7b91e9108 Mon Sep 17 00:00:00 2001 From: Jan Wassenberg Date: Thu, 8 Jan 2026 05:25:54 -0800 Subject: [PATCH] Internal change / remove unused PrintSpeed PiperOrigin-RevId: 853694463 --- ops/bench_matmul.cc | 4 ++-- ops/matmul_test.cc | 8 -------- util/zones.h | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ops/bench_matmul.cc b/ops/bench_matmul.cc index 221405c..67c702f 100644 --- a/ops/bench_matmul.cc +++ b/ops/bench_matmul.cc @@ -53,7 +53,7 @@ extern int64_t first_target; namespace HWY_NAMESPACE { void PrintSpeed(const Extents2D& A_extents, const Extents2D& B_extents, - std::vector& times, MMPerKey* per_key) { + std::vector& times) { std::sort(times.begin(), times.end()); // bench_dnn reports the best and average, but the median seems more // consistent and resistant to outliers. @@ -134,7 +134,7 @@ void BenchMatMul(size_t M, size_t K, size_t N, bool add, MatMulEnv& env) { } hwy::PreventElision(keep); env.ctx.pools.MaybeStopSpinning(use_spinning); - PrintSpeed(A_extents, B_extents, times, per_key); + PrintSpeed(A_extents, B_extents, times); } using F32 = float; diff --git a/ops/matmul_test.cc b/ops/matmul_test.cc index a7a9862..5ae9e36 100644 --- a/ops/matmul_test.cc +++ b/ops/matmul_test.cc @@ -95,14 +95,6 @@ HWY_INLINE void MatMulSlow(const MatPtrT A, const MatPtrT B, }); } -void PrintSpeed(const char* algo, const Extents2D& A_extents, - const Extents2D& B_extents, double elapsed) { - const size_t num_b = B_extents.Area(); - // 2x because of FMA. - fprintf(stderr, " %10s: %f seconds, %.1f GFLOPS.\n", algo, - elapsed, 2 * 1E-9 * A_extents.rows * num_b / elapsed); -} - template void TestMatMul(size_t rows_ac, size_t cols_a_rows_b, size_t cols_bc, bool add, MatMulEnv& env, int line) { diff --git a/util/zones.h b/util/zones.h index f324086..ac96ad0 100644 --- a/util/zones.h +++ b/util/zones.h @@ -10,7 +10,7 @@ namespace gcpp { // Zones for the profiler. -enum class Zones { // Keep sorted +enum class Zones { // Keep sorted kFlashAttentionFlashAttention, kFlashAttentionInclusive, kFlashAttentionRmsNormAndPositionalEncoding,