You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/25 17:34:53 UTC

[GitHub] apeforest commented on a change in pull request #13990: [v1.4.x] Use CPUPinned context in ImageRecordIOParser2

apeforest commented on a change in pull request #13990: [v1.4.x] Use CPUPinned context in ImageRecordIOParser2
URL: https://github.com/apache/incubator-mxnet/pull/13990#discussion_r251068886
 
 

 ##########
 File path: src/io/iter_image_recordio_2.cc
 ##########
 @@ -285,9 +285,14 @@ inline bool ImageRecordIOParser2<DType>::ParseNext(DataBatch *out) {
     shape_vec.push_back(param_.label_width);
     TShape label_shape(shape_vec.begin(), shape_vec.end());
 
-    out->data.at(0) = NDArray(data_shape, Context::CPU(0), false,
+    auto ctx = Context::CPU(0);
+    auto dev_id = param_.device_id;
 
 Review comment:
   What if a device id is invalid or larger than the number of GPUs in the instance?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services