Remove redunant condition check

This commit is contained in:
Michael Kuchnik 2020-11-02 17:04:48 -05:00
parent a57ecacbcb
commit 6f7d4ecf19

View File

@ -853,10 +853,6 @@ Status InstantiatedCapturedFunction::Run(
node->record_stop(EnvTime::NowNanos());
TF_RETURN_IF_ERROR(lib_->RunSync(std::move(f_opts), f_handle_, &frame));
node->record_start(EnvTime::NowNanos());
if (node) {
// TODO(b/129085499) Utilize the `node_name` which would be unique
// than the prefix for the function execution time statistics.
// prefix_with_func_name would then be node_name + func_name.
if (ctx->stats_aggregator()) {
string prefix_with_func_name =
strings::StrCat(node->name(), stats_utils::kDelimiter,
@ -867,7 +863,6 @@ Status InstantiatedCapturedFunction::Run(
node->num_elements());
}
node->add_processing_time(stats_collector->processing_time());
}
} else {
TF_RETURN_IF_ERROR(lib_->RunSync(std::move(f_opts), f_handle_, &frame));
}