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

Function IsSmall

tensorflow/compiler/xla/service/hlo_graph_dumper.cc:121–127  ·  view source on GitHub ↗

We arbitrarily set this as the boundary between "large" and "small" instructions.

Source from the content-addressed store, hash-verified

119// We arbitrarily set this as the boundary between "large" and "small"
120// instructions.
121bool IsSmall(const HloInstruction* instr) {
122 if (ShapeUtil::HasPrimitiveType(instr->shape(), OPAQUE_TYPE) ||
123 ShapeUtil::HasPrimitiveType(instr->shape(), TOKEN)) {
124 return true;
125 }
126 return ShapeUtil::ElementsInRecursive(instr->shape()) < 4096;
127}
128
129// Node color schemes, used by NodeColorAttributes.
130enum ColorScheme {

Callers 2

GetInstructionColorMethod · 0.85

Calls 1

shapeMethod · 0.45

Tested by

no test coverage detected