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#

Here is a sample code that demonstrates the rocTX APIs.