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

Method ParseShardingOnly

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

Source from the content-addressed store, hash-verified

4197}
4198
4199StatusOr<HloSharding> HloParserImpl::ParseShardingOnly() {
4200 lexer_.Lex();
4201 OpSharding op_sharding;
4202 if (!ParseSharding(&op_sharding)) {
4203 return InvalidArgument("Syntax error:\n%s", GetError());
4204 }
4205 if (lexer_.GetKind() != TokKind::kEof) {
4206 return InvalidArgument("Syntax error:\nExtra content after sharding");
4207 }
4208 return HloSharding::FromProto(op_sharding);
4209}
4210
4211StatusOr<FrontendAttributes> HloParserImpl::ParseFrontendAttributesOnly() {
4212 lexer_.Lex();

Callers 1

ParseShardingFunction · 0.80

Calls 4

ParseShardingFunction · 0.85
InvalidArgumentFunction · 0.85
LexMethod · 0.80
GetKindMethod · 0.80

Tested by

no test coverage detected