tensorflow/compiler/xla/service/hlo_phi_graph.cc
// Returns true if the inputs to a hlo value are the same as `inputs`.
Returns true if the inputs to a hlo value are the same as `inputs`.
Returns true if the inputs to a hlo value are the same as ` inputs ` .
bool PhiGraph::InputsEqualTo(const HloValue& value,
                             absl::Span<const HloValue* const> inputs) {
  auto iter = value_id_to_node_.find(value.id());
  CHECK(iter != value_id_to_node_.end());
  absl::flat_hash_set<HloValue::Id> existing_set;
  for (Node* operand : iter->second->operands) {
    existing_set.insert(operand->value_id);
  }
  absl::flat_hash_set<HloValue::Id> new_set;
  for (const HloValue* input : inputs) {
    new_set.insert(input->id());
  }
  return existing_set == new_set;
}
bool PhiGraph :: InputsEqualTo ( const HloValue & value , absl :: Span < const HloValue * const > inputs ) { auto iter = value_id_to_node_ . find ( value . id ( ) ) ; CHECK ( iter != value_id_to_node_ . end ( ) ) ; absl :: flat_hash_set < HloValue :: Id > existing_set ; for ( Node * operand : iter -> second -> operands ) { existing_set . insert ( operand -> value_id ) ; } absl :: flat_hash_set < HloValue :: Id > new_set ; for ( const HloValue * input : inputs ) { new_set . insert ( input -> id ( ) ) ; } return existing_set == new_set ; }
Returns true if the inputs to a hlo value are the same as `inputs`.
Returns true if the inputs to a hlo value are the same as ` inputs ` .