hipDNN frontend C++ API

hipDNN frontend C++ API#

2026-03-31

2 min read time

Applies to Linux and Windows

Main entry point for the hipDNN Frontend C++ API.

Include this header (#include <hipdnn_frontend.hpp>) to access the hipDNN frontend API. It provides a high-level C++ interface for building and executing deep learning computational graphs on AMD GPUs.

Overview#

The hipDNN Frontend provides a graph-based API for constructing deep learning operations including:

  • Convolution operations (forward, data gradient, weight gradient)

  • Batch normalization (forward, backward, inference)

  • Pointwise/element-wise operations

  • Matrix multiplication

Basic Usage#

#include <hipdnn_frontend.hpp>

using namespace hipdnn_frontend;
using namespace hipdnn_frontend::graph;

// Create a graph
Graph graph;
graph.set_io_data_type(DataType::HALF)
     .set_compute_data_type(DataType::FLOAT);

// Create tensors
auto x = Graph::tensor(TensorAttributes()
             .set_dim({1, 64, 28, 28})
             .set_stride({50176, 784, 28, 1})
             .set_data_type(DataType::HALF));

// Add operations and build the graph
// ...

hipdnnHandle_t handle;
hipdnnCreate(&handle);
graph.build(handle);

// Execute
graph.execute(handle, tensorLookup, workspace);

See also

hipdnn_frontend::graph::Graph The main Graph class for building operations

See also

hipdnn_frontend::DataType Supported data types

See also

hipdnn_frontend::Error Error handling types