Files
TheRock/rocm-libraries/projects/hipdnn/samples/example_engine_plugin/README_TEMPLATE.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.7 KiB

{Plugin Name} Plugin

{Brief one-line description of what the plugin does and the technology or backend it provides.}

Overview

{Expanded description of the plugin's purpose, the operations it supports, and how it implements them (e.g., wrapping an existing library, custom HIP kernels via HIPRTC, etc.).}

Prerequisites

Dependency Purpose Notes
CMake >= 3.25 Build system
C++17 compiler GCC/G++ or MSVC
ROCm (HIP SDK + HIPRTC) GPU kernel compilation and execution Required at runtime
hipDNN Plugin SDK, data SDK SDK packages from ROCm install or built from source
{Additional dependencies specific to your plugin}

Building

Building as a standalone plugin

To build the plugin standalone, first install hipDNN and any required dependencies on the system.

  1. Navigate to the {plugin-directory} directory.
  2. Configure the build using cmake -B build.
  3. Run cmake --build build to build the plugin.
  4. Run ctest --test-dir build to run the tests.

CMake Options

Option Default Description
{PLUGINNAME}_BUILD_UNIT_TESTS ON Build unit tests
{PLUGINNAME}_BUILD_SAMPLE ON Build sample application

Architecture

The plugin follows the standard hipDNN plugin architecture. It builds as a shared library providing a hipDNN kernel engine plugin API.

Five macros in {PluginName}PluginPublic.cpp configure the plugin entry points:

  • HIPDNN_PLUGIN_NAME -- display name string
  • HIPDNN_PLUGIN_VERSION -- version string
  • HIPDNN_PLUGIN_CONTAINER_TYPE -- fully qualified Container class name
  • HIPDNN_PLUGIN_HANDLE_TYPE -- fully qualified Handle struct name
  • HIPDNN_PLUGIN_CONTEXT_TYPE -- fully qualified Context struct name

Type Hierarchy

Container
├── Owns EngineManager<Handle, Settings, Context>
├── Creates engines defined via getEngineDefinitions()
│   └── Engine ({PLUGIN_ENGINE_NAME})
│       └── PlanBuilder
│           └── Plan
└── copyEngineIds() -- returns registered engine IDs to hipDNN

Handle
├── Holds shared_ptr<Container>
├── setStream(hipStream_t)
└── getEngineManager()

{Add plugin-specific architecture details, including descriptions of engines, plan builders, and any additional infrastructure.}

Operation Support

{List or describe the operations this plugin supports. Link to detailed operation support documentation if available.}

Testing

After building, run the test suites:

# Unit tests
./bin/{plugin_name}_tests

{Describe any additional testing details, test categories, or GPU requirements.}