ScreX
ScreX

Reputation: 43

How to interact with AMD GPUs using python on Windows

I want to interact with my AMD Radeon RX 580 using python. Basic stuff that I want to accomplish:

  1. Get power levels (How many watts is it pulling)
  2. Set fan speed
  3. Retrieve some info from the GPU itself like : Memory size, SubVendor (Saphhire, XFX etc), GPU and memory clocks, Memory type etc

I was looking for some way to get this info via python on "Windows".

I searched quite a bit but all the solutions seem to be avaible on linux.

Upvotes: 2

Views: 1626

Answers (2)

Johnny
Johnny

Reputation: 694

You can install pyadl to find some infomations for amd gpu. https://github.com/nicolargo/pyadl

>>> from pyadl import *
>>> 
>>> device = ADLManager.getInstance().getDevices()
...
>>> device.getCurrentCoreVoltage()
...
>>> device.getCurrentEngineClock()
...
>>> device.getCurrentFanSpeed(speedType)
...

Upvotes: 2

Nilanka Manoj
Nilanka Manoj

Reputation: 3728

Try:

import os
os.system("cmd \k wmic path Win32_VideoController")

It shows some information. So you can extract them by modifying get parameter of CMD command.

wmic path Win32_VideoController get name

Command supports following get params :

AcceleratorCapabilities AdapterCompatibility AdapterDACType AdapterRAM Availability CapabilityDescriptions Caption ColorTableEntries ConfigManagerErrorCode ConfigManagerUserConfig CreationClassName CurrentBitsPerPixel CurrentHorizontalResolution CurrentNumberOfColors CurrentNumberOfColumns CurrentNumberOfRows CurrentRefreshRate CurrentScanMode CurrentVerticalResolution Description DeviceID DeviceSpecificPens DitherType DriverDate DriverVersion ErrorCleared ErrorDescription ICMIntent ICMMethod InfFilename InfSection InstallDate InstalledDisplayDrivers LastErrorCode MaxMemorySupported MaxNumberControlled MaxRefreshRate MinRefreshRate Monochrome Name NumberOfColorPlanes NumberOfVideoPages PNPDeviceID PowerManagementCapabilities PowerManagementSupported ProtocolSupported ReservedSystemPaletteEntries SpecificationVersion Status StatusInfo SystemCreationClassName SystemName SystemPaletteEntries TimeOfLastReset VideoArchitecture VideoMemoryType VideoMode VideoModeDescription VideoProcessor

Upvotes: 1

Related Questions