Crate caffe2op_copy

source ·

Structs

  • | Copy input tensor into output to the | specific device |
  • | Copy input tensor into output, potentially | across devices. | | Github Links: | | - https://github.com/caffe2/caffe2/blob/master/caffe2/operators/copy_op.cc | | - https://github.com/caffe2/caffe2/blob/master/caffe2/operators/copy_op.h |
  • | This operator takes in a 2d tensor, a list of | indices, and a 1d tensor with the same width of | the 2d tensor. It will replace the rows in 2d | tensor specified in indices with the 2d | tensor. The operator does an in-place change to | the input tensor. | | Example: | INPUT_TENSOR = [[1, 2], [3, 4], [5, 6]] | INDICES = [1] | ROW = [9, 0] | OUTPUT_TENSOR = [[1, 2], [9, 0], [5, 6]]

Type Definitions

  • | Copy tensor for CPU to GPU context. Must | be run under GPU device option. |
  • | Take a CPU input tensor and copy it to | an output in the current | | Context (GPU or CPU). This may involves | cross-device MemCpy. |
  • | Copy tensor for GPU to CPU context. Must | be run under GPU device option. |