| 3158 | } |
| 3159 | |
| 3160 | bool HloParserImpl::ParseComputationName(HloComputation** value) { |
| 3161 | std::string name; |
| 3162 | LocTy loc = lexer_.GetLoc(); |
| 3163 | if (!ParseName(&name)) { |
| 3164 | return Error(loc, "expects computation name"); |
| 3165 | } |
| 3166 | std::pair<HloComputation*, LocTy>* computation = |
| 3167 | tensorflow::gtl::FindOrNull(computation_pool_, name); |
| 3168 | if (computation == nullptr) { |
| 3169 | return Error(loc, StrCat("computation does not exist: ", name)); |
| 3170 | } |
| 3171 | *value = computation->first; |
| 3172 | return true; |
| 3173 | } |
| 3174 | |
| 3175 | // ::= '{' size stride? pad? lhs_dilate? rhs_dilate? '}' |
| 3176 | // The subattributes can appear in any order. 'size=' is required, others are |
nothing calls this directly
no test coverage detected