NVTX C API Reference v3
NVIDIA Tools Extension Library
Loading...
Searching...
No Matches
Data Fields
nvtxScopeAttr_t Struct Reference

Data Fields

size_t structSize
 
const char * path
 
uint64_t parentScope
 
uint64_t scopeId
 

Detailed Description

Definition at line 1132 of file nvToolsExtPayload.h.

Field Documentation

◆ parentScope

uint64_t nvtxScopeAttr_t::parentScope

Identifier of the parent scope, to which path is appended. Must be NVTX_SCOPE_ROOT, NVTX_SCOPE_NONE, or a scope ID previously registered with nvtxScopeRegister for the same domain. The runtime-resolved scopes (NVTX_SCOPE_CURRENT_*) are not valid here.

Definition at line 1190 of file nvToolsExtPayload.h.

◆ path

const char* nvtxScopeAttr_t::path

Path delimited by '/' characters, relative to parentScope. Leading slashes are ignored. Nodes in the path may use name[key] syntax to indicate an array of sibling nodes, which may be combined with other non-array nodes or different arrays at the same scope. Node names should be printable UTF-8 characters. '\' is used to escape '/', '[', and ']' characters in node names. An empty C string "" and NULL are valid inputs and treated equivalently.

A GPU can be specified with the following notations: "GPU[UUID:<unique alphanumeric GPU ID>]", "GPU[CUDAID:<CUDA device ID>]" (sensitive to CUDA_VISIBLE_DEVICES), "GPU[NVSMI:<nvidia-smi(NVML) device ID>]".

For display purposes, a tool may show a pretty name. To clearly identify a GPU, parentScope should resolve to a registered scope that represents the GPU's execution context.

A CPU can be specified with the following notations: "CPU[<physical package ID>:<OS logical core index>]", "CPU[OS:<physical package ID>:<OS logical core index>]", "CPU[HW:<physical package ID>:<hardware physical core index>]", "CPU[NUMA_OS:<NUMA node ID>:<OS logical core index>]", "CPU[NUMA_HW:<NUMA node ID>:<hardware physical core index>]".

Physical package ID:

  • Windows: GetLogicalProcessorInformationEx (RelationProcessorPackage)
  • Linux: /sys/devices/system/cpu/cpu<N>/topology/physical_package_id or /proc/cpuinfo (physical id)

NUMA node ID:

  • Windows: GetLogicalProcessorInformationEx (RelationNumaNode)
  • Linux: /sys/devices/system/cpu/cpu<N>/topology/numa_node or libnuma

OS logical core index:

  • Windows: GetCurrentProcessorNumber() or GetSystemCpuSetInformation (LogicalProcessorIndex)
  • Linux: sched_getcpu() or /proc/cpuinfo (processor field)

Hardware physical core index:

  • Windows: GetLogicalProcessorInformationEx (RelationProcessorCore)
  • Linux: /sys/devices/system/cpu/cpu<N>/topology/core_id or /proc/cpuinfo (core id)

Definition at line 1182 of file nvToolsExtPayload.h.

◆ scopeId

uint64_t nvtxScopeAttr_t::scopeId

Static scope ID. Must be unique within the domain, >= NVTX_SCOPE_ID_STATIC_START, and < NVTX_SCOPE_ID_DYNAMIC_START. Use NVTX_SCOPE_NONE to let the tool create a (dynamic) scope ID.

Definition at line 1197 of file nvToolsExtPayload.h.

◆ structSize

size_t nvtxScopeAttr_t::structSize

Size of this struct in bytes (set to sizeof(nvtxScopeAttr_t)). Allows forward-compatible versioning when fields are appended.

Definition at line 1136 of file nvToolsExtPayload.h.


The documentation for this struct was generated from the following file: