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
AIS_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 that exposes the peer-to-peer DMA (P2PDMA) paths hipFile expects for peer transfers on AMD builds
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 |