Annotation Types#

Markers#

Annotate a specific point in a program execution.

For example, mark when an exception occurs:

import nvtx

domain = nvtx.get_domain('My Lib')
attr = domain.get_event_attributes(color='red')

try:
    raise Exception()
except Exception() as e:
    attr.message = str(e)
    domain.mark(attr)
    raise

Ranges#

Annotate a range between two points in a program’s execution. There are two types of ranges:

Push/Pop Ranges#

Start/End Ranges#