-
Notifications
You must be signed in to change notification settings - Fork 2
/
nvlink.h
41 lines (34 loc) · 1.09 KB
/
nvlink.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License") 1.1!
* You may not use this file except in compliance with the License.
*
* See https://spdx.org/licenses/CDDL-1.1.html for the specific
* language governing permissions and limitations under the License.
*
* Copyright 2021 Jens Elkner (jel+nvmex-src@cs.ovgu.de)
*/
/**
* @file nvlink.h
* A collection of small utilities to get some metrics about GPUs currently
* available on the machine running it.
*/
#ifndef NVMEX_NVLINK_H
#define NVMEX_NVLINK_H
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Get NVLink metrics.
* @param sb where to append the metrics.
* @param compact If \c true do not add prom descriptions and type comments.
* @param devs number of devices in \c devList.
* @param devList list of devices to query. Must not be \c NULL !
* @return \c true if something got append to \c sb , \c false otherwise.
*/
bool getNvLink(psb_t *sb, bool compact, uint devs, gpu_t devList[]);
#ifdef __cplusplus
}
#endif
#endif // NVMEX_NVLINK_H