ROC-TX library specification#
The ROC-TX library provides rocTX API version 1.
High-level overview#
ROC-TX library contains application code instrumentation APIs to support high-level correlation of runtime API or activity events.
Here is a list of useful APIs for code instrumentation.
roctxMark: Inserts a marker in the code with a message. Creating marks can help you see when a line of code is executed.
roctxMark("before hipLaunchKernel");
roctxRangeStart: Starts a range. Ranges can be started by different threads.
roctx_range_id_t roctx_id = roctxRangeStartA("roctx_range with id");
roctxRangePush: Starts a new nested range.
roctxRangePush("ROCTX-RANGE: hipLaunchKernel");
roctxRangePop: Stops the current nested range.
roctxRangePop();
roctxRangeStop: Stops the given range.
roctxRangeStop(roctx_id);
Sample code#
To demonstrate the use of rocTX API with various options, this document refers to the MatrixTranspose application as an example.
A version of the MatrixTranspose application instrumented using the rocTX API is available in the rocprofiler/tests-v2 folder on GitHub.