/external/tensorflow/tensorflow/compiler/xla/service/ |
D | hlo_phi_graph.h | 44 void RegisterPhi(const HloValue& value, 45 absl::Span<const HloValue* const> inputs); 47 HloValue::Id GetOptimizedId(const HloValue& value); 50 bool InputsEqualTo(const HloValue& value, 51 absl::Span<const HloValue* const> inputs); 55 HloValue::Id FindOptimizedValue(const HloValue::Id id); 71 HloValue::Id value_id; 79 Node* CreateOrReuseNode(const HloValue& value); 91 absl::flat_hash_map<Node*, std::vector<HloValue::Id>> node_to_value_id_; 94 absl::flat_hash_map<HloValue::Id, Node*> value_id_to_node_;
|
D | hlo_phi_graph_test.cc | 25 HloValue NewHloValue(bool is_phi) { in NewHloValue() 27 return HloValue(id++, dummy_inst_.get(), {}, is_phi); in NewHloValue() 45 HloValue A = NewHloValue(false); in TEST_F() 46 HloValue B = NewHloValue(true); in TEST_F() 58 HloValue A = NewHloValue(false); in TEST_F() 59 HloValue B = NewHloValue(true); in TEST_F() 72 HloValue A = NewHloValue(true); in TEST_F() 73 HloValue B = NewHloValue(true); in TEST_F() 74 HloValue C = NewHloValue(true); in TEST_F() 75 HloValue D = NewHloValue(false); in TEST_F() [all …]
|
D | hlo_dataflow_analysis.h | 96 const HloValue& GetValueDefinedAt(const HloInstruction* instruction, 98 HloValue& GetValueDefinedAt(const HloInstruction* instruction, 122 const HloValue& GetUniqueValueAt(const HloInstruction* instruction, 126 HloValue& GetUniqueValueAt(const HloInstruction* instruction, 132 const HloValue& GetValue(HloValue::Id value_id) const; 133 HloValue& GetValue(HloValue::Id value_id); 139 const std::vector<HloValue*>& values() const { return values_vector_; } in values() 194 HloValue* NewHloValue(HloInstruction* instruction, const ShapeIndex& index, 198 void MarkValueForDeletion(HloValue::Id value_id); 270 std::unordered_map<HloValue::Id, HloValue> values_; [all …]
|
D | hlo_alias_analysis.cc | 67 for (const HloValue* value : dataflow_.values()) { in BufferValueMap() 77 for (const HloValue* value : dataflow_.values()) { in MergeAliasedBuffers() 125 const absl::flat_hash_set<const HloValue*>& GetValuesInBuffer( in GetValuesInBuffer() 132 void NewBuffer(const HloValue& value) { in NewBuffer() 139 void MoveValueToNewBuffer(const HloValue& value) { in MoveValueToNewBuffer() 146 void MoveValueToBuffer(const HloValue& value, BufferNumber buffer_number) { in MoveValueToBuffer() 148 absl::flat_hash_set<const HloValue*>& old_value_set = in MoveValueToBuffer() 165 for (const HloValue* value : from_value_set) { in MergeBuffers() 171 BufferNumber GetBufferForValue(const HloValue& value) { in GetBufferForValue() 176 const HloValue& value, std::vector<BufferNumber>* aliased_buffers) { in ComputeInputOutputAliasedBuffers() [all …]
|
D | heap_simulator.h | 109 const absl::flat_hash_set<const HloValue*>* buffers_to_assign; 143 static StatusOr<Result<HloValue>> Run( 144 std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, 154 static StatusOr<Result<HloValue>> Run( 155 std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, 166 static StatusOr<Result<HloValue>> Run( 167 std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, 178 HeapSimulator(std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, 190 bool IgnoreBuffer(const HloValue* buffer) const; 191 void Alloc(const HloValue* buffer, const HloInstruction* instruction); [all …]
|
D | hlo_value.h | 100 class HloValue : public BufferValue { 103 static bool IdLessThan(const HloValue* a, const HloValue* b) { in IdLessThan() 108 static bool IdEqual(const HloValue* a, const HloValue* b) { in IdEqual() 116 HloValue(Id id, HloInstruction* instruction, const ShapeIndex& index, 118 ~HloValue() override {} in ~HloValue() 158 bool operator==(const HloValue& other) const; 159 bool operator!=(const HloValue& other) const; 183 std::ostream& operator<<(std::ostream& out, const HloValue& hlo_value); 197 explicit HloValueSet(absl::Span<const HloValue* const> values) in HloValueSet() 208 const std::vector<const HloValue*>& values() const { return values_; } in values() [all …]
|
D | hlo_value.cc | 71 HloValue::HloValue(HloValue::Id id, HloInstruction* instruction, in HloValue() function in xla::HloValue 78 bool HloValue::operator==(const HloValue& other) const { in operator ==() 86 bool HloValue::operator!=(const HloValue& other) const { in operator !=() 90 string HloValue::ToShortString() const { in ToShortString() 97 string HloValue::ToString(int indent) const { in ToString() 152 void HloValue::SetPositionsAndComputeUses( in SetPositionsAndComputeUses() 211 std::ostream& operator<<(std::ostream& out, const HloValue& value) { in operator <<() 217 absl::c_sort(values_, HloValue::IdLessThan); in SortAndUniquifyValues() 218 values_.erase(std::unique(values_.begin(), values_.end(), HloValue::IdEqual), in SortAndUniquifyValues() 225 absl::StrJoin(values_, ", ", [](string* result, const HloValue* value) { in ToString() [all …]
|
D | buffer_assignment.cc | 101 for (const HloValue* value : buffer.values()) { in HloBufferIsReadOnly() 234 const HloValue& buffer) const { in GetSlice() 239 void BufferAllocation::AddAssignment(const HloValue& buffer, int64 offset, in AddAssignment() 301 static bool CompareHloValuesById(const HloValue* a, const HloValue* b) { in CompareHloValuesById() 309 const HloValue* value = p.first; in GetEntryParameterInstruction() 324 const HloValue* value = p.first; in GetOutputInstruction() 368 std::vector<const HloValue*> sorted_buffers; in ToString() 373 for (const HloValue* buffer : sorted_buffers) { in ToString() 394 bool BufferAssignment::HasAllocation(const HloValue& value) const { in HasAllocation() 403 const HloValue& value) const { in GetAssignedAllocation() [all …]
|
D | hlo_phi_graph.cc | 21 HloValue::Id PhiGraph::GetOptimizedId(const HloValue& value) { in GetOptimizedId() 28 bool PhiGraph::InputsEqualTo(const HloValue& value, in InputsEqualTo() 29 absl::Span<const HloValue* const> inputs) { in InputsEqualTo() 32 absl::flat_hash_set<HloValue::Id> existing_set; in InputsEqualTo() 36 absl::flat_hash_set<HloValue::Id> new_set; in InputsEqualTo() 37 for (const HloValue* input : inputs) { in InputsEqualTo() 43 HloValue::Id PhiGraph::FindOptimizedValue(const HloValue::Id id) { in FindOptimizedValue() 50 PhiGraph::Node* PhiGraph::CreateOrReuseNode(const HloValue& value) { in CreateOrReuseNode() 91 for (HloValue::Id value_id : node_to_value_id_[node]) { in ReplaceNodeWith() 102 void PhiGraph::RegisterPhi(const HloValue& value, in RegisterPhi() [all …]
|
D | buffer_assignment.h | 160 const absl::flat_hash_map<const HloValue*, OffsetSize>& assigned_buffers() in assigned_buffers() 214 Slice GetSlice(const HloValue& buffer) const; 258 const std::vector<const HloValue*>& PeakMemoryLogicalBuffers() const { in PeakMemoryLogicalBuffers() 292 void AddAssignment(const HloValue& buffer, int64 offset, int64 size); 340 absl::flat_hash_map<const HloValue*, OffsetSize> assigned_buffers_; 346 std::vector<const HloValue*> peak_buffers_; 380 bool HasAllocation(const HloValue& value) const; 386 const BufferAllocation& GetAssignedAllocation(const HloValue& value) const; 430 const std::vector<const HloValue*>& GetSourceBuffers( in GetSourceBuffers() 529 void AddAssignment(BufferAllocation* allocation, const HloValue& value, [all …]
|
D | heap_simulator.cc | 59 HeapSimulator::Result<HloValue> result, in MinimumMemoryForModule() 61 absl::make_unique<NoFragmentationStatsHeap<HloValue>>(), *module, in MinimumMemoryForModule() 74 HeapSimulator::Result<HloValue> result, in MinimumMemoryForComputation() 76 absl::make_unique<NoFragmentationStatsHeap<HloValue>>(), computation, in MinimumMemoryForComputation() 88 HeapSimulator::Result<HloValue> result, in MinimumMemoryForComputation() 90 absl::make_unique<NoFragmentationStatsHeap<HloValue>>(), computation, in MinimumMemoryForComputation() 97 StatusOr<HeapSimulator::Result<HloValue>> HeapSimulator::Run( in Run() 98 std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, const HloModule& module, in Run() 115 StatusOr<HeapSimulator::Result<HloValue>> HeapSimulator::Run( in Run() 116 std::unique_ptr<HeapAlgorithm<HloValue>> algorithm, in Run() [all …]
|
D | hlo_ordering.h | 70 bool IsDefinedBefore(const HloValue& a, const HloValue& b) const; 75 const HloValue& value, 79 bool MayInterfere(const HloValue& a, const HloValue& b, 84 bool LiveRangeStrictlyBefore(const HloValue& a, const HloValue& b,
|
D | hlo_buffer.h | 87 HloBuffer(Id id, absl::Span<const HloValue* const> values) in HloBuffer() 94 const std::vector<const HloValue*>& values() const { return values_; } in values() 101 for (const HloValue* value : values()) { in color() 109 const HloValue& GetUniqueValue() const { in GetUniqueValue() 127 std::vector<const HloValue*> values_;
|
D | hlo_dataflow_analysis.cc | 132 const HloValue& HloDataflowAnalysis::GetValueDefinedAt( in GetValueDefinedAt() 138 HloValue& HloDataflowAnalysis::GetValueDefinedAt( in GetValueDefinedAt() 144 HloValue* HloDataflowAnalysis::NewHloValue(HloInstruction* instruction, in NewHloValue() 158 void HloDataflowAnalysis::MarkValueForDeletion(HloValue::Id value_id) { in MarkValueForDeletion() 159 HloValue& value = values_.at(value_id); in MarkValueForDeletion() 167 absl::flat_hash_set<HloValue::Id> id_set(value_ids_to_delete_.begin(), in DeleteMarkedValues() 176 for (const HloValue* value : value_set.values()) { in DeleteMarkedValues() 187 for (HloValue::Id value_id : id_set) { in DeleteMarkedValues() 205 for (const HloValue* value : value_set.values()) { in ToString() 214 for (const HloValue* value : top_level_value_set.values()) { in ToString() [all …]
|
D | heap_simulator_test.cc | 228 using CallSequence = std::vector<std::pair<string, const HloValue*>>; 231 class HeapCallRecorder : public HeapAlgorithm<HloValue> { 236 void Alloc(const HloValue* buffer, int64 size) override { in Alloc() 245 void ShareWith(const HloValue* buffer, const HloValue* shared, in ShareWith() 254 void Free(const HloValue* buffer, int64 size) override { in Free() 259 HeapSimulator::Result<HloValue> result; in Finish() 267 HeapSimulator::HeapResult<HloValue> result_; 333 const HloValue* BufferAt(const HloInstruction* instruction, in BufferAt() 340 const HloValue* buffer = BufferAt(instruction, index); in OffsetAt() 403 HeapSimulator::Result<HloValue> result_; [all …]
|
D | hlo_live_range.cc | 36 std::vector<const HloValue*> aliased_buffers; in NormalizeAliasedBuffers() 37 for (const HloValue* hlo_value : hlo_buffer.values()) { in NormalizeAliasedBuffers() 43 aliased_buffers, [&](const HloValue* value1, const HloValue* value2) { in NormalizeAliasedBuffers() 52 const HloValue* value1 = aliased_buffers[i]; in NormalizeAliasedBuffers() 53 const HloValue* value2 = aliased_buffers[i + 1]; in NormalizeAliasedBuffers() 131 for (const HloValue* value : alias_analysis_.dataflow_analysis().values()) { in CalculateBufferStartEndMap() 222 for (const HloValue* value : alias_analysis_.dataflow_analysis().values()) { in ToString()
|
D | hlo_alias_analysis.h | 50 const HloBuffer& GetBufferContainingValue(const HloValue& value) const { in GetBufferContainingValue() 53 HloBuffer& GetBufferContainingValue(const HloValue& value) { in GetBufferContainingValue() 110 bool ValueLivesOut(const HloValue& value) const { in ValueLivesOut() 138 absl::flat_hash_map<const HloValue*, HloBuffer*> value_to_buffer_;
|
D | copy_insertion.cc | 44 bool IsReadonlyEntryParameterValue(const HloValue& value) { in IsReadonlyEntryParameterValue() 52 bool IsConstantValue(const HloValue& value) { in IsConstantValue() 56 bool ValueIsReadOnly(const HloValue& value) { in ValueIsReadOnly() 82 bool ShouldCopyRootValue(const HloValue& value, in ShouldCopyRootValue() 472 explicit ValueNode(const HloValue* v) : value(v) {} in ValueNode() 474 const HloValue* value; 493 absl::flat_hash_map<const HloValue*, ValueNode*> value_to_node; in CopyRemover() 506 for (const HloValue* value_a : buffer.values()) { in CopyRemover() 511 for (const HloValue* value_b : buffer.values()) { in CopyRemover() 523 std::vector<const HloValue*> values = buffer.values(); in CopyRemover() [all …]
|
D | hlo_live_range.h | 77 const absl::flat_hash_map<const HloValue*, TimeBound>& buffer_live_ranges() in buffer_live_ranges() 82 absl::flat_hash_map<const HloValue*, TimeBound>& buffer_live_ranges() { in buffer_live_ranges() 206 absl::flat_hash_map<const HloValue*, TimeBound> buffer_live_ranges_;
|
D | hlo_ordering.cc | 143 bool HloOrdering::IsDefinedBefore(const HloValue& a, const HloValue& b) const { in IsDefinedBefore() 171 auto is_body_or_condition_phi = [](const HloValue& v) { in IsDefinedBefore() 213 absl::Span<const HloUse* const> uses, const HloValue& value, in UsesBeforeValueDefinition() 378 const HloValue& a, const HloValue& b, in LiveRangeStrictlyBefore() 434 bool HloOrdering::MayInterfere(const HloValue& a, const HloValue& b, in MayInterfere()
|
D | memory_space_assignment.h | 109 const GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval& interval, 241 const GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval& interval) in BufferIntervalAlternateMemoryBenefit() 344 const GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval& interval) 392 GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval; 394 GlobalDecreasingSizeBestFitHeap<HloValue>::BufferIntervalCompare; 396 std::function<bool(const HloValue&)>; 750 AllocationValue(const HloValue* value, const HloPosition& position, in AllocationValue() 761 const HloValue* value() const { return value_; } in value() 775 const HloValue* value_; 942 : public GlobalDecreasingSizeBestFitHeap<HloValue> { [all …]
|
D | memory_space_assignment_utils.h | 29 const GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval& 33 static bool IsValueAllowedInAlternateMemory(const HloValue* value);
|
D | hlo_buffer.cc | 47 for (const HloValue* value : values_) { in ComputePositions() 61 absl::StrJoin(values_, ", ", [](string* result, const HloValue* value) { in ToString()
|
D | memory_space_assignment_utils.cc | 24 const HloValue* value) { in IsValueAllowedInAlternateMemory() 110 const GlobalDecreasingSizeBestFitHeap<HloValue>::BufferInterval& interval) { in IsIntervalAllowedInAlternateMemory()
|
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/ |
D | alias_analysis.cc | 137 std::vector<const HloValue*> worklist; in GetNoaliasMetadataForBuffer() 152 for (const HloValue* buffer : in GetNoaliasMetadataForBuffer() 174 for (const HloValue* buffer : worklist) { in GetNoaliasMetadataForBuffer()
|