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

Method Match

tensorflow/compiler/xla/service/pattern_matcher.h:956–969  ·  view source on GitHub ↗

Returns true and captures the shape iff it matches the pattern.

Source from the content-addressed store, hash-verified

954
955 // Returns true and captures the shape iff it matches the pattern.
956 bool Match(const ::xla::Shape* shape, MatchOption option) const {
957 if (impl_.Match(shape, option)) {
958 if (option.capture && matched_shape_) {
959 *matched_shape_ = shape;
960 }
961 return true;
962 }
963 if (shape) {
964 EXPLAIN << "\nin "
965 << (shape->has_layout() ? ShapeUtil::HumanStringWithLayout(*shape)
966 : ShapeUtil::HumanString(*shape));
967 }
968 return false;
969 }
970
971 // Returns true and captures the shape iff it matches the pattern.
972 bool Match(::xla::Shape* shape, MatchOption option) const {

Callers

nothing calls this directly

Calls 2

has_layoutMethod · 0.80
MatchMethod · 0.45

Tested by

no test coverage detected