Fixed the delegate memory ownership issue w/ the benchmark model tool.
PiperOrigin-RevId: 302360006 Change-Id: I5cb9bd50463448d96076f27a864b939ca30e72f8
This commit is contained in:
parent
85b36ef350
commit
0c487d6417
@ -646,6 +646,7 @@ TfLiteStatus BenchmarkTfLiteModel::Init() {
|
||||
<< " delegate, and the model graph will be "
|
||||
<< delegate_status << " executed w/ the delegate.";
|
||||
}
|
||||
owned_delegates_.emplace_back(std::move(delegate));
|
||||
}
|
||||
|
||||
auto interpreter_inputs = interpreter_->inputs();
|
||||
|
@ -119,6 +119,8 @@ class BenchmarkTfLiteModel : public BenchmarkModel {
|
||||
std::unique_ptr<BenchmarkListener> profiling_listener_ = nullptr;
|
||||
std::unique_ptr<BenchmarkListener> ruy_profiling_listener_ = nullptr;
|
||||
std::mt19937 random_engine_;
|
||||
|
||||
std::vector<Interpreter::TfLiteDelegatePtr> owned_delegates_;
|
||||
};
|
||||
|
||||
} // namespace benchmark
|
||||
|
Loading…
x
Reference in New Issue
Block a user