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

Method replace_ref_input

tensorflow/core/framework/op_kernel.cc:421–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void OpKernelContext::replace_ref_input(int index, const Tensor& tensor,
422 bool lock_held) {
423 CHECK_GE(index, 0);
424 CHECK_LT(index, num_inputs());
425 CHECK(input_is_ref(index));
426 // should only modify the tensor while holding the mutex
427 if (lock_held) {
428 *(*params_->inputs)[index].tensor = tensor;
429 } else {
430 mutex_lock l(*input_ref_mutex(index));
431 *(*params_->inputs)[index].tensor = tensor;
432 }
433 record_tensor_reference(tensor);
434}
435
436void OpKernelContext::forward_ref_input_to_ref_output(int input_index,
437 int output_index) {

Callers 2

ComputeMethod · 0.80
ComputeMethod · 0.80

Calls 2

InvalidArgumentFunction · 0.85
InputRangeMethod · 0.80

Tested by

no test coverage detected