Internal change / remove unused PrintSpeed

PiperOrigin-RevId: 853694463
This commit is contained in:
Jan Wassenberg 2026-01-08 05:25:54 -08:00 committed by Copybara-Service
parent 384c390181
commit 42e9cf557d
3 changed files with 3 additions and 11 deletions

View File

@ -53,7 +53,7 @@ extern int64_t first_target;
namespace HWY_NAMESPACE { namespace HWY_NAMESPACE {
void PrintSpeed(const Extents2D& A_extents, const Extents2D& B_extents, void PrintSpeed(const Extents2D& A_extents, const Extents2D& B_extents,
std::vector<double>& times, MMPerKey* per_key) { std::vector<double>& times) {
std::sort(times.begin(), times.end()); std::sort(times.begin(), times.end());
// bench_dnn reports the best and average, but the median seems more // bench_dnn reports the best and average, but the median seems more
// consistent and resistant to outliers. // 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); hwy::PreventElision(keep);
env.ctx.pools.MaybeStopSpinning(use_spinning); env.ctx.pools.MaybeStopSpinning(use_spinning);
PrintSpeed(A_extents, B_extents, times, per_key); PrintSpeed(A_extents, B_extents, times);
} }
using F32 = float; using F32 = float;

View File

@ -95,14 +95,6 @@ HWY_INLINE void MatMulSlow(const MatPtrT<TA> A, const MatPtrT<TB> 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 <typename TA, typename TB = TA, typename TC = float> template <typename TA, typename TB = TA, typename TC = float>
void TestMatMul(size_t rows_ac, size_t cols_a_rows_b, size_t cols_bc, bool add, void TestMatMul(size_t rows_ac, size_t cols_a_rows_b, size_t cols_bc, bool add,
MatMulEnv& env, int line) { MatMulEnv& env, int line) {

View File

@ -10,7 +10,7 @@
namespace gcpp { namespace gcpp {
// Zones for the profiler. // Zones for the profiler.
enum class Zones { // Keep sorted enum class Zones { // Keep sorted
kFlashAttentionFlashAttention, kFlashAttentionFlashAttention,
kFlashAttentionInclusive, kFlashAttentionInclusive,
kFlashAttentionRmsNormAndPositionalEncoding, kFlashAttentionRmsNormAndPositionalEncoding,