rocm.bindings.roctx#

2026-09-24

6 min read time

Applies to Linux and Windows

Advanced Micro Devices, Inc.

Attributes#

Functions#

has_symbol(→ bool)

roctx_version_major()

Query the major version of the installed library.

roctx_version_minor()

Query the minor version of the installed library.

roctxMarkA(message)

Mark an event.

roctxRangePushA(message)

Start a new nested range.

roctxRangePop()

Stop the current nested range.

roctxRangeStartA(message)

Starts a process range.

roctxRangeStop(id)

Stop a process range.

Module Contents#

rocm.bindings.roctx.has_symbol(name: str | bytes | bytearray) → bool#
rocm.bindings.roctx.ROCTX_VERSION_MAJOR: Any#
rocm.bindings.roctx.ROCTX_VERSION_MINOR: Any#
rocm.bindings.roctx.roctx_version_major()#

Query the major version of the installed library.

Return the major version of the installed library. This can be used to check if it is compatible with this interface version.

Returns:

A tuple of size 1 that contains (in that order):

  • int: Returns the major version number.

C signature

uint32_t roctx_version_major()
rocm.bindings.roctx.roctx_version_minor()#

Query the minor version of the installed library.

Return the minor version of the installed library. This can be used to check if it is compatible with this interface version.

Returns:

A tuple of size 1 that contains (in that order):

  • int: Returns the minor version number.

C signature

uint32_t roctx_version_minor()
rocm.bindings.roctx.roctxMarkA(message)#

Mark an event.

Args:
message (CStr/object) – IN:

The message associated with the event.

C signature

void roctxMarkA(const char * message)
rocm.bindings.roctx.roctxRangePushA(message)#

Start a new nested range.

Nested ranges are stacked and local to the current CPU thread.

Args:
message (CStr/object) – IN:

The message associated with this range.

Returns:

A tuple of size 1 that contains (in that order):

  • int: Returns the level this nested range is started at. Nested range

    levels are 0 based.

C signature

int roctxRangePushA(const char * message)
rocm.bindings.roctx.roctxRangePop()#

Stop the current nested range.

Stop the current nested range, and pop it from the stack. If a nested range was active before the last one was started, it becomes again the current nested range.

Returns:

A tuple of size 1 that contains (in that order):

  • int: Returns the level the stopped nested range was started at, or a

    negative value if there was no nested range active.

C signature

int roctxRangePop()
rocm.bindings.roctx.roctxRangeStartA(message)#

Starts a process range.

Start/stop ranges can be started and stopped in different threads. Each timespan is assigned a unique range ID.

Args:
message (CStr/object) – IN:

The message associated with this range.

Returns:

A tuple of size 1 that contains (in that order):

  • int: Returns the ID of the new range.

C signature

roctx_range_id_t roctxRangeStartA(const char * message)
rocm.bindings.roctx.roctxRangeStop(id)#

Stop a process range.

Args:
id (int):

(undocumented)

C signature

void roctxRangeStop(roctx_range_id_t id)