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

Method ComputeBuffersAt

tensorflow/compiler/xla/service/hlo_alias_analysis.cc:361–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361std::vector<const HloBuffer*> HloAliasAnalysis::ComputeBuffersAt(
362 const HloInstruction* instruction, const ShapeIndex& index) const {
363 std::vector<const HloBuffer*> buffers;
364 for (const HloValue* value :
365 dataflow_analysis_->GetValueSet(instruction, index).values()) {
366 buffers.push_back(&GetBufferContainingValue(*value));
367 }
368
369 // Sort and uniquify vector before returning.
370 absl::c_sort(buffers, HloBuffer::IdLessThan);
371 buffers.erase(std::unique(buffers.begin(), buffers.end()), buffers.end());
372
373 return buffers;
374}
375
376bool HloAliasAnalysis::InstructionBuffersAreAmbiguous(
377 const HloInstruction* instruction) const {

Callers 4

ProcessMethod · 0.80
RunMethod · 0.80
AddSpecialCaseCopiesMethod · 0.80

Calls 6

uniqueFunction · 0.50
valuesMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected