怎么样得到显卡(GPU)的运行状态啦?

现在主流的显卡有两种,一类是Nvidia的GPU,一种是AMD的GPU。

很多人都在做GPU的时候,都想知道GPU的特性,想知道使用时候的状态,有问题,频率,内存使用情况,占有率,很多人问道了,是否可以使用系统底层的API得到?

其实系统给的API并不完善,经常得不到完全的信息。

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

对于NVidia的GPU,推荐使用NVAPI来得到这些参数:

http://developer.nvidia.com/nvapi

这个链接是NVAPI的具体的信息:

NVAPI

WHAT IS NVAPI, AND WHY DO YOU NEED IT?

NVAPI is NVIDIA's core software development kit that allows direct access to NVIDIA GPUs and drivers on all windows platforms. NVAPI provides support forcategories of operationsthat range beyond the scope of those found in familiar graphics APIs such as DirectX and OpenGL.

Initially exposed only to OEMs and game developer tools, NVAPI is now available for download to all developers interested in building Windows applications on NVIDIA GPUs.

DOWNLOADS

  • NVAPI (2012-Apr)(1MB ZIP)
  • NVIDIA Driver Settings Programming Guide(520k PDF)

APPLICATION TYPES

NVAPI allows full access to NVIDIA GPUs and drivers in any UI and non-UI application. Under Windows Vista, the application context using NVAPI must be launched in Session 1 or higher.

NVAPI FEATURE CATEGORIES

Driver Management
Initialization and driver version controls.
GPU Management
Enumeration of physical and logical GPUs. Thermal and Cooling controls.
Display Management
Enumeration of NVDIA displays, display postion and timings controls.
GPU Topology
Ability to enable SLI and Hybrid GPU topologies. *
Frame Rendering
Ability to control Video and DX rendering not available in DX runtime. *
System Management
Ability to query chipset and system specific information.
HDTV Controls
HDTV format and overscan controls. *
Video Controls
Extended video engine controls. *
Connecting and Configuring Monitors
Ability to set views on multiple target monitors.
GPU Overclocking
GPU overclocking APIs allows apps to run apps at maximum possible clocks. *

*Use NDA edition for full control of this feature.

NVAPI COMPONENTS & DOCUMENTATION

NVAPI components includes the header, lib files for each platform - x86 and x64 respectively.

Documentation is provided as a compiled HTML help (.chm) file in each download.

NVAPI SUPPORT

NVAPI is constantly and rigorously tested not only for end-users, but for internal use at NVIDIA and our closest partners. To discuss common issues regarding NVAPI with NVIDIA and other developers,click herefor a direct link to NVIDIA's developer forums.

NVAPI NDA CUSTOMERS

NVAPI comes in two "flavors": the public version, available below, and a more extensive version available to registered developers under NDA. Registered developers canlog in here,or contact your NVIDIA account manager to make sure you have the latest NDA edition of NVAPI.

Not a registered NVIDIA developer?Sign up here.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

对于AMD的GPU:

可以使用 GPUPerfAPI:

http://developer.amd.com/tools/GPUPerfAPI/Pages/default.aspx

这个链接上可以找到信息:


GPUPerfAPI
Home>Tools>GPUPerfAPI

Overview

GPUPerfAPI is AMD's library for accessing GPU performance counters on ATI Radeon graphics cards. It is used by GPU PerfStudio 2 and the AMD APP Profiler and is now available to third party developers who wish to incorporate it within their own applications. GPUPerfAPI supports DirectX10, DirectX11, OpenGL, and OpenCL applications.

Release Notes

Version 2.9 (1/18/12)

  • Add support for AMD Radeon 7000 Series hardware.
  • Add support for more FirePro, Mobility, and APU devices.
  • Improved memory consumption and performance during profiling.
  • Reduce memory footprint of the GPUPerfAPI DLLs.
  • Correct counters are now exposed on systems with dual GPUs of different hardware generations.
  • DirectX 10:
    • Fixed shader related counters on AMD Radeon HD 2000-5000 Series hardware.
    • Fixed PrimitivesIn counter on AMD Radeon HD 2000 Series hardware.

Version 2.8 (4/22/11)

  • DirectX 10:
    • Fixed GPUTime support on AMD Radeon HD 2000 and 3000 Series hardware.
  • DirectX 11:
    • Fixed counter accessibility on AMD Radeon HD 2000 and 3000 Series hardware.

Version 2.7 (4/6/11)

  • New entrypoint for registering logging callback function for improved troubleshooting.
  • Adds support for AMD Radeon HD 6000 Series hardware.
  • New DepthAndStencil counters give more detailed understanding of HiZ behavior.
  • OpenGL:
    • Improved accuracy of depth, texture, busy, and stalled counters.
  • OpenCL:
    • FetchSize counter now reports the correct value.
  • DirectX 10/11:
    • Fixed support for AMD Radeon HD 4000 Series hardware.
    • Fixed support for Catalyst 11.2 drivers on AMD Radeon HD 5000 Series hardware.

Version 2.5 (11/17/10)

  • Adds Linux support for OpenGL and OpenCL.
  • More consistent naming between OpenCL and DX Compute Shader counters.
  • Improved methods for identifying existing hardware.
  • DirectX 10/11:
    • Improved accuracy of DepthAndStencil counters.
    • Improved accuracy of ColorBuffer counters.
  • OpenCL:
    • New counters: FetchSize, CacheHit, LDSFetchInsts, LDSWriteInsts, FastPath, CompletePath, PathUtilization.
  • OpenGL:
    • Fixed an issue that caused counters to not be available if the application is using queries.
    • Adds tessellation related counters.

Version 2.3 (6/4/10)

  • Supports DirectX10, DirectX11, OpenGL on ATI Radeon 2000, 3000, 4000, and 5000 series.
  • Supports OpenCL on ATI Radeon 4000 and 5000 series.
  • Provides derived counters based on raw HW performance counters.
  • Manages memory automatically - no allocations required.
  • Requires ATI Catalyst driver 10.1 or later.

Documentation

  • GPUPerfAPI User Guide (pdf)

Support

Download

Reset My View

File Name Launch Date OS Bitness Description
GPUPerfAPI.2.9.314-lnx.gz 01/18/2012 Linux® 32-bit/64-bit Linux libraries for accessing OpenGL and OpenCL GPU performance counters.
GPUPerfAPI-2.9.325.0.zip(1.93 KB) 01/18/2011 Windows® 32-bit/64-bit AMD's library for accessing GPU performance counters.

========================================================================================================================================================================

GPU的参数特性,通过里面的sample是可以找到简单地例子,可以快速的入门的。

对于CPU的参数特性的拾取,下次再讲:)


你可能感兴趣的:(怎么样得到显卡(GPU)的运行状态啦?)