Disable applying XNNPACK delegate by default when benchmarking tflite inside XNNPACK/bench because the intention of those benchmarks is to compare the XNNPACK execution path against the original tflite CPU one.
PiperOrigin-RevId: 374579167
diff --git a/bench/average-pooling.cc b/bench/average-pooling.cc
index d4720bd..1a082d0 100644
--- a/bench/average-pooling.cc
+++ b/bench/average-pooling.cc
@@ -280,7 +280,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/bankers-rounding.cc b/bench/bankers-rounding.cc
index 09415cf..5cfab28 100644
--- a/bench/bankers-rounding.cc
+++ b/bench/bankers-rounding.cc
@@ -157,7 +157,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/ceiling.cc b/bench/ceiling.cc
index 6c2e164..729926a 100644
--- a/bench/ceiling.cc
+++ b/bench/ceiling.cc
@@ -157,7 +157,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/convolution.cc b/bench/convolution.cc
index 4616f5f..f49b460 100644
--- a/bench/convolution.cc
+++ b/bench/convolution.cc
@@ -672,7 +672,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/deconvolution.cc b/bench/deconvolution.cc
index 3d01df6..88de125 100644
--- a/bench/deconvolution.cc
+++ b/bench/deconvolution.cc
@@ -398,7 +398,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/elu.cc b/bench/elu.cc
index 5cd1eb9..9dacb33 100644
--- a/bench/elu.cc
+++ b/bench/elu.cc
@@ -157,7 +157,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/floor.cc b/bench/floor.cc
index 08fd7e9..53bfcc7 100644
--- a/bench/floor.cc
+++ b/bench/floor.cc
@@ -157,7 +157,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/hardswish.cc b/bench/hardswish.cc
index 385976d..1adb43e 100644
--- a/bench/hardswish.cc
+++ b/bench/hardswish.cc
@@ -159,7 +159,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/prelu.cc b/bench/prelu.cc
index 5c0700e..277c61c 100644
--- a/bench/prelu.cc
+++ b/bench/prelu.cc
@@ -180,7 +180,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/sigmoid.cc b/bench/sigmoid.cc
index 7c997bd..f1d46fa 100644
--- a/bench/sigmoid.cc
+++ b/bench/sigmoid.cc
@@ -232,7 +232,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/softmax.cc b/bench/softmax.cc
index d77e860..301eebe 100644
--- a/bench/softmax.cc
+++ b/bench/softmax.cc
@@ -231,7 +231,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {
diff --git a/bench/square-root.cc b/bench/square-root.cc
index 3c1f10b..2dc3aa1 100644
--- a/bench/square-root.cc
+++ b/bench/square-root.cc
@@ -157,7 +157,7 @@
builder.Finish(model_buffer);
const tflite::Model* model = tflite::GetModel(builder.GetBufferPointer());
- tflite::ops::builtin::BuiltinOpResolver resolver;
+ tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates resolver;
tflite::InterpreterBuilder interpreterBuilder(model, resolver);
std::unique_ptr<tflite::Interpreter> interpreter;
if (interpreterBuilder(&interpreter) != kTfLiteOk) {