mirror of
https://github.com/aristocratos/btop.git
synced 2024-10-31 21:01:03 +01:00
Remove lib/rocm_smi_lib and add instructions for obtaining it to README
This commit is contained in:
parent
d8ebbe1181
commit
746f716a02
3
.gitignore
vendored
3
.gitignore
vendored
@ -51,6 +51,9 @@ bin
|
|||||||
btop
|
btop
|
||||||
.*/
|
.*/
|
||||||
|
|
||||||
|
# Optional libraries
|
||||||
|
lib/rocm_smi_lib
|
||||||
|
|
||||||
|
|
||||||
#do not ignore .github directory
|
#do not ignore .github directory
|
||||||
!.github
|
!.github
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule "lib/fmt"]
|
[submodule "lib/fmt"]
|
||||||
path = lib/fmt
|
path = lib/fmt
|
||||||
url = https://github.com/fmtlib/fmt
|
url = https://github.com/fmtlib/fmt
|
||||||
[submodule "lib/rocm_smi_lib"]
|
|
||||||
path = lib/rocm_smi_lib
|
|
||||||
url = https://github.com/RadeonOpenCompute/rocm_smi_lib
|
|
||||||
|
@ -341,6 +341,13 @@ Also needs a UTF8 locale and a font that covers:
|
|||||||
Append `ARCH=<architecture>` to manually set the target architecture.
|
Append `ARCH=<architecture>` to manually set the target architecture.
|
||||||
If omitted the makefile uses the machine triple (output of `-dumpmachine` compiler parameter) to detect the target system.
|
If omitted the makefile uses the machine triple (output of `-dumpmachine` compiler parameter) to detect the target system.
|
||||||
|
|
||||||
|
Append `RSMI_STATIC=true` to statically link the ROCm SMI library used for querying AMDGPU data.
|
||||||
|
For this to work, the `lib/rocm_smi_lib` directory must contain the RSMI source code, which can obtained using the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/RadeonOpenCompute/rocm_smi_lib.git lib/rocm_smi_lib
|
||||||
|
```
|
||||||
|
|
||||||
Use `ADDFLAGS` variable for appending flags to both compiler and linker.
|
Use `ADDFLAGS` variable for appending flags to both compiler and linker.
|
||||||
|
|
||||||
For example: `ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
For example: `ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit f8882d74d8749e2ad788184d624167cc326d4c2c
|
|
@ -29,7 +29,6 @@ tab-size = 4
|
|||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <arpa/inet.h> // for inet_ntop()
|
#include <arpa/inet.h> // for inet_ntop()
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <rocm_smi/rocm_smi.h>
|
|
||||||
|
|
||||||
|
|
||||||
#if !(defined(STATIC_BUILD) && defined(__GLIBC__))
|
#if !(defined(STATIC_BUILD) && defined(__GLIBC__))
|
||||||
@ -155,6 +154,23 @@ namespace Gpu {
|
|||||||
//? AMD data collection
|
//? AMD data collection
|
||||||
namespace Rsmi {
|
namespace Rsmi {
|
||||||
#if !defined(RSMI_STATIC)
|
#if !defined(RSMI_STATIC)
|
||||||
|
//? RSMI defines, structs & typedefs
|
||||||
|
#define RSMI_MAX_NUM_FREQUENCIES 32
|
||||||
|
#define RSMI_STATUS_SUCCESS 0
|
||||||
|
#define RSMI_MEM_TYPE_VRAM 0
|
||||||
|
#define RSMI_TEMP_CURRENT 0
|
||||||
|
#define RSMI_TEMP_TYPE_EDGE 0
|
||||||
|
#define RSMI_CLK_TYPE_MEM 4
|
||||||
|
#define RSMI_CLK_TYPE_SYS 0
|
||||||
|
#define RSMI_TEMP_MAX 1
|
||||||
|
|
||||||
|
typedef int rsmi_status_t,
|
||||||
|
rsmi_temperature_metric_t,
|
||||||
|
rsmi_clk_type_t,
|
||||||
|
rsmi_memory_type_t;
|
||||||
|
|
||||||
|
struct rsmi_frequencies_t {uint32_t num_supported, current, frequency[RSMI_MAX_NUM_FREQUENCIES];};
|
||||||
|
|
||||||
//? Function pointers
|
//? Function pointers
|
||||||
rsmi_status_t (*rsmi_init)(uint64_t);
|
rsmi_status_t (*rsmi_init)(uint64_t);
|
||||||
rsmi_status_t (*rsmi_shut_down)();
|
rsmi_status_t (*rsmi_shut_down)();
|
||||||
|
Loading…
Reference in New Issue
Block a user