Build and install hipFile from source#
To build hipFile as part of the ROCm Core SDK, see TheRock build instructions. TheRock is the supported path for full-stack ROCm source builds.
Alternatively, you can build hipFile standalone from rocm-systems using the
steps below. For ROCm meta packages instead of compiling, see Install hipFile.
Prerequisites#
hipFile targets Linux with ROCm HIP. For supported GPUs and stack components, see ROCm Core SDK components.
CMake 3.21 or later
A C++ compiler that matches the
HIPFILE_CXX_STANDARDvalue you select. The default is C++20.HIP and HSA packages from ROCm so CMake can locate
hipandhsa-runtime64libmountfromutil-linuxfor mount metadata parsingA Linux kernel built with
CONFIG_PCI_P2PDMA=yfor the peer-to-peer DMA fastpath. hipFile builds and runs without it, but all I/O uses the fallback path. See Check for kernel P2PDMA support for how to check the running kernel, and hipFile kernel P2PDMA support for which distribution kernels enable the option.
Build and install#
hipFile lives under
projects/hipfilein the ROCm rocm-systems repository. Clone with a sparse checkout so you only fetch that subtree.git clone --no-checkout --filter=blob:none https://github.com/ROCm/rocm-systems.git cd rocm-systems git sparse-checkout init --cone git sparse-checkout set projects/hipfile
Check out the branch you intend to build, then enter the hipFile tree.
git checkout develop cd projects/hipfile
Configure, compile, and install with CMake. The defaults wire
CMAKE_INSTALL_PREFIXtoROCM_PATHso libraries and headers land next to your ROCm install.cmake -B build -DCMAKE_HIP_PLATFORM=amd cmake --build build -j sudo cmake --install build
After installation,
libhipfile.soandhipfile.happear under thelibandincludedirectories beneathCMAKE_INSTALL_PREFIX, typically/opt/rocmwhen you don’t overrideROCM_PATH.Optional CTest pass from the build tree:
cd build ctest --output-on-failure
You can also run
cmake --build . --target testfrombuildif you prefer Make-driven test targets.
CMake options#
The table lists the most common CMake cache entries for hipFile. Other flags
exist for sanitizers, clang-tidy, and documentation generation. Inspect
CMakeCache.txt after the first configure pass for the full set.
Option |
Default |
Description |
|---|---|---|
|
|
HIP platform selector. Use |
|
|
ROCm root used for |
|
Read from |
ROCm version string for path logic and compatibility checks. |
|
|
Install root for libraries, headers, and tools. |
|
|
Builds shared libraries when |
|
|
C++ dialect. Allowed values are |
|
|
Installs sample binaries such as |
|
|
Installs host tools such as |
|
|
Enables the |
|
|
Adds LLVM coverage instrumentation for Clang builds. |
|
|
Controls whether the hipFile test binaries are built. |
|
|
CMake build flavor. Other common values are |
Note
The HIPFILE_ options were previously named with an AIS_ prefix (for
example, AIS_CXX_STANDARD). The AIS_ names still work but are
deprecated, and CMake prints a deprecation warning when you use them.