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

Method RegisterBinaryOpFn

tensorflow/core/framework/variant_op_registry.cc:225–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void UnaryVariantOpRegistry::RegisterBinaryOpFn(
226 VariantBinaryOp op, const string& device, const TypeIndex& type_index,
227 const VariantBinaryOpFn& add_fn) {
228 VariantBinaryOpFn* existing = GetBinaryOpFn(op, device, type_index);
229 CHECK_EQ(existing, nullptr)
230 << "Unary VariantBinaryOpFn for type_index: "
231 << port::MaybeAbiDemangle(type_index.name())
232 << " already registered for device type: " << device;
233 binary_op_fns.insert(std::pair<FuncTuple<VariantBinaryOp>, VariantBinaryOpFn>(
234 {op, GetPersistentStringPiece(device), type_index}, add_fn));
235}
236
237namespace {
238template <typename T>

Callers 2

TESTFunction · 0.80

Calls 3

MaybeAbiDemangleFunction · 0.85
nameMethod · 0.65
insertMethod · 0.45

Tested by 1

TESTFunction · 0.64