From 8fb9fe2d2c2f873d674f500fed8659bcaf025726 Mon Sep 17 00:00:00 2001 From: Carl Yang Date: Mon, 29 Oct 2018 16:23:51 -0700 Subject: [PATCH] [MXNET-1111] Remove CPUPinned in ImageRecordIter (#12666) * squash commit * get rid of argument * undo a lot of unnecessary changes * undo more changes * fix typo * fix lint * address comments and fix rebase mistake * fix typo made during rebase * revert cpu_pinned * revert changes, because works without needing to copy params to GPU. thanks @yuxihu for testing and @apeforest for raising this issue! * revert changes to comm and nccl --- src/io/iter_image_recordio_2.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/iter_image_recordio_2.cc b/src/io/iter_image_recordio_2.cc index f41483955494..b567c729736c 100644 --- a/src/io/iter_image_recordio_2.cc +++ b/src/io/iter_image_recordio_2.cc @@ -285,9 +285,9 @@ inline bool ImageRecordIOParser2::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::CPUPinned(0), false, + out->data.at(0) = NDArray(data_shape, Context::CPU(0), false, mshadow::DataType::kFlag); - out->data.at(1) = NDArray(label_shape, Context::CPUPinned(0), false, + out->data.at(1) = NDArray(label_shape, Context::CPU(0), false, mshadow::DataType::kFlag); unit_size_[0] = param_.data_shape.Size(); unit_size_[1] = param_.label_width;