Install Primbench#
Primbench is a single-header library. No build step, package installation, or linking against a Primbench binary is required.
Copy primbench.hpp to your include directory or use the -I compiler option to point to the path to primbench.hpp.
Include the header in your project and compile with hipcc.
Prerequisites#
hipccA C++17-capable compiler
AMD SMI for GPU temperature monitoring
Note
Because AMD SMI isn’t available on Windows, GPU temperature monitoring is unavailable on Windows. Disable GPU monitoring on Windows by compiling with PRIMBENCH_NO_MONITORING.
Compile options#
Primbench behavior is controlled by preprocessor macros passed at compile time.
Macro |
Effect |
|---|---|
|
Disables GPU temperature monitoring. Required on Windows. Use when AMD SMI isn’t available. |
|
Disables correctness-test execution. |
|
Sets the size in bytes of the buffer used to evict GPU caches before each kernel launch. Defaults to |
|
Embeds the Git branch name in |
|
Embeds the Git commit hash in |
For full descriptions of each macro, see Primbench API.