屏幕保护程序会损害CUDA性能吗? [英] screensaver hurts CUDA performance?

查看:148
本文介绍了屏幕保护程序会损害CUDA性能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到我的CUDA内核的运行时间几乎是屏幕保护程序启动时的三倍。即使是空白屏幕保护程序,也会发生这种情况。

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.

奇怪的是足够,这似乎与电源设置无关。当我禁用屏幕保护程序并让屏幕关闭电源时,性能保持不变。当我将关闭显示器设置为从不并启动屏幕保护程序时,就会发生这种情况。

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.

为什么会发生这种情况?

有办法消除这种现象吗?

有没有办法告诉Windows不要踢屏幕保护程序? (媒体播放器是如何做到的?)

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? (How do media players do it?)

我正在使用XP SP2 x64

I'm working on XP SP2 x64

推荐答案

首先,有趣的是CUDA受到了如此大的影响。

Firstly, its interesting that CUDA is so impacted.

但这是win32中避免屏幕保护程序启动的方法:

But here is the recipe in win32 for avoiding the screensaver kicking in:

通常的方法是偶尔使用 SendInput API,以重置触发屏幕保护程序的不活动计时器。

A normal approach is to send yourself 'fake' key presses occasionally using the SendInput API, to reset the inactivity timer that triggers the screensaver.

但是可以使用SPI_SETBLOCKSENDINPUTRESETS 参数来停止应用程序执行此操作.com / en-us / library / ms724947%28VS.85%29.aspx rel = nofollow noreferrer> SystemParametersInfo

It is possible to stop applications doing this, however, using the SPI_SETBLOCKSENDINPUTRESETS parameter for SystemParametersInfo.

另一种方法是以编程方式关闭屏幕保护程序,对于 SystemParametersInfo SPI_SETSCREENSAVEACTIVE >。但是,这是整个用户的全局设置-如果两个程序使用此重叠部分怎么办?尝试避免这种情况!

Another approach is just to turn the screensaver off programmatically, using SPI_SETSCREENSAVEACTIVE for SystemParametersInfo. However, this is a global setting for the whole user - what if two programs use this overlapping? Try to avoid this!

这篇关于屏幕保护程序会损害CUDA性能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆