1/09/2026
Step-by-Step: Building MIOpen and hipDNN with Ninja
Step-by-Step: Building MIOpen and hipDNN with Ninja
Step 1: Navigate to the monorepo
git clone https://github.com/ROCm/rocm-libraries.git
>cd rocm-libraries
Step 2: Create a build directoryWhat this does: Or if you want to limit parallel jobs (e.g., for memory constraints):
If you need more control, you can add these flags:
After successful build, you'll have:
mkdir -p build_miopen_hipdnn
cd build_miopen_hipdnn
Step 3: Configure with CMake using Ninja
cmake -GNinja -B . -S .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DCMAKE_PREFIX_PATH=/opt/rocm \
-DROCM_LIBS_ENABLE_COMPONENTS="miopen;hipdnn"
- -GNinja - Use Ninja build system (faster than Make)
- -DCMAKE_BUILD_TYPE=Release - Optimized build
- -DCMAKE_INSTALL_PREFIX=/opt/rocm - Install location
- -DCMAKE_PREFIX_PATH=/opt/rocm - Where to find ROCm dependencies
- -DROCM_LIBS_ENABLE_COMPONENTS="miopen;hipdnn" - Build only these two projects + their dependencies
Step 4: Build both projects
ninja -j$(nproc)
ninja -j8
Step 5: Run tests (optional)
# Test everything
ninja check
# Or test specific components
ninja test
Step 6: Install (optional)
sudo ninja install
Alternative: Build with specific options
cmake -GNinja -B . -S .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DCMAKE_PREFIX_PATH=/opt/rocm \
-DROCM_LIBS_ENABLE_COMPONENTS="miopen;hipdnn" \
-DBUILD_DEV=ON \
-DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
-DMIOPEN_BACKEND=HIP
Useful Ninja Commands
# Build only MIOpen
ninja miopen
# Build only hipDNN
ninja hipdnn
# Clean build
ninja clean
# Verbose output (see actual commands)
ninja -v
# Dry run (show what would be built)
ninja -n
# Build specific target
ninja MIOpenDriver
Expected Build Time
- Configuration (CMake): ~30 seconds to 2 minutes
- MIOpen build: ~20-40 minutes (first time)
- hipDNN build: ~5-10 minutes
- Total: ~30-50 minutes on MI250X system
What Gets Built
build_miopen_hipdnn/
├── projects/
│ ├── miopen/
│ │ ├── lib/libMIOpen.so
│ │ ├── bin/MIOpenDriver
│ │ └── test/
│ └── hipdnn/
│ ├── backend/src/libhipdnn.so
│ ├── frontend/
│ ├── plugins/
│ └── tests/
If You Encounter Issues
- Missing dependencies error:# The superbuild should handle this, but if needed:cmake -DROCM_LIBS_ENABLE_COMPONENTS="rocblas;hipblas;composablekernel;miopen;hipdnn" ...
- Out of memory during build:ninja -j4 # Reduce parallel jobs
- See what would be built:ninja -n | grep -E "(miopen|hipdnn)"
Subscribe to:
Comments (Atom)
-
Google Coral USB Edge TPU Implementation Guide 1. Installation and Troubleshooting 1.1 Hardware Requirements Google Coral USB Accelerator ...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
Video stabilization example source code. The principle is like that... Firstly, to obtain 2 adjacent images extract good feature to t...
-
ONNX Runtime with ROCm (AMD GPU) Setup Guide Installation Prerequisites ROCm installed (6.0+ recommended) Python 3.8-3.10 Install ONNX Runti...
-
see the this source code ... #define N 10 //(33*1024) __global__ void add(int *c){ int tid = threadIdx.x + blockIdx.x * gridDim.x; if(...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
I tired to save sub model in seq-to-seq model which is encoder part. What I used for save and load is like follow code and I failed with e...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
This is my cmd for training lora with kohya-ss/sd-scripts python -m accelerate.commands.launch --num_cpu_threads_per_process=8 \ ... --enab...