如何检查Windows上的哪些GPU处于活动状态? [英] How do I check what GPU is active on Windows?

查看:453
本文介绍了如何检查Windows上的哪些GPU处于活动状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要快速了解如何有条件地(预处理)代码并检查以查看安装的GPU等等。为什么我需要这个是因为我正在编写一个程序,预计它将是非常跨平台的,并且能够在大多数现代硬件上提供变通方法。对于GPGPU,如果检测到NVidia,我可以使用CUDA;但是,它不能在非NVidia GPU上使用,所以我需要有条件地检查这个(并添加OpenCL或其他一些库以帮助GPGPU)。



我将学习其他操作系统,但就目前而言,如何在Windows上执行此操作?我搜索过NVidia的网站,他们没有说明在预编译中确定CUDA(没有安装它,它不需要)。这是一种看待它的伪方式:



如果(任何)NVIDIA GPU和OPENGL 4 - >包括CUDA图书馆及其实施。



如果(任何)NVIDIA GPU未检测到 - >包括OPENCL和实现它。



如果AMD ATI RADEON 7x / 8x版本 - >包含MANTLE API和OPENCL。



我需要设置条件编译方案,以便其他人可以安全地测试和执行程序,因为它在不同的平台,GPU等上增长。

I need a quick brush up on how I can conditionally (pre-process) code and check to see what GPU is installed or the such. Why I need this is because I am writing a program that is expected to be very cross-platform and capable of having workarounds on mostly all modern hardware. For GPGPU specifically, I can use CUDA if NVidia is detected; however, it can't be used on non-NVidia GPUs, so I'd need to conditionally check this (and add OpenCL or some other library to aid in GPGPU).

I will learn with other OSes, but for now, how can I do this on Windows? I've searched NVidia's website and they say nothing about determining CUDA in pre-compilation (without having it installed, which it needs not be). Here's a pseudo-way of looking at it:

IF (ANY) NVIDIA GPU AND OR OPENGL 4 - > INCLUDE CUDA LIBRARY AND IMPLEMENT IT.

IF (ANY) NVIDIA GPU NOT DETECTED - > INCLUDE OPENCL AND IMPLEMENT IT.

IF AMD ATI RADEON 7x/8x VERSION - > INCLUDE MANTLE API AND OPENCL.

I need to set up conditional compiling schemes so that others can safely test and execute the program as it grows on different platforms, GPUs, etc.

推荐答案

查看此链接:

http://stackoverflow.com/questions/1090261/get-the-graphics-card-model [ ^ ]


这篇关于如何检查Windows上的哪些GPU处于活动状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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