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

Method HandleMap

tensorflow/compiler/xla/service/hlo_verifier.cc:760–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760Status ShapeVerifier::HandleMap(HloInstruction* map) {
761 std::vector<const Shape*> operand_shapes;
762 int64 max_operand_rank = 0;
763 for (const HloInstruction* operand : map->operands()) {
764 operand_shapes.push_back(&operand->shape());
765 max_operand_rank = std::max(max_operand_rank, operand->shape().rank());
766 }
767 // TODO(b/65689298) Remove code below once Map is generalized to accept
768 // arbitrary map dimensions.
769 std::vector<int64> map_dims(max_operand_rank);
770 std::iota(map_dims.begin(), map_dims.end(), 0);
771
772 TF_RETURN_IF_ERROR(CheckShape(
773 map,
774 ShapeInference::InferMapShape(
775 operand_shapes, map->to_apply()->ComputeProgramShape(), map_dims)));
776
777 return allow_mixed_precision_
778 ? Status::OK()
779 : SameElementTypesForOperandsAndToApplyParameters(
780 *map, map->operands().size());
781}
782
783Status ShapeVerifier::HandleReduceWindow(HloInstruction* reduce_window) {
784 TF_RETURN_IF_ERROR(CheckShape(

Callers

nothing calls this directly

Calls 11

to_applyMethod · 0.80
maxFunction · 0.50
operandsMethod · 0.45
push_backMethod · 0.45
shapeMethod · 0.45
rankMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
ComputeProgramShapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected