This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Use CPUPinned context in ImageRecordIOParser2 #13980
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mxnet-label-bot update [pr-work-in-progress] |
@eric-haibin-lin Could you please help to review this PR. You have raised some concerns on this change in #12666 earlier. |
ptrendx
reviewed
Jan 24, 2019
@mxnet-label-bot update [pr-awaiting-review] |
marcoabreu
added
pr-awaiting-review
PR is waiting for code review
and removed
pr-work-in-progress
PR is still work in progress
labels
Jan 24, 2019
@apeforest @ctcyang @eric-haibin-lin @szha please help review and merge. |
yuxihu
changed the title
[WIP] Use CPUPinned context in ImageRecordIOParser2
Use CPUPinned context in ImageRecordIOParser2
Jan 24, 2019
apeforest
approved these changes
Jan 25, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
eric-haibin-lin
approved these changes
Jan 25, 2019
yuxihu
added a commit
to yuxihu/incubator-mxnet
that referenced
this pull request
Jan 25, 2019
* create NDArray with CPUPinned context in ImageRecordIOParser2 * update document * use -1 device_id as an option to create CPU(0) context * retrigger CI * fix cpplint error
eric-haibin-lin
pushed a commit
that referenced
this pull request
Jan 25, 2019
jessr92
pushed a commit
to jessr92/incubator-mxnet
that referenced
this pull request
Jan 27, 2019
* create NDArray with CPUPinned context in ImageRecordIOParser2 * update document * use -1 device_id as an option to create CPU(0) context * retrigger CI * fix cpplint error
stephenrawls
pushed a commit
to stephenrawls/incubator-mxnet
that referenced
this pull request
Feb 16, 2019
* create NDArray with CPUPinned context in ImageRecordIOParser2 * update document * use -1 device_id as an option to create CPU(0) context * retrigger CI * fix cpplint error
lanking520
pushed a commit
to lanking520/incubator-mxnet
that referenced
this pull request
Feb 18, 2019
…13990) * create NDArray with CPUPinned context in ImageRecordIOParser2 * update document * use -1 device_id as an option to create CPU(0) context * retrigger CI * fix cpplint error
haohuanw
pushed a commit
to haohuanw/incubator-mxnet
that referenced
this pull request
Jun 23, 2019
* create NDArray with CPUPinned context in ImageRecordIOParser2 * update document * use -1 device_id as an option to create CPU(0) context * retrigger CI * fix cpplint error
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to fix performance regression introduced by #12666.
We observed the following performance regression from 1.3.1 to 1.4.x to master when training resnet50_v1 (symbolic_fp16) with MXNet kvstore on a single p3.xlarge instance:
===1.3.1===
===1.4.x===
===master===
By changing the default context to CPUPinned(0) in ImageRecordIoParser2 in this PR, the performance is comparable with 1.3.1 using the same training settings.
In addition, we add a device_id parameter to the ImageRecParserParam struct such that we can set the device id for the CPUPinned context when creating ImageRecordIter. This newly exposed device_id allows training with large batch_size using Horovod. Users can also set device_id to -1 indicating that they want to use CPU(0) context which saves memory usage on GPU.
===1.4.x with this PR===