MareArts Computer Vision Study.
Computer Vision & Machine Learning Research Laboratory
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...
-
Creating a custom CUDA kernel that directly utilizes tensor cores is an advanced topic, as tensor cores are typically accessed through highe...
-
Created Date : 2009.10. Language : C++ Tool : Visual Studio C++ 2008 Library & Utilized : Point Grey-FlyCapture, Triclops, OpenCV...
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
EMD(earth mover distance) method is very good method to compare image similarity. But processing time is slow. For using the EMD compare, ...