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

Method DefaultAction

tensorflow/compiler/xla/service/dynamic_padder.cc:942–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940};
941
942Status DynamicShapeRemovingVisitor::DefaultAction(HloInstruction* hlo) {
943 // Default rule: If input to an op is static, remove dynamism in output.
944 bool input_is_dynamic = false;
945 // Default rule:
946 for (int64 i = 0; i < hlo->operand_count(); ++i) {
947 if (!hlo->operand(i)->shape().is_static()) {
948 input_is_dynamic = true;
949 }
950 }
951
952 if (!input_is_dynamic) {
953 hlo->mutable_shape()->clear_dynamic_dimensions();
954 }
955 return Status::OK();
956}
957
958Status DynamicShapeRemovingVisitor::HandleCustomCall(HloInstruction* hlo) {
959 if (hlo->custom_call_target() == "SliceToDynamic") {

Callers

nothing calls this directly

Calls 6

operand_countMethod · 0.80
is_staticMethod · 0.80
shapeMethod · 0.45
operandMethod · 0.45
mutable_shapeMethod · 0.45

Tested by

no test coverage detected