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

Function Display

tensorflow/compiler/xla/tools/driver.cc:402–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402void Display(const void* buffer, const ArrayShape& shape) {
403 int num_elements = GetNumElements(shape);
404 switch (shape.type) {
405 case S16:
406 return DisplayT<short>(buffer, num_elements); // NOLINT
407 case S32:
408 return DisplayT<int>(buffer, num_elements);
409 case S64:
410 return DisplayT<long long>(buffer, num_elements); // NOLINT
411 case U8:
412 return DisplayT<unsigned char>(buffer, num_elements);
413 case U16:
414 return DisplayT<unsigned short>(buffer, num_elements); // NOLINT
415 case U32:
416 return DisplayT<unsigned int>(buffer, num_elements);
417 case U64:
418 return DisplayT<unsigned long long>(buffer, num_elements); // NOLINT
419 case F32:
420 return DisplayT<float>(buffer, num_elements);
421 case F64:
422 return DisplayT<double>(buffer, num_elements);
423
424 case F16:
425 case BF16:
426 case C64:
427 case C128:
428 ExitWithMsg("Unsupported type: " + ToString(shape.type));
429 }
430}
431
432void Display(const void* buffer, const TupleShape& shape) {
433 if (shape.elements.size() == 1) {

Callers 1

mainFunction · 0.85

Calls 4

GetNumElementsFunction · 0.85
ExitWithMsgFunction · 0.85
ToStringFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected