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

Method Verify

tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc:973–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973Status HloDataflowAnalysis::Verify() const {
974 // Verify each HloValue appears in the value sets that the value's positions()
975 // indicate.
976 for (const HloValue* value : values()) {
977 for (const HloPosition& position : value->positions()) {
978 const HloValueSet& value_set = GetValueSet(position);
979 TF_RET_CHECK(absl::c_linear_search(value_set.values(), value))
980 << "Value set at position " << position << " does not contain value "
981 << value->ToShortString();
982 }
983 }
984
985 // For each value in each value set, verify that the value set's position
986 // appears in the value's positions().
987 for (const auto& computation : module_.computations()) {
988 for (const auto& instruction : computation->instructions()) {
989 for (const auto& pair : GetInstructionValueSet(instruction)) {
990 const ShapeIndex& index = pair.first;
991 const HloValueSet& value_set = pair.second;
992 const HloPosition position{instruction, index};
993 for (const HloValue* value : value_set.values()) {
994 TF_RET_CHECK(absl::c_linear_search(value->positions(), position))
995 << "Value set at position " << position
996 << " unexpectedly contains value " << value->ToShortString();
997 }
998 }
999 }
1000 }
1001
1002 return Status::OK();
1003}
1004
1005bool HloDataflowAnalysis::DoesNotUseOperandBuffer(
1006 const HloInstruction* operand, const ShapeIndex& index,

Callers 1

RunMethod · 0.45

Calls 4

computationsMethod · 0.80
instructionsMethod · 0.80
valuesMethod · 0.45
ToShortStringMethod · 0.45

Tested by

no test coverage detected