MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / SetCurrentThreadName

Function SetCurrentThreadName

paddle/phi/core/os_info.cc:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106bool SetCurrentThreadName(const std::string& name) {
107 auto& instance = ThreadDataRegistry<std::string>::GetInstance();
108 const auto& cur_name = instance.GetCurrentThreadData();
109 if (!cur_name.empty() || name.empty() || name == kDefaultThreadName) {
110 return false;
111 }
112 instance.SetCurrentThreadData(name);
113 VLOG(4) << __func__ << " " << name;
114 return true;
115}
116
117uint32_t GetProcessId() {
118#if defined(_MSC_VER)

Callers 3

WorkerLoopMethod · 0.85
InitDevicesFunction · 0.85
TESTFunction · 0.85

Calls 3

GetInstanceFunction · 0.85
SetCurrentThreadDataMethod · 0.80
emptyMethod · 0.45

Tested by 1

TESTFunction · 0.68