mirror of https://github.com/google/gemma.cpp.git
Internal change / remove unused PrintSpeed
PiperOrigin-RevId: 853694463
This commit is contained in:
parent
384c390181
commit
42e9cf557d
|
|
@ -53,7 +53,7 @@ extern int64_t first_target;
|
|||
namespace HWY_NAMESPACE {
|
||||
|
||||
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());
|
||||
// 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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
void TestMatMul(size_t rows_ac, size_t cols_a_rows_b, size_t cols_bc, bool add,
|
||||
MatMulEnv& env, int line) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
namespace gcpp {
|
||||
|
||||
// Zones for the profiler.
|
||||
enum class Zones { // Keep sorted
|
||||
enum class Zones { // Keep sorted
|
||||
kFlashAttentionFlashAttention,
|
||||
kFlashAttentionInclusive,
|
||||
kFlashAttentionRmsNormAndPositionalEncoding,
|
||||
|
|
|
|||
Loading…
Reference in New Issue