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

Method ParseParamList

tensorflow/compiler/xla/service/hlo_parser.cc:3559–3577  ·  view source on GitHub ↗

param_list ::= '(' param_list1 ')' param_list1 ::= /*empty*/ ::= param (',' param) param ::= name shape

Source from the content-addressed store, hash-verified

3557// ::= param (',' param)*
3558// param ::= name shape
3559bool HloParserImpl::ParseParamList() {
3560 if (!ParseToken(TokKind::kLparen,
3561 "expects '(' at the beginning of param list")) {
3562 return false;
3563 }
3564
3565 if (lexer_.GetKind() == TokKind::kRparen) {
3566 // empty
3567 } else {
3568 do {
3569 Shape shape;
3570 std::string name;
3571 if (!ParseName(&name) || !ParseShape(&shape)) {
3572 return false;
3573 }
3574 } while (EatIfPresent(TokKind::kComma));
3575 }
3576 return ParseToken(TokKind::kRparen, "expects ')' at the end of param list");
3577}
3578
3579// dimension_sizes ::= '[' dimension_list ']'
3580// dimension_list

Callers

nothing calls this directly

Calls 2

ParseShapeFunction · 0.85
GetKindMethod · 0.80

Tested by

no test coverage detected