Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix device selection in PipelinedExecutor. #361

Merged
merged 2 commits into from Dec 12, 2018
Merged

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Dec 11, 2018

CUDA device id was not properly set in executor (it always tried to run on device 0). It's been fixed with RAII DeviceGuard in all relevant functions.

Signed-off-by: Michal Zientkiewicz michalz@nvidia.com

@mzient mzient requested review from JanuszL and a team December 11, 2018 14:14
@@ -75,6 +75,7 @@ void Executor::RunCPU() {
lock.unlock();

// Run the support ops
DeviceGuard g(device_id_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put it above comment, now it is misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

@JanuszL JanuszL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also put it into ``PipelinedExecutor::Build and Executor::Build.

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@mzient
Copy link
Contributor Author

mzient commented Dec 12, 2018

Added DeviceGuard to Executor::Build. PipelineExecutor::Build calls only two public functions, both of which already have DeviceGuard, so I didn't put it there.

Build 591988 passed.

@mzient mzient requested a review from a team December 12, 2018 15:58
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@mzient mzient merged commit 39bc662 into NVIDIA:master Dec 12, 2018
@mzient mzient deleted the DeviceId branch December 12, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants