Files
TheRock/rocm-libraries/projects/hipdnn/docs/ConsumerQuickStart.md
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

2.4 KiB

Consumer Quick Start

This guide shows how to consume an already-installed hipDNN in a CMake project. For building hipDNN from source, see the Building Guide.

Table of Contents


Prerequisites

  • ROCm / TheRock installed with hipDNN packages (see TheRock Releases)
  • CMake
  • Ninja (recommended)
  • C++17 compatible compiler

Project Setup

CMakeLists.txt

cmake_minimum_required(VERSION <your_minimum>)
project(my_app LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)

find_package(hipdnn_frontend CONFIG REQUIRED)

add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE hipdnn_frontend)

Note

find_package(hipdnn_frontend) transitively brings in hipdnn_backend, hipdnn_data_sdk, and hip — only one find_package call is needed. HIP runtime APIs (hipMalloc, hipFree, etc.) are available through the transitive hip::host link dependency.

Note

Link hipdnn_frontend_dynamic instead of hipdnn_frontend when your application should load libhipdnn_backend at runtime instead of recording a direct link dependency on it. This target uses the same frontend headers and API; the backend package is still required when configuring and must be available at runtime.

Note

If CMake cannot find the packages, set CMAKE_PREFIX_PATH to the install location. hipDNN CMake files are installed to /opt/rocm/lib/cmake by default, which CMake may already search automatically depending on your system configuration.

Source File

Include the frontend header to access the hipDNN graph API:

#include <hipdnn_frontend.hpp>

See the Samples for complete working examples of building and executing operation graphs.

Building

mkdir build && cd build
cmake -GNinja -DCMAKE_PREFIX_PATH=/opt/rocm ..
ninja

Next Steps

  • Samples — Working examples including convolution, batch normalization, and fused operations
  • Operation Support — Currently supported operations and their status
  • How-To Guide — Detailed component usage, CMake integration for all packages, and extending hipDNN
  • Environment Configuration — Runtime configuration and logging setup