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

Method ParseShapeOnly

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

Source from the content-addressed store, hash-verified

4185}
4186
4187StatusOr<Shape> HloParserImpl::ParseShapeOnly() {
4188 lexer_.Lex();
4189 Shape shape;
4190 if (!ParseShape(&shape)) {
4191 return InvalidArgument("Syntax error:\n%s", GetError());
4192 }
4193 if (lexer_.GetKind() != TokKind::kEof) {
4194 return InvalidArgument("Syntax error:\nExtra content after shape");
4195 }
4196 return shape;
4197}
4198
4199StatusOr<HloSharding> HloParserImpl::ParseShardingOnly() {
4200 lexer_.Lex();

Callers 1

ParseShapeFunction · 0.80

Calls 4

ParseShapeFunction · 0.85
InvalidArgumentFunction · 0.85
LexMethod · 0.80
GetKindMethod · 0.80

Tested by

no test coverage detected