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

Function AllocationTypeStr

paddle/phi/common/place.cc:28–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace phi {
27
28const char *AllocationTypeStr(AllocationType type) {
29 switch (type) {
30 case AllocationType::UNDEFINED:
31 return "undefined";
32 case AllocationType::CPU:
33 return "cpu";
34 case AllocationType::GPU:
35 return "gpu";
36 case AllocationType::GPUPINNED:
37 return "gpu_pinned";
38 case AllocationType::XPU:
39 return "xpu";
40 case AllocationType::XPUPINNED:
41 return "xpu_pinned";
42 case AllocationType::IPU:
43 return "ipu";
44 case AllocationType::CUSTOM:
45 return "custom_device";
46 default:
47 PD_THROW("Invalid phi device type.");
48 return {};
49 }
50}
51
52std::ostream &operator<<(std::ostream &os, AllocationType type) {
53 os << AllocationTypeStr(type);

Callers 9

check_generatorFunction · 0.85
place.ccFile · 0.85
DebugStringMethod · 0.85
operator()Method · 0.85
OffloadMethod · 0.85
OffloadWithOffsetMethod · 0.85
ReloadMethod · 0.85
PrintKernelTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected