Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Create API for AMD GPUs #827

Open
3 of 9 tasks
BartoszCichecki opened this issue Jun 27, 2023 · 6 comments
Open
3 of 9 tasks

[FEAT]: Create API for AMD GPUs #827

BartoszCichecki opened this issue Jun 27, 2023 · 6 comments
Labels
feature New feature or request help wanted Extra attention is needed

Comments

@BartoszCichecki
Copy link
Owner

BartoszCichecki commented Jun 27, 2023

Rules

  • I made myself familiar with the README.
  • I checked closed issues for similar ones and did not find a similar feature request mentioned before.
  • I understand that, if insufficient information was provided, my issue will be closed without an answer.

Version

All

OS

All

Device

All Legions with AMD graphics

Is your feature request related to a problem?

Currently GPU specific features are not supported by LLT on AMD GPUs. It would be nice to change this. Features that need to be supported:

  • Information whether the dGPU is active (powered on) or not.
  • Information about dGPU power state.
  • GPU current and maximum Core and Mem clocks.
  • GPU current and maximum core temperature.
  • Checking if monitor is attached to GPU.
  • (Optional) ability to set core/mem frequency offset.

How would you like the problem to be solved?

Implement an API that is easy to use with C#.

What alternatives have you considered?

n/a

Additional information

n/a

@BartoszCichecki BartoszCichecki added feature New feature or request help wanted Extra attention is needed labels Jun 27, 2023
@BartoszCichecki BartoszCichecki pinned this issue Jun 27, 2023
@Glimspe
Copy link

Glimspe commented Jun 29, 2023

@DOGGOWoo
Copy link

DOGGOWoo commented Jul 1, 2023

Would this help? It's documentation for using ADLX with C#:
https://gpuopen.com/manuals/ADLX/adlx-page_sample_cs/

@BartoszCichecki
Copy link
Owner Author

BartoszCichecki commented Jul 2, 2023

Status update:

I tried both the ADLX library and older ADL library, and either I am totally missing something or most stats are not reported.

I made two branches: spike/adlx and spike/adl where you can check some progress. ADLX is super annoying to use and ADL is now obsolete. It wouldn't be too weird except the new one, ADLX, doesn't support a lot of features yet.

Here are also two reports from LibreHardwareMonitor:

which seem to confirm that information like max clocks, max temp etc. are not reported.

Either I am completely missing something or AMD APIs are just really funky and weird. I also updated the issue, to better list required features to complete the implementation.

Any help is appreciated, but please stick to specific solutions, information or code samples, having above information in mind.

EDIT: I also cleaned up less relevant comments, to clean up the thread here, nothing personal.

@BartoszCichecki BartoszCichecki unpinned this issue Jul 2, 2023
Repository owner deleted a comment from Glimspe Jul 2, 2023
@seerge
Copy link

seerge commented Jul 20, 2023

Hello, you can use my implementation from G-Helper https://github.com/seerge/g-helper/blob/main/app/Gpu/AMD/AmdGpuControl.cs :) I mainly read only GPU temp and GPU load, but ADL2_New_QueryPMLogData_Get method reports bunch of other sensors that you can also use.

@BartoszCichecki
Copy link
Owner Author

But it doesn't return everything needed. Verified with librehardwaremonitor.

@seerge
Copy link

seerge commented Jul 20, 2023

@BartoszCichecki this is what I manage to get from my Radeon 6800S

I can imagine it could be different per device tho, but from your desired list it already has clocks, temps, load %, power usage (in watts)

You can check for monitors attached to GPU as well, but via different method.

7/20/2023 8:09:47 PM: PMLOG_CLK_GFXCLK:1495
7/20/2023 8:09:47 PM: PMLOG_CLK_MEMCLK:1342
7/20/2023 8:09:47 PM: PMLOG_TEMPERATURE_EDGE:58
7/20/2023 8:09:47 PM: PMLOG_FAN_RPM:3200
7/20/2023 8:09:47 PM: PMLOG_FAN_PERCENTAGE:48
7/20/2023 8:09:47 PM: PMLOG_INFO_ACTIVITY_GFX:96
7/20/2023 8:09:47 PM: PMLOG_INFO_ACTIVITY_MEM:18
7/20/2023 8:09:47 PM: PMLOG_GFX_VOLTAGE:750
7/20/2023 8:09:47 PM: PMLOG_ASIC_POWER:53
7/20/2023 8:09:47 PM: PMLOG_TEMPERATURE_HOTSPOT:63
7/20/2023 8:09:47 PM: PMLOG_SMART_POWERSHIFT_CPU:0
7/20/2023 8:09:47 PM: PMLOG_SMART_POWERSHIFT_DGPU:29
7/20/2023 8:09:47 PM: PMLOG_BUS_SPEED:3
7/20/2023 8:09:47 PM: PMLOG_BUS_LANES:8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants