简体   繁体   English

屏幕保护程序会损害CUDA性能吗?

[英]screensaver hurts CUDA performance?

I've noticed that the running times of my CUDA kernels are almost tripled the moment the screensaver kicks in. This happens even if it's the blank screensaver. 我注意到,启动屏幕保护程序后,CUDA内核的运行时间几乎增加了两倍。即使是空白屏幕保护程序,也会发生这种情况。

Oddly enough, this appears to have nothing to do with the power settings. 奇怪的是,这似乎与电源设置无关。 When I disable the screen saver and let the screen power off, the performance stays the same. 当我禁用屏幕保护程序并关闭屏幕电源时,性能保持不变。 When I set the "Turn off monitor" to "Never" and lets the screen saver kick in, it happens. 当我将“关闭显示器”设置为“从不”并让屏幕保护程序启动时,就会发生这种情况。

Why does this happen? 为什么会这样?
Is there a way to counteract this phenomena? 有什么办法可以消除这种现象?
Is there a way to tell windows not to kick in the screen saver? 有没有办法告诉Windows不要踢屏保? (How do media players do it?) (媒体播放器是如何做到的?)

I'm working on XP SP2 x64 我正在使用XP SP2 x64

Firstly, its interesting that CUDA is so impacted. 首先,有趣的是CUDA受到如此影响。

But here is the recipe in win32 for avoiding the screensaver kicking in: 但是,这是win32中避免屏幕保护程序启动的方法:

A normal approach is to send yourself 'fake' key presses occasionally using the SendInput API, to reset the inactivity timer that triggers the screensaver. 通常的方法是使用SendInput API偶尔向自己发送“假”按键,以重置触发屏幕保护程序的不活动计时器。

It is possible to stop applications doing this, however, using the SPI_SETBLOCKSENDINPUTRESETS parameter for SystemParametersInfo . 但是,可以使用SystemParametersInfoSPI_SETBLOCKSENDINPUTRESETS参数来停止应用程序执行此操作。

Another approach is just to turn the screensaver off programmatically, using SPI_SETSCREENSAVEACTIVE for SystemParametersInfo . 另一种方法是使用SPI_SETSCREENSAVEACTIVE作为SystemParametersInfo来以编程方式关闭屏幕保护程序。 However, this is a global setting for the whole user - what if two programs use this overlapping? 但是,这是整个用户的全局设置-如果两个程序使用此重叠部分怎么办? Try to avoid this! 尽量避免这种情况!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM