Skip to content

Commit 563f79f

Browse files
authored
Increase arena size to accomodate larger models. (#2188)
Note that http://b/297592546 was also uncovered while working on this change. Tested with http://b/297590931#comment2 BUG=http://b/297590931
1 parent c795f31 commit 563f79f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tensorflow/lite/micro/tools/benchmarking/generic_model_benchmark.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ constexpr uint32_t kRandomSeed = 0xFB;
5656
// Which format should be used to output debug information.
5757
constexpr PrettyPrintType kPrintType = PrettyPrintType::kTable;
5858

59-
constexpr size_t kTensorArenaSize = 1024 * 1024;
59+
constexpr size_t kTensorArenaSize = 3e6;
6060
constexpr int kNumResourceVariable = 100;
61-
constexpr size_t kModelSize = 511408;
61+
constexpr size_t kModelSize = 2e6;
6262

6363
void SetRandomInput(const uint32_t random_seed,
6464
tflite::MicroInterpreter& interpreter) {
@@ -86,7 +86,11 @@ bool ReadFile(const char* file_name, void* buffer, size_t buffer_size) {
8686
return false;
8787
}
8888
if (!feof(file.get())) {
89-
MicroPrintf("Model buffer is too small for the model.\n");
89+
// Note that http://b/297592546 can mean that this error message is
90+
// confusing.
91+
MicroPrintf(
92+
"Model buffer (%d bytes) is too small for the model (%d bytes).\n",
93+
buffer_size, bytes_read);
9094
return false;
9195
}
9296
if (bytes_read == 0) {

0 commit comments

Comments
 (0)