[go: nahoru, domu]

Skip to content

Commit

Permalink
Clean-up TFLite benchmark tools TFLite resolver.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 634795383
  • Loading branch information
qukhan authored and tensorflower-gardener committed May 17, 2024
1 parent d12d0e0 commit 42ac0dd
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,18 +1100,8 @@ TfLiteStatus BenchmarkTfLiteModel::LoadModel() {

std::unique_ptr<tflite::OpResolver> BenchmarkTfLiteModel::GetOpResolver()
const {
tflite::ops::builtin::BuiltinOpResolver* resolver = nullptr;
// When --use_xnnpack is explicitly set to false, skip applying the default
// XNNPACK delegate in TfLite runtime so that the original execution path
// based on the unmodified model graph is still exercised.
if (params_.HasParam("use_xnnpack") &&
params_.HasValueSet<bool>("use_xnnpack") &&
!params_.Get<bool>("use_xnnpack")) {
resolver =
new tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates();
} else {
resolver = new tflite::ops::builtin::BuiltinOpResolver();
}
tflite::ops::builtin::BuiltinOpResolver* resolver =
new tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates();
RegisterSelectedOps(resolver);
return std::unique_ptr<tflite::OpResolver>(resolver);
}
Expand Down

0 comments on commit 42ac0dd

Please sign in to comment.