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

Function ProgramShapesEqual

tensorflow/compiler/xla/tests/hlo_test_base.cc:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63bool ProgramShapesEqual(const ProgramShape& lhs, const ProgramShape& rhs) {
64 if (lhs.parameters_size() != rhs.parameters_size()) {
65 return false;
66 }
67 for (int i = 0; i < lhs.parameters_size(); i++) {
68 if (!ShapeUtil::Equal(lhs.parameters(i), rhs.parameters(i))) {
69 return false;
70 }
71 }
72 return ShapeUtil::Equal(lhs.result(), rhs.result());
73}
74
75ProgramShape GetProgramShapeWithLayout(const HloModule& module) {
76 ProgramShape program_shape;

Callers 1

MakeReferenceModuleMethod · 0.85

Calls 4

parameters_sizeMethod · 0.80
EqualClass · 0.50
parametersMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected