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

Method BuildSignature

tensorflow/compiler/jit/xla_compilation_cache.cc:120–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120xla::StatusOr<XlaCompilationCache::Signature>
121XlaCompilationCache::BuildSignature(
122 const NameAttrList& function,
123 absl::Span<const XlaCompiler::Argument> args) {
124 Signature signature;
125 signature.name = Canonicalize(function.name(), AttrSlice(&function.attr()));
126 for (const XlaCompiler::Argument& arg : args) {
127 switch (arg.kind) {
128 case XlaCompiler::Argument::kConstant:
129 signature.arg_values.push_back(arg.constant_value);
130 break;
131 case XlaCompiler::Argument::kParameter:
132 case XlaCompiler::Argument::kResource:
133 signature.arg_shapes.emplace_back(arg.type, arg.DimensionSizes());
134 break;
135 default:
136 return errors::InvalidArgument(
137 "Unhandled argument kind in XlaCompilationCache: ",
138 arg.HumanString());
139 }
140 }
141 return std::move(signature);
142}
143
144Status XlaCompilationCache::BuildExecutable(
145 const XlaCompiler::Options& options,

Callers

nothing calls this directly

Calls 9

AttrSliceClass · 0.85
InvalidArgumentFunction · 0.85
attrMethod · 0.80
DimensionSizesMethod · 0.80
nameMethod · 0.65
CanonicalizeFunction · 0.50
push_backMethod · 0.45
emplace_backMethod · 0.45
HumanStringMethod · 0.45

Tested by

no test coverage detected