trace.mark GPU Virtual ISA NVIDIA

Miscellaneous Instructions

trace.mark{.payload_size} event-id {, payload} {, event-label};

trace.mark instruction creates and marks an event for performance monitoring.

Encoding

PTX is a virtual instruction set. It has no single, stable native binary encoding - the compiler lowers this instruction to different native machine code depending on the selected NVIDIA target architecture (compute capability). This page intentionally shows no bit-diagram; see the target/version requirements below for what governs how this instruction compiles.
PTX ISA Version Introduced PTX ISA 9.5
Minimum Target sm_107f

Syntax Forms

One mnemonic covers many type / state-space / scope / modifier combinations - each row below is an independently valid form.

Syntax Data Types State Space(s) Modifiers Min. Target Description
trace.mark{.payload_size} event-id {, payload} {, event-label}; sm_107f trace.mark instruction creates and marks an event for performance monitoring. (see the official PTX ISA docs for the full description)

Operands

At a Glance

Data Types -

Related

More in Miscellaneous Instructions

Reference

NVIDIA PTX ISA

Description

trace.mark instruction creates and marks an event for performance monitoring. The resulting event record consists of two components: timestamp and event information; where event information is formed by concatenation of event-id and payload of size as listed in the table below: Event information Size in bits event-id 12 payload 32 or 64 The size of the resulting event information can be 12-bits, 44-bits or otherwise 76 bits. Since the payload operand is optional, its size is crucial in determining the overall size of the resulting event information. The mandatory operand event-id represents static event identifier corresponding to the instruction instance. (see the official PTX ISA docs for the full description)

Examples

.metadata_section {
  .metadata_domain 1
  .metadata 1 { "kernel: event1", "init portion", .b32 1 }
  .metadata 2 { "kernel: event2", "compute intense portion" }
  .metadata 3 { "kernel: event3", "epilogue portion", .b32 3, .b32 8, .b32 64 }
  .metadata 4 { "associate_label1_event1", .b32 0, .metadata_label "event_label1", .metadata_index 1 }
// (truncated - see the official PTX ISA docs for the full example)

Reproduced from NVIDIA's official PTX ISA documentation for technical accuracy.

Sources