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

Windows: CUDAEnsemble can block standby whilst running. #930

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Oct 13, 2022

This uses Windows API to notify that threads running models inside CUDAEnsemble don't want the PC to enter standby.

It can be disabled by setting block_standby=false or passing --standby or -s at runtime. Though I'm not sure why a user would want to do that.

I don't believe there is a similar system wide power mgmt feature on Linux.


This requires a manual test when I have a computer spare to try it on. It may be better to add it to the parent thread temporarily, rather than to the children threads.

Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

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

Looks fine, though do test it actually prevents sleep prior to merging.

@Robadob
Copy link
Member Author

Robadob commented Oct 13, 2022

Looks fine, though do test it actually prevents sleep prior to merging.

Yeah will do when I don't need my PC. Tomorrow when I goto git class or weekend when I'm at the gym maybe.

@mondus
Copy link
Member

mondus commented Oct 14, 2022

More importantly check that the machine recovers from standby afterwards.

@Robadob
Copy link
Member Author

Robadob commented Oct 31, 2022

I changed around how this was implemented (it now blocks during CUDAEnsemble::simulate() rather than the bugged call to mark every runner thread as blocking).

Have tested it works as intended. PC can still go into standby after the call to simulate() returns, even if the process is running (although it took ~2 mins rather than ~1 min that I expected).

@mondus mondus merged commit 0f5a4c5 into master Nov 2, 2022
@mondus mondus deleted the ensemble_no_standby branch November 2, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants