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

Method ParseOpcode

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

Source from the content-addressed store, hash-verified

3942}
3943
3944bool HloParserImpl::ParseOpcode(HloOpcode* result) {
3945 VLOG(3) << "ParseOpcode";
3946 if (lexer_.GetKind() != TokKind::kIdent) {
3947 return TokenError("expects opcode");
3948 }
3949 std::string val = lexer_.GetStrVal();
3950 auto status_or_result = StringToHloOpcode(val);
3951 if (!status_or_result.ok()) {
3952 return TokenError(StrFormat("expects opcode but sees: %s, error: %s", val,
3953 status_or_result.status().error_message()));
3954 }
3955 *result = status_or_result.ValueOrDie();
3956 lexer_.Lex();
3957 return true;
3958}
3959
3960bool HloParserImpl::ParseFftType(FftType* result) {
3961 VLOG(3) << "ParseFftType";

Callers

nothing calls this directly

Calls 6

StringToHloOpcodeFunction · 0.85
GetKindMethod · 0.80
GetStrValMethod · 0.80
LexMethod · 0.80
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected