-
|
I have a question is that, when I use the fucn. of SyncCopyFromCPU(const mx_float *data, size_t size), I don't konw how to set the size is the have the most performance. What effects the 'size'? Does anyone konws how to set the parameter 'size' for SyncCopyFromCPU which will gain the best performance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@gxkevin Here are links that point to usage of this function in some of the examples. I hope this answers your question. @mxnet-label-bot add [Question, Pending Requester Info] |
Beta Was this translation helpful? Give feedback.
@gxkevin
The SyncCopyFromCPU() function is used to copy the data in source NDArray in contiguous CPU memory to a target NDArray.
The size parameter will be a product of all the dimensions of the shape of target NDArray.
Here are links that point to usage of this function in some of the examples. I hope this answers your question.
https://github.com/apache/incubator-mxnet/blob/4a9e9f67a5e7e5ddf2e394c6381f4f6449626af2/cpp-package/example/inference/inception_inference.cpp#L215
https://github.com/apache/incubator-mxnet/blob/4a9e9f67a5e7e5ddf2e394c6381f4f6449626af2/cpp-package/example/inference/inception_inference.cpp#L245
@mxnet-label-bot add [Question, Pending Requester Info]