internal framework cleanup

PiperOrigin-RevId: 338845109
Change-Id: Ied80113118202b030bafab20a5882ce72aa9128c
This commit is contained in:
A. Unique TensorFlower 2020-10-24 11:19:28 -07:00 committed by TensorFlower Gardener
parent 7e71a2732f
commit d3d44d02c8
2 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,9 @@ Benchmark::Benchmark(const string& device, Graph* g,
TF_CHECK_OK(NewExecutor(executor_type, params, *g, &exec_));
}
Benchmark::Benchmark(const string& device, Graph* g, bool old_benchmark_api)
: Benchmark(device, g, nullptr, nullptr, nullptr, "", old_benchmark_api) {}
Benchmark::~Benchmark() {
if (device_) {
rendez_->Unref();

View File

@ -57,6 +57,9 @@ class Benchmark {
const SessionOptions* options = nullptr, Graph* init = nullptr,
Rendezvous* rendez = nullptr, const char* executor_type = "",
bool old_benchmark_api = true);
Benchmark(const string& device, Graph* g, bool old_benchmark_api);
~Benchmark();
// Executes the graph for "iters" times.