Variorum Developer Documentation¶
Here is some information on how to extend Variorum to support additional platforms and/or microarchitectures.
A platform refers to a hardware vendor, for example, Intel, IBM, or ARM. A microarchitecture refers to a generation of hardware within a platform, for example, Broadwell or Ivy Bridge for Intel Xeon processors; or Power8 and Power9 for IBM Power processors.
Steps to Add Support for a New Platform (pfm)¶
Create a new folder under
config_pfm.c. These two files implement the
set_pfm_func_ptrsfunctions. The former identifies the new platform, and the latter sets function pointers for get/set power, thermals, etc. on the new platform. These function pointers refer to internal functions that are defined in microarchitecture-specific files (see next section).
Add a struct listing all the microarchitectures implemented on the new platform in
src/variorum/config_architecture.c. Refer to the enum for Intel microarchitectures as an example. You may need to check for the platform in a few places in the
config_architecture.cfile. Examples of Intel and IBM are included, so these can be referred to.
If you need to modify front-facing APIs, add them to
Steps to Add Support for a New Microarchitecture (pfm_arch)¶
Follow the steps listed above to create a new platform if the platform does not already exist in the Variorum source.
For each microarchitecture, add a
pfm_arch.cfile, define the internal get/set functions for capturing power, thermal, performance data. These need to be added as function pointers in the platform file (
The internal implementation will depend on the interfaces, such as sensors, MSRs, OPAL, IPMI, etc. If applicable, these can be re-used across microarchitectures (i.e., the same implementation is used for many microarchitectures).
As an example, to support additional NVIDIA microarchitectures: 1. Under the
Nvidia/ directory, create a
.c header and source file for the
respective microarchitecture. This will contain features specific to that
microarchitecture, which may or may not exist in previous generations.
Nvidia/config_nvidia.c to set the function pointers for the
Include the new header file in