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

Method DebugString

paddle/phi/common/place.cc:67–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 .GetOrRegisterGlobalDeviceTypeId(dev_type)) {}
66
67std::string Place::DebugString() const {
68 std::ostringstream os;
69 os << "Place(";
70 if (alloc_type_ == AllocationType::CUSTOM) {
71 os << phi::CustomRegisteredDeviceMap::Instance().GetGlobalDeviceType(
72 device_type_id_);
73 } else {
74 os << AllocationTypeStr(alloc_type_);
75 }
76 if (alloc_type_ == AllocationType::GPUPINNED ||
77 alloc_type_ == AllocationType::XPUPINNED ||
78 alloc_type_ == AllocationType::CPU) {
79 os << ")";
80 } else {
81 os << ":" << std::to_string(device) << ")";
82 }
83 return os.str();
84}
85
86std::ostream &operator<<(std::ostream &os, const Place &p) {
87 os << p.DebugString();

Callers 4

init_holderMethod · 0.45
FromBlobImplFunction · 0.45
place.ccFile · 0.45
PlaceToStringFunction · 0.45

Calls 5

InstanceFunction · 0.85
AllocationTypeStrFunction · 0.85
GetGlobalDeviceTypeMethod · 0.80
to_stringFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected