Variorum Cap Functions

Variorum provides the following high-level functions for applying an upper-bound on a particular control dial.

Defined in variorum/variorum.h.

int variorum_cap_each_socket_power_limit(int socket_power_limit)

Cap the power limits for all sockets within the node.

Supported Architectures:

  • AMD EPYC Milan

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

Parameters:

socket_power_limit[in] Desired power limit for each socket.

Returns:

0 if successful or if feature has not been implemented or is not supported, otherwise -1

int variorum_cap_best_effort_node_power_limit(int node_power_limit)

Cap the power limit of the node.

Supported Architectures:

  • IBM Power9

  • AMD EPYC Milan

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

Parameters:

node_power_limit[in] Desired power limit for the node.

Returns:

0 if successful or if feature has not been implemented or is not supported, otherwise -1

int variorum_cap_gpu_power_ratio(int gpu_power_ratio)

Cap the power shifting ratio for the GPU (uniform on both sockets).

Supported Architectures:

  • IBM Power9 (same ratio on both sockets)

Architectures that do not have API support:

  • AMD EPYC Milan

  • Intel Sandy Bridge

  • Intel Ivy Bridge

  • Intel Haswell

  • Intel Broadwell

  • Intel Skylake

  • Intel Kaby Lake

  • Intel Ice Lake

  • Intel Cascade Lake

  • Intel Cooper Lake

  • NVIDIA Volta

Parameters:

gpu_power_ratio[in] Desired power ratio (percentage). for the processor and GPU.

Returns:

0 if successful or if feature has not been implemented or is not supported, otherwise -1

int variorum_cap_each_gpu_power_limit(int gpu_power_limit)

Cap the power usage identically of each GPU on the node.

Supported Architectures:

  • NVIDIA Volta, Ampere

  • AMD Instinct (MI-50 onwards)

  • Intel Discrete GPU

Parameters:

gpu_power_limit[in] Desired power limit in watts for each GPU on the node.

Returns:

0 if successful, otherwise -1

int variorum_cap_each_core_frequency_limit(int cpu_freq_mhz)

Cap the CPU frequency for all cores within a socket.

Supported Architectures:

  • AMD EPYC Milan

  • Intel Skylake

  • Intel Cascade Lake

  • Intel Cooper Lake

Parameters:

cpu_freq_mhz[in] Desired CPU frequency for each core in MHz.

Returns:

0 if successful or if feature has not been implemented or is not supported, otherwise -1

int variorum_cap_socket_frequency_limit(int socketid, int socket_freq_mhz)

Cap the frequency of the target processor.

Supported Architectures:

  • ARM Juno r2

  • Ampere Neoverse N1

  • AMD EPYC Milan

Parameters:
  • socketid[in] Target socket ID.

  • socket_freq_mhz[in] Desired socket frequency in MHz.

Returns:

0 if successful or if feature has not been implemented or is not supported, otherwise -1