Home
last modified time | relevance | path

Searched refs:sharding_ (Results 1 – 8 of 8) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_sharding_metadata.cc404 if (sharding_ != nullptr) { in Clone()
405 sharding = absl::make_unique<HloSharding>(*sharding_); in Clone()
417 if (sharding_ == nullptr) { in Matches()
418 return other_ptr->sharding_ == nullptr; in Matches()
420 return other_ptr->sharding_ != nullptr in Matches()
421 ? ShardingMatches(*sharding_, *other_ptr->sharding_) in Matches()
426 if (sharding_ != nullptr) { in Hash()
427 return sharding_->Hash(); in Hash()
433 return sharding_ != nullptr ? sharding_->ToString() : "{}"; in ToString()
Dhlo_matchers.cc185 if (!sharding_.has_value()) { in MatchAndExplain()
193 if (instruction->sharding() == sharding_.value()) { in MatchAndExplain()
197 << " has incorrect sharding (expected: " << sharding_->ToString() in MatchAndExplain()
202 << " has no sharding (expected: " << sharding_->ToString() << ")"; in MatchAndExplain()
208 if (sharding_.has_value()) { in DescribeTo()
209 *os << sharding_->ToString(); in DescribeTo()
Dhlo_sharding_metadata.h31 : sharding_(std::move(sharding)) {} in ShardingMetadata()
43 const HloSharding* sharding() const { return sharding_.get(); } in sharding()
60 std::shared_ptr<const HloSharding> sharding_;
Dhlo_instruction.h1141 return *sharding_; in sharding()
1143 std::shared_ptr<const HloSharding> sharding_ptr() const { return sharding_; } in sharding_ptr()
1147 return sharding_ ? *sharding_ : default_; in sharding_or_default()
1151 if (sharding_ == nullptr) { in sharding_unique_device()
1154 return sharding_->UniqueDevice(); in sharding_unique_device()
1159 sharding_ = std::make_shared<const HloSharding>(sharding); in set_sharding()
1162 sharding_ = std::move(sharding); in set_sharding()
1170 void clear_sharding() { sharding_ = nullptr; } in clear_sharding()
1172 bool has_sharding() const { return sharding_ != nullptr; } in has_sharding()
1769 std::shared_ptr<const HloSharding> sharding_; variable
Dhlo_matchers.h139 : sharding_(sharding) {} in HloShardingMatcher()
146 absl::optional<HloSharding> sharding_;
Dhlo_instruction.cc1225 if (sharding_ != nullptr && ShapeUtil::CompatibleIgnoringElementType( in SetupDerivedInstruction()
1230 derived_instruction->set_sharding(*sharding_); in SetupDerivedInstruction()
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder.h159 void SetSharding(const OpSharding& sharding) { sharding_ = sharding; } in SetSharding()
163 void ClearSharding() { sharding_ = absl::nullopt; } in ClearSharding()
166 const absl::optional<OpSharding>& sharding() const { return sharding_; } in sharding()
703 absl::optional<OpSharding> sharding_; variable
Dxla_builder.cc2738 if (sharding_) { in AddInstruction()
2739 *instr.mutable_sharding() = *sharding_; in AddInstruction()