Skip to content

Commit efc83ae

Browse files
committed
Update on "[RPC profiling] Don't wrap toHere() calls with profiling"
server * #44664 [RPC profiling] Extend RPC profiling to support async function execution over RPC. * **#44655 [RPC profiling] Don't wrap toHere() calls with profiling** * #44653 [RPC profiling] Allow disableProfiler() to be called from another thread. * #44646 Remove thread_local RecordFunctionGuard from profiler. server * #44664 [RPC profiling] Extend RPC profiling to support async function execution over RPC. * **#44655 [RPC profiling] Don't wrap toHere() calls with profiling** * #44653 [RPC profiling] Allow disableProfiler() to be called from another thread. * #44646 Remove thread_local RecordFunctionGuard from profiler. Since `toHere()` does not execute operations (torch operators) over RPC and simply transfers the value to the local node, we don't need to enable the profiler remotely for this message. This causes unnecessary overhead and is not needed. Since `toHere` is a blocking call, we already profile the call on the local node using `RECORD_USER_SCOPE`, so this does not change the expected profiler results (validated by ensuring all remote profiling tests pass). Differential Revision: [D23641466](https://our.internmc.facebook.com/intern/diff/D23641466/) [ghstack-poisoned]
2 parents 693535c + 4d24954 commit efc83ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

c10/util/ThreadLocalDebugInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ std::shared_ptr<DebugInfoBase> ThreadLocalDebugInfo::_pop(DebugInfoKind kind) {
5454
/* static */
5555
std::shared_ptr<DebugInfoBase> ThreadLocalDebugInfo::_peek(DebugInfoKind kind) {
5656
TORCH_CHECK(
57-
debug_info && debug_info->kind_ == kind,
58-
"Expected debug info of type ", (size_t) kind);
59-
auto res = debug_info;
60-
return res->info_;
57+
debug_info && debug_info->kind_ == kind,
58+
"Expected debug info of type ",
59+
(size_t)kind);
60+
return debug_info->info_;
6161
}
6262

6363

0 commit comments

Comments
 (0)