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

Method GetCompositeOpScopes

tensorflow/cc/framework/scope.cc:479–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479CompositeOpScopes Scope::GetCompositeOpScopes(
480 const string& composite_op_name) const {
481 if (impl()->op_name_.empty() && composite_op_name.empty()) {
482 UpdateStatus(errors::InvalidArgument(
483 "Cannot create composite op scopes with empty name"));
484 return {*this, *this};
485 }
486 if (!impl()->single_use_scope()) {
487 Scope child = NewSubScope(impl()->op_name_.empty() ? composite_op_name
488 : impl()->op_name_);
489 const string child_op_sep = impl()->name_.empty() ? "" : kSuffixSeparator;
490 const string child_name =
491 strings::StrCat(impl()->name_, child_op_sep, child.impl()->name_);
492 return {child,
493 Scope(new Impl(child, Impl::Tags::SingleUseScope(), child_name))};
494 } else {
495 return {Scope(new Impl(*this, Impl::Tags::ScopeName(), impl()->op_name_,
496 true /* copy_names */)),
497 *this};
498 }
499}
500
501Status Scope::DoShapeInference(Node* node) const {
502 if (impl_->disable_shape_inference_) return Status::OK();

Callers 4

AnotherCompositeOpFunction · 0.80
LinearOpFunction · 0.80
TESTFunction · 0.80
LinearFunction · 0.80

Calls 8

InvalidArgumentFunction · 0.85
SingleUseScopeEnum · 0.85
ScopeNameEnum · 0.85
single_use_scopeMethod · 0.80
ScopeClass · 0.70
StrCatFunction · 0.50
emptyMethod · 0.45
implMethod · 0.45

Tested by 4

AnotherCompositeOpFunction · 0.64
LinearOpFunction · 0.64
TESTFunction · 0.64
LinearFunction · 0.64