Skip to content

Commit e925c10

Browse files
amd_smi: Remove carriage return
1 parent 525920d commit e925c10

File tree

4 files changed

+328
-328
lines changed

4 files changed

+328
-328
lines changed

src/components/amd_smi/README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# AMD_SMI Component
2-
1+
# AMD_SMI Component
2+
33
The **AMD_SMI** (AMD System Management Interface) component exposes hardware
44
management counters (and selected controls) for AMD GPUs — e.g., power usage,
55
temperatures, clocks, PCIe link metrics, VRAM information, and RAS/ECC status —
@@ -11,28 +11,28 @@ by querying the AMD SMI library at runtime (ROCm ≥ 6.4.0).
1111
> keep `rocm_smi` for older releases. This cutoff is based on internal testing
1212
> that showed AMD SMI becoming stable and feature-complete beginning with ROCm
1313
> 6.4.0.
14-
15-
- [Environment Variables](#environment-variables)
16-
- [Enabling the AMD_SMI Component](#enabling-the-amd_smi-component)
14+
15+
- [Environment Variables](#environment-variables)
16+
- [Enabling the AMD_SMI Component](#enabling-the-amd_smi-component)
1717
- [Hardware and Software Support](#hardware-and-software-support)
18-
19-
---
20-
21-
## Environment Variables
22-
23-
For AMD_SMI, PAPI requires the environment variable `PAPI_AMDSMI_ROOT` to be set
24-
so that the AMD SMI shared library and headers can be found. This variable is
25-
required at both **compile** and **run** time.
26-
18+
19+
---
20+
21+
## Environment Variables
22+
23+
For AMD_SMI, PAPI requires the environment variable `PAPI_AMDSMI_ROOT` to be set
24+
so that the AMD SMI shared library and headers can be found. This variable is
25+
required at both **compile** and **run** time.
26+
2727
**Setting PAPI_AMDSMI_ROOT**
2828
Set `PAPI_AMDSMI_ROOT` to the top-level ROCm directory. For example:
29-
30-
```bash
31-
export PAPI_AMDSMI_ROOT=/opt/rocm-6.4.0
32-
# or
33-
export PAPI_AMDSMI_ROOT=/opt/rocm
34-
```
35-
29+
30+
```bash
31+
export PAPI_AMDSMI_ROOT=/opt/rocm-6.4.0
32+
# or
33+
export PAPI_AMDSMI_ROOT=/opt/rocm
34+
```
35+
3636
The directory specified by `PAPI_AMDSMI_ROOT` **must contain** the following
3737
subdirectories:
3838

@@ -84,26 +84,26 @@ authoritative way to pick up non-standard installs. Symlinking
8484
---
8585

8686
## Enabling the AMD_SMI Component
87-
88-
To enable reading (and where supported, writing) of AMD_SMI counters, build
89-
PAPI with this component enabled. For example:
90-
91-
```bash
92-
./configure --with-components="amd_smi"
93-
make
94-
```
95-
96-
You can verify availability with the utilities in `papi/src/utils/`:
97-
98-
```bash
99-
papi_component_avail # shows enabled/disabled components
100-
papi_native_avail -i amd_smi # lists native events for this component
101-
```
102-
103-
After changing `PAPI_AMDSMI_ROOT` or related library paths, rerun make clobber && ./configure --with-components="amd_smi" before rebuilding so configure picks up the new locations.
104-
105-
---
106-
87+
88+
To enable reading (and where supported, writing) of AMD_SMI counters, build
89+
PAPI with this component enabled. For example:
90+
91+
```bash
92+
./configure --with-components="amd_smi"
93+
make
94+
```
95+
96+
You can verify availability with the utilities in `papi/src/utils/`:
97+
98+
```bash
99+
papi_component_avail # shows enabled/disabled components
100+
papi_native_avail -i amd_smi # lists native events for this component
101+
```
102+
103+
After changing `PAPI_AMDSMI_ROOT` or related library paths, rerun make clobber && ./configure --with-components="amd_smi" before rebuilding so configure picks up the new locations.
104+
105+
---
106+
107107

108108
## Hardware and Software Support
109109
To see the `amd_smi` component's current supported hardware and software please visit the GitHub wiki page [Hardware and Software Support - AMD\_SMI Component](https://github.com/icl-utk-edu/papi/wiki/Hardware-and-Software-Support-%E2%80%90-AMD_SMI-Component).

src/components/amd_smi/amds.h

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
/**
2-
* @file amds.h
3-
* @author Dong Jun Woun
4-
* djwoun@gmail.com
5-
*
6-
*/
7-
1+
/**
2+
* @file amds.h
3+
* @author Dong Jun Woun
4+
* djwoun@gmail.com
5+
*
6+
*/
7+
88
#ifndef __AMDS_H__
99
#define __AMDS_H__
1010

1111
#include "papi.h"
1212

1313
#define AMDS_EVENTS_OPENED (0x1)
1414
#define AMDS_EVENTS_RUNNING (0x2)
15-
16-
typedef struct amds_ctx *amds_ctx_t;
17-
18-
/* initialization and shutdown */
19-
int amds_init(void);
20-
int amds_shutdown(void);
21-
22-
/* native event queries */
23-
int amds_evt_enum(unsigned int *EventCode, int modifier);
15+
16+
typedef struct amds_ctx *amds_ctx_t;
17+
18+
/* initialization and shutdown */
19+
int amds_init(void);
20+
int amds_shutdown(void);
21+
22+
/* native event queries */
23+
int amds_evt_enum(unsigned int *EventCode, int modifier);
2424
int amds_evt_code_to_descr(unsigned int EventCode, char *descr, int len);
2525
int amds_evt_name_to_code(const char *name, unsigned int *EventCode);
2626
int amds_evt_code_to_name(unsigned int EventCode, char *name, int len);
2727
int amds_evt_code_to_info(unsigned int EventCode, PAPI_event_info_t *info);
28-
29-
/* error handling */
30-
int amds_err_get_last(const char **err_string);
31-
32-
/* profiling context operations */
33-
int amds_ctx_open(unsigned int *event_ids, int num_events, amds_ctx_t *ctx);
34-
int amds_ctx_close(amds_ctx_t ctx);
35-
int amds_ctx_start(amds_ctx_t ctx);
36-
int amds_ctx_stop(amds_ctx_t ctx);
37-
int amds_ctx_read(amds_ctx_t ctx, long long **counts);
38-
int amds_ctx_write(amds_ctx_t ctx, long long *counts);
39-
int amds_ctx_reset(amds_ctx_t ctx);
40-
41-
#endif /* __AMDS_H__ */
28+
29+
/* error handling */
30+
int amds_err_get_last(const char **err_string);
31+
32+
/* profiling context operations */
33+
int amds_ctx_open(unsigned int *event_ids, int num_events, amds_ctx_t *ctx);
34+
int amds_ctx_close(amds_ctx_t ctx);
35+
int amds_ctx_start(amds_ctx_t ctx);
36+
int amds_ctx_stop(amds_ctx_t ctx);
37+
int amds_ctx_read(amds_ctx_t ctx, long long **counts);
38+
int amds_ctx_write(amds_ctx_t ctx, long long *counts);
39+
int amds_ctx_reset(amds_ctx_t ctx);
40+
41+
#endif /* __AMDS_H__ */

0 commit comments

Comments
 (0)