MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SchedClosure

Function SchedClosure

tensorflow/core/common_runtime/process_util.cc:166–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void SchedClosure(std::function<void()> closure) {
167 if (!tracing::EventCollector::IsEnabled()) {
168 return Env::Default()->SchedClosure(std::move(closure));
169 }
170 uint64 id = tracing::GetUniqueArg();
171 tracing::RecordEvent(tracing::EventCategory::kScheduleClosure, id);
172
173 Env::Default()->SchedClosure([id, closure = std::move(closure)]() {
174 tracing::ScopedRegion region(tracing::EventCategory::kRunClosure, id);
175 closure();
176 });
177}
178
179void SchedNonBlockingClosureAfter(int64 micros, std::function<void()> closure) {
180 Env::Default()->SchedClosureAfter(micros, std::move(closure));

Callers 15

TEST_FFunction · 0.85
GatherMethod · 0.85
ReduceMethod · 0.85
TEST_FFunction · 0.85
BroadcastMethod · 0.85
RunCollectiveMethod · 0.85
SchedClosureAfterMethod · 0.85
GCMethod · 0.85
CreateSessionMethod · 0.85
ExtendSessionMethod · 0.85
PartialRunSetupMethod · 0.85
RunStepMethod · 0.85

Calls 5

IsEnabledFunction · 0.85
DefaultFunction · 0.85
GetUniqueArgFunction · 0.85
RecordEventFunction · 0.85
SchedClosureMethod · 0.45

Tested by 8

TEST_FFunction · 0.68
GatherMethod · 0.68
ReduceMethod · 0.68
TEST_FFunction · 0.68
BroadcastMethod · 0.68
RunCollectiveMethod · 0.68
RecvBufAsyncMethod · 0.68
TEST_FFunction · 0.68