有没有办法在 Windows 中按进程查找和/或限制 GPU 使用率?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4781702/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there any way to find out and/or limit GPU usage by process in Windows?
提问by LOST
I'd like to launch CPU and GPU intensive process on some machines, but these processes must not interfere with user's tasks. So I need to limit or at least detect GPU usage by my processes. These processes are closed-source, so I can't watch GPU usage from inside.
我想在某些机器上启动 CPU 和 GPU 密集型进程,但这些进程不得干扰用户的任务。所以我需要限制或至少检测我的进程对 GPU 的使用。这些进程是闭源的,所以我无法从内部观察 GPU 的使用情况。
回答by Dan
The answer to your subject line question is: yes (On Windows Vista and up), use Process Explorerfrom Microsoft to monitor per process GPU usage. nvidia's parallel nsightcan do this also. Now, the body of your question sounds like you want to do this remotely. Unfortunately I'm not aware of a way to do this remotely. Still, hopefully this will be of some use to you.
您的主题行问题的答案是:是(在 Windows Vista 及更高版本上),使用Microsoft 的Process Explorer来监控每个进程的 GPU 使用情况。英伟达的并行 nsight也可以做到这一点。现在,您的问题的正文听起来像是您想远程执行此操作。不幸的是,我不知道远程执行此操作的方法。不过,希望这对你有用。
edit to add: If you fire up Process Explorer I don't think it shows the GPU stats by default, to get them right click on the list of columns and add them.
编辑添加:如果您启动 Process Explorer,我认为默认情况下它不会显示 GPU 统计信息,要让它们右键单击列列表并添加它们。
回答by Steve Blackwell
The GPU is a resource that can only be used by one program at a time. If another process is using the GPU, then you can't get access to it.
GPU 是一种资源,一次只能由一个程序使用。如果另一个进程正在使用 GPU,那么您将无法访问它。
A program may run multiple GPU kernels at the same time, but it's up to that program how those get run. There's no real concept of scheduling like there is with the OS and CPU processes.
一个程序可以同时运行多个 GPU 内核,但这些内核如何运行取决于该程序。没有像操作系统和 CPU 进程那样真正的调度概念。
Some vendors may have a way for you to check on the status of the device, like # cores in use, heat, fan speed, etc, but that won't let you change what's happening on it, and it will be specific to each vendor/device.
某些供应商可能有一种方法可以让您检查设备的状态,例如使用中的内核数、热量、风扇速度等,但这不会让您更改设备上发生的情况,并且这将针对每个设备供应商/设备。