Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ cc_test(
":benchmark_helper",
":gemma_lib",
":test_util",
"@googletest//:gtest_main", # buildcleaner: keep
"//testing/base/public:gunit", # Defines its own main.
"@highway//:hwy",
"@highway//:hwy_test_util",
"@highway//:nanobenchmark",
Expand Down
6 changes: 6 additions & 0 deletions evals/gemma_batch_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <stdio.h>

#include <algorithm>
#include <cmath>
#include <random>
#include <string>
#include <vector>

Expand All @@ -25,6 +27,7 @@
#include "hwy/base.h"
#include "hwy/nanobenchmark.h"
#include "hwy/profiler.h"
#include "hwy/timer.h"

namespace gcpp {
namespace {
Expand Down Expand Up @@ -122,6 +125,9 @@ std::vector<std::string> GenerateInputs() {
}

TEST_F(GemmaBatchBench, RandomQuestionsBatched) {
if (s_env->GetGemma()->Config().IsEmbedding()) {
GTEST_SKIP() << "Embedding models do not generate";
}
s_env->SetMaxGeneratedTokens(12);
const std::vector<std::string> inputs = GenerateInputs();
constexpr size_t kNumReps = 7;
Expand Down
Loading