The Graphcore IPU Info library (gcipuinfo) provides an API for monitoring and gathering information about the IPUs available in a system, and the applications using them. A typical user of this library would be something like a datacentre monitoring system.
The library has three areas of functionality:
Looking up information about the devices installed in a system, and statistics about the applications currently using the devices. See Section 3, Device attributes.
Retrieving application “event records” (warnings or errors) which describe any problems encountered by the last executed Poplar application. See Section 4, Application event record.
Carrying out basic health checks on the available devices, to rapidly discover hardware or configuration problems. See Section 5, Device health check.
The gcipuinfo API is implemented as part of the standard IPU support libraries already used by Poplar applications and the programs in the Graphcore command line tools package.
There are C++, Python and Go interfaces.
The API section of this document describes the C++ API. The Python and Go APIs are very similar, the main difference being that the Go function names all start with an uppercase letter. For example,
getNamedAttributeForAll() in C++ and Python is
GetNamedAttributeForAll() in Go.
There are three mechanisms for using gcipuinfo through C++. The most suitable choice depends on the application.
For programs that are also using the Poplar API, the gcipuinfo interface is directly available from
For programs that do not need Poplar, for example system monitoring or configuration tools, you can link against the
libgraphcore_target_access.astatic library from the command line tools package.
The “gcipuinfo wrapper library”. This is a variation of the last method, but intended to work around binary incompatibility issues between C++ code compiled with incompatible compiler versions. See Section 1.1.1, gcipuinfo wrapper.
Note that in all three of these cases the API is the same, and the same header files -
IPUAttributeLabels.h - are used.
The lookup functions are defined in the
gcipuinfo.h header, and the attributes are defined in
1.1.1. gcipuinfo wrapper
libgraphcore_target_access.a use a C++ interface. The C++ application binary interface used by these libraries is defined by the standard toolchain in the platforms supported by Graphcore (for example, CentOS 7.6 or Ubuntu 18.04). For programs that must be built with unsupported compilers, a C++ ABI can be problematic due to binary incompatibility issues. For this reason, we also supply a library that exports a plain C interface to the device information database:
share/gcipuinfo/gcipuinfo_wrapper directory in the Poplar SDK contains two source files that can be compiled along with user code to re-implement the gcipuinfo API using the information from
Both lookup functions and attributes live within the gcipuinfo module.
Both lookup functions and attributes live within the gcipuinfo package.