mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-10 15:34:45 +12:00
Merge pull request #796 from davc0n/main
This commit is contained in:
commit
d1680735d9
|
@ -160,6 +160,7 @@ namespace Gpu {
|
||||||
namespace Rsmi {
|
namespace Rsmi {
|
||||||
#if !defined(RSMI_STATIC)
|
#if !defined(RSMI_STATIC)
|
||||||
//? RSMI defines, structs & typedefs
|
//? RSMI defines, structs & typedefs
|
||||||
|
#define RSMI_DEVICE_NAME_BUFFER_SIZE 128
|
||||||
#define RSMI_MAX_NUM_FREQUENCIES_V5 32
|
#define RSMI_MAX_NUM_FREQUENCIES_V5 32
|
||||||
#define RSMI_MAX_NUM_FREQUENCIES_V6 33
|
#define RSMI_MAX_NUM_FREQUENCIES_V6 33
|
||||||
#define RSMI_STATUS_SUCCESS 0
|
#define RSMI_STATUS_SUCCESS 0
|
||||||
|
@ -1396,8 +1397,8 @@ namespace Gpu {
|
||||||
for (uint32_t i = 0; i < device_count; ++i) {
|
for (uint32_t i = 0; i < device_count; ++i) {
|
||||||
if constexpr(is_init) {
|
if constexpr(is_init) {
|
||||||
//? Device name
|
//? Device name
|
||||||
char name[NVML_DEVICE_NAME_BUFFER_SIZE]; // ROCm SMI does not provide a constant for this as far as I can tell, this should be good enough
|
char name[RSMI_DEVICE_NAME_BUFFER_SIZE];
|
||||||
result = rsmi_dev_name_get(i, name, NVML_DEVICE_NAME_BUFFER_SIZE);
|
result = rsmi_dev_name_get(i, name, RSMI_DEVICE_NAME_BUFFER_SIZE);
|
||||||
if (result != RSMI_STATUS_SUCCESS)
|
if (result != RSMI_STATUS_SUCCESS)
|
||||||
Logger::warning("ROCm SMI: Failed to get device name");
|
Logger::warning("ROCm SMI: Failed to get device name");
|
||||||
else gpu_names[Nvml::device_count + i] = string(name);
|
else gpu_names[Nvml::device_count + i] = string(name);
|
||||||
|
|
Loading…
Reference in a new issue