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

Function VariantDeviceCopy

tensorflow/core/framework/variant_op_registry.cc:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127Status VariantDeviceCopy(
128 const VariantDeviceCopyDirection direction, const Variant& from,
129 Variant* to,
130 const UnaryVariantOpRegistry::AsyncTensorDeviceCopyFn& copy_fn) {
131 UnaryVariantOpRegistry::AsyncVariantDeviceCopyFn* device_copy_fn =
132 UnaryVariantOpRegistry::Global()->GetDeviceCopyFn(direction,
133 from.TypeId());
134 if (device_copy_fn == nullptr) {
135 return errors::Internal(
136 "No unary variant device copy function found for direction: ",
137 direction, " and Variant type_index: ",
138 port::MaybeAbiDemangle(from.TypeId().name()));
139 }
140 return (*device_copy_fn)(from, to, copy_fn);
141}
142
143namespace {
144template <typename T>

Callers 4

CopyHostToDeviceFunction · 0.85
CopyDeviceToDeviceFunction · 0.85
CopyDeviceToHostFunction · 0.85
gpu_device.ccFile · 0.85

Calls 5

InternalFunction · 0.85
MaybeAbiDemangleFunction · 0.85
GetDeviceCopyFnMethod · 0.80
nameMethod · 0.65
TypeIdMethod · 0.45

Tested by

no test coverage detected