Contributing to ROCR#
This document contains useful information required to contribute to ROCR.
Runtime design#
ROCR consists of the following primary layers:
C++ interface classes and common functions
Device-specific implementations
The first layer provides interfaces to make ROCR APIs available to the user applications. The second and third layers comprise of the internal ROCR implementation, which is available for contribution.
Additionally, the runtime is dependent on a small utility library that provides simple common functions, limited operating system, compiler abstraction, and atomic operation interfaces.
The following sections list the important files present in the second and third layer.
C++ interface classes and common functions#
The C++ interface layer provides abstract interface classes encapsulating commands to HSA signals, agents, and queues. This layer also contains the implementation of device-independent commands, such as hsa_init
, hsa_system_get_info
, and a default signal and queue implementation.
Files present in this layer:
runtime.h
(cpp)agent.h
queue.h
signal.h
memory_region.h
(cpp)checked.h
memory_database.h
(cpp)default_signal.h
(cpp)
Device-specific implementations#
The device-specific layer contains implementations of the C++ interface classes that implement HSA functionality for ROCm supported devices.
Files present in this layer:
amd_cpu_agent.h
(cpp)amd_gpu_agent.h
(cpp)amd_hw_aql_command_processor.h
(cpp)amd_memory_region.h
(cpp)amd_memory_registration.h
(cpp)amd_topology.h
(cpp)host_queue.h
(cpp)interrupt_signal.h
(cpp)hsa_ext_private_amd.h
(cpp)
Source and include directories#
core
: Source code for AMD’s implementation of the core HSA Runtime API’scmake_modules
: CMake support modules and filesinc
: Public and AMD-specific header files exposing the HSA Runtime`s interfaceslibamdhsacode
: Code object definitions and interfacesloader
: Loads code objectsutils
: Utilities required to build the core runtime