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

Method HandleSort

tensorflow/compiler/xla/service/hlo_cost_analysis.cc:887–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887Status HloCostAnalysis::HandleSort(const HloInstruction* sort) {
888 // This assumes a comparison based N*log(N) algorithm. As for all ops, the
889 // actual properties of the op depend on the backend implementation.
890 int64 elements = ShapeUtil::ElementsIn(sort->operand(0)->shape());
891 current_properties_[kFlopsKey] = elements * tensorflow::Log2Ceiling(elements);
892 return Status::OK();
893}
894
895Status HloCostAnalysis::HandleWhile(const HloInstruction* xla_while) {
896 // Since the number of iterations of the while node will not always be

Callers

nothing calls this directly

Calls 3

Log2CeilingFunction · 0.50
shapeMethod · 0.45
operandMethod · 0.45

Tested by

no test coverage detected