Skip to content

Commit f31f6cd

Browse files
author
zhenyanzhang
committed
[ez] Remove duplicate log_intermediate_output_delegate_helper
- Remove duplicate `log_intermediate_output_delegate_helper()` - Return directly rather than getting the value first. Differential Revision: [D72768360](https://our.internmc.facebook.com/intern/diff/D72768360/) ghstack-source-id: 277231224 Pull Request resolved: #10053
1 parent 1facfa9 commit f31f6cd

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

devtools/etdump/etdump_flatcc.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -323,40 +323,32 @@ Result<bool> ETDumpGen::log_intermediate_output_delegate(
323323
const char* name,
324324
DelegateDebugIntId delegate_debug_index,
325325
const ArrayRef<Tensor> output) {
326-
log_intermediate_output_delegate_helper(name, delegate_debug_index, output);
327-
Result<bool> result = log_intermediate_output_delegate_helper(
326+
return log_intermediate_output_delegate_helper(
328327
name, delegate_debug_index, output);
329-
return result;
330328
}
331329

332330
Result<bool> ETDumpGen::log_intermediate_output_delegate(
333331
const char* name,
334332
DelegateDebugIntId delegate_debug_index,
335333
const int& output) {
336-
log_intermediate_output_delegate_helper(name, delegate_debug_index, output);
337-
Result<bool> result = log_intermediate_output_delegate_helper(
334+
return log_intermediate_output_delegate_helper(
338335
name, delegate_debug_index, output);
339-
return result;
340336
}
341337

342338
Result<bool> ETDumpGen::log_intermediate_output_delegate(
343339
const char* name,
344340
DelegateDebugIntId delegate_debug_index,
345341
const bool& output) {
346-
log_intermediate_output_delegate_helper(name, delegate_debug_index, output);
347-
Result<bool> result = log_intermediate_output_delegate_helper(
342+
return log_intermediate_output_delegate_helper(
348343
name, delegate_debug_index, output);
349-
return result;
350344
}
351345

352346
Result<bool> ETDumpGen::log_intermediate_output_delegate(
353347
const char* name,
354348
DelegateDebugIntId delegate_debug_index,
355349
const double& output) {
356-
log_intermediate_output_delegate_helper(name, delegate_debug_index, output);
357-
Result<bool> result = log_intermediate_output_delegate_helper(
350+
return log_intermediate_output_delegate_helper(
358351
name, delegate_debug_index, output);
359-
return result;
360352
}
361353

362354
template <typename T>

0 commit comments

Comments
 (0)