Files
rocm-systems/projects
Laurent Morichetti 26bb13ade0 SWDEV-318682: Using roctx to rename long kernel names to shorter ones.
To enable this feature use the --roctx-rename rocprof option. This
implementation records all messages received in roctxPush calls and
use them to replace corresponding kernel names.

Tested with the following HIP program:

\#include <hip/hip_runtime.h>
\#include <roctracer/roctx.h>

__global__ void
ThisIsALongKernelName ()
{
}

int
main (int argc, char* argv[])
{
  hipSetDevice (0);

  // Not in a roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();

  roctxRangePush ("A");
  // In a simple first level roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();

  roctxRangePush ("B");
  roctxRangePush ("C");
  // In a nested roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();
  roctxRangePop ();

  roctxRangePush ("D");
  roctxRangePush ("E");
  roctxRangePop ();
  // In a first level roctx range, but after a nested range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();

  hipDeviceSynchronize ();
  return 0;
}

Change-Id: I629312234468daff8b017caa5cb0773707d98cce


[ROCm/rocprofiler commit: 1078a088e9]
2022-04-07 18:03:03 -07:00
..