NVTX C API Reference v3
NVIDIA Tools Extension Library
|
Data Structures | |
struct | nvtxResourceAttributes_t |
Resource Attribute Structure. . More... | |
Functions for Generic Resource Naming | |
enum | nvtxResourceGenericType_t { NVTX_RESOURCE_TYPE_UNKNOWN = 0 , NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1) , NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2) , NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3) , NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4) } |
Generic resource type for when a resource class is not available. More... | |
NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API | nvtxDomainResourceCreate (nvtxDomainHandle_t domain, nvtxResourceAttributes_t *attribs) |
Create a resource object to track and associate data with OS and middleware objects. | |
Functions for CUDA Resource Naming | |
enum | nvtxResourceCUDAType_t { NVTX_RESOURCE_TYPE_CUDA_DEVICE = NVTX_RESOURCE_MAKE_TYPE(CUDA, 1) , NVTX_RESOURCE_TYPE_CUDA_CONTEXT = NVTX_RESOURCE_MAKE_TYPE(CUDA, 2) , NVTX_RESOURCE_TYPE_CUDA_STREAM = NVTX_RESOURCE_MAKE_TYPE(CUDA, 3) , NVTX_RESOURCE_TYPE_CUDA_EVENT = NVTX_RESOURCE_MAKE_TYPE(CUDA, 4) } |
Resource types for CUDA. More... | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuDeviceA (CUdevice device, const char *name) |
Annotates a CUDA device. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuDeviceW (CUdevice device, const wchar_t *name) |
Functions for CUDA Resource Naming | |
enum | nvtxResourceCUDARTType_t { NVTX_RESOURCE_TYPE_CUDART_DEVICE = NVTX_RESOURCE_MAKE_TYPE(CUDART, 0) , NVTX_RESOURCE_TYPE_CUDART_STREAM = NVTX_RESOURCE_MAKE_TYPE(CUDART, 1) , NVTX_RESOURCE_TYPE_CUDART_EVENT = NVTX_RESOURCE_MAKE_TYPE(CUDART, 2) } |
Resource types for CUDART. More... | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaDeviceA (int device, const char *name) |
Annotates a CUDA device. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaDeviceW (int device, const wchar_t *name) |
Functions for OpenCL Resource Naming | |
enum | nvtxResourceOpenCLType_t { NVTX_RESOURCE_TYPE_OPENCL_DEVICE = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 1) , NVTX_RESOURCE_TYPE_OPENCL_CONTEXT = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 2) , NVTX_RESOURCE_TYPE_OPENCL_COMMANDQUEUE = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 3) , NVTX_RESOURCE_TYPE_OPENCL_MEMOBJECT = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 4) , NVTX_RESOURCE_TYPE_OPENCL_SAMPLER = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 5) , NVTX_RESOURCE_TYPE_OPENCL_PROGRAM = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 6) , NVTX_RESOURCE_TYPE_OPENCL_EVENT = NVTX_RESOURCE_MAKE_TYPE(OPENCL, 7) } |
Resource types for OpenCL. More... | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClDeviceA (cl_device_id device, const char *name) |
Annotates an OpenCL device. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClDeviceW (cl_device_id device, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxDomainResourceDestroy (nvtxResourceHandle_t resource) |
Destroy a resource object to track and associate data with OS and middleware objects. | |
Functions for NVTX Category Naming | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainNameCategoryA (nvtxDomainHandle_t domain, uint32_t category, const char *name) |
Annotate an NVTX category used within a domain. | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainNameCategoryW (nvtxDomainHandle_t domain, uint32_t category, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCategoryA (uint32_t category, const char *name) |
Annotate an NVTX category. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCategoryW (uint32_t category, const wchar_t *name) |
Functions for OS Threads Naming | |
NVTX_DECLSPEC void NVTX_API | nvtxNameOsThreadA (uint32_t threadId, const char *name) |
Annotate an OS thread. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameOsThreadW (uint32_t threadId, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuContextA (CUcontext context, const char *name) |
Annotates a CUDA context. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuContextW (CUcontext context, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuStreamA (CUstream stream, const char *name) |
Annotates a CUDA stream. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuStreamW (CUstream stream, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuEventA (CUevent event, const char *name) |
Annotates a CUDA event. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCuEventW (CUevent event, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaStreamA (cudaStream_t stream, const char *name) |
Annotates a CUDA stream. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaStreamW (cudaStream_t stream, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaEventA (cudaEvent_t event, const char *name) |
Annotates a CUDA event. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCudaEventW (cudaEvent_t event, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClContextA (cl_context context, const char *name) |
Annotates an OpenCL context. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClContextW (cl_context context, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClCommandQueueA (cl_command_queue command_queue, const char *name) |
Annotates an OpenCL command queue. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClCommandQueueW (cl_command_queue command_queue, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClMemObjectA (cl_mem memobj, const char *name) |
Annotates an OpenCL memory object. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClMemObjectW (cl_mem memobj, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClSamplerA (cl_sampler sampler, const char *name) |
Annotates an OpenCL sampler. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClSamplerW (cl_sampler sampler, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClProgramA (cl_program program, const char *name) |
Annotates an OpenCL program. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClProgramW (cl_program program, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameClEventA (cl_event evnt, const char *name) |
Annotates an OpenCL event. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameClEventW (cl_event evnt, const wchar_t *name) |
See Resource Naming for more details
This section covers the API functions that allow to annotate CUDA resources with user-provided names.
This section covers the API functions that allow to annotate CUDA resources with user-provided names.
This section covers the API functions that allow to annotate OpenCL resources with user-provided names.
Resource types for CUDART.
Definition at line 66 of file nvToolsExtCudaRt.h.
Resource types for CUDA.
Definition at line 65 of file nvToolsExtCuda.h.
Generic resource type for when a resource class is not available.
Definition at line 1136 of file nvToolsExt.h.
Resource types for OpenCL.
Definition at line 65 of file nvToolsExtOpenCL.h.
NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA | ( | nvtxDomainHandle_t | domain, |
uint32_t | category, | ||
const char * | name | ||
) |
Annotate an NVTX category used within a domain.
Categories are used to group sets of events. Each category is identified through a unique ID and that ID is passed into any of the marker/range events to assign that event to a specific category. The nvtxDomainNameCategory function calls allow the user to assign a name to a category ID that is specific to the domain.
nvtxDomainNameCategory(NULL, category, name) is equivalent to calling nvtxNameCategory(category, name).
domain | - The domain of scoping the category. |
category | - The category ID to name. |
name | - The name of the category. |
NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate | ( | nvtxDomainHandle_t | domain, |
nvtxResourceAttributes_t * | attribs | ||
) |
Create a resource object to track and associate data with OS and middleware objects.
Allows users to associate an API handle or pointer with a user-provided name.
domain | - Domain to own the resource object |
attribs | - Attributes to be associated with the resource |
NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy | ( | nvtxResourceHandle_t | resource | ) |
Destroy a resource object to track and associate data with OS and middleware objects.
Allows users to associate an API handle or pointer with a user-provided name.
resource | - Handle to the resource in which to operate. |
NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA | ( | uint32_t | category, |
const char * | name | ||
) |
Annotate an NVTX category.
Categories are used to group sets of events. Each category is identified through a unique ID and that ID is passed into any of the marker/range events to assign that event to a specific category. The nvtxNameCategory function calls allow the user to assign a name to a category ID.
category | - The category ID to name. |
name | - The name of the category. |
NVTX_DECLSPEC void NVTX_API nvtxNameClCommandQueueA | ( | cl_command_queue | command_queue, |
const char * | name | ||
) |
Annotates an OpenCL command queue.
Allows to associate an OpenCL command queue with a user-provided name.
command_queue | - The handle of the OpenCL command queue to name. |
name | - The name of the OpenCL command queue. |
NVTX_DECLSPEC void NVTX_API nvtxNameClContextA | ( | cl_context | context, |
const char * | name | ||
) |
Annotates an OpenCL context.
Allows to associate an OpenCL context with a user-provided name.
context | - The handle of the OpenCL context to name. |
name | - The name of the OpenCL context. |
NVTX_DECLSPEC void NVTX_API nvtxNameClDeviceA | ( | cl_device_id | device, |
const char * | name | ||
) |
Annotates an OpenCL device.
Allows to associate an OpenCL device with a user-provided name.
device | - The handle of the OpenCL device to name. |
name | - The name of the OpenCL device. |
NVTX_DECLSPEC void NVTX_API nvtxNameClEventA | ( | cl_event | evnt, |
const char * | name | ||
) |
Annotates an OpenCL event.
Allows to associate an OpenCL event with a user-provided name.
evnt | - The handle of the OpenCL event to name. |
name | - The name of the OpenCL event. |
NVTX_DECLSPEC void NVTX_API nvtxNameClMemObjectA | ( | cl_mem | memobj, |
const char * | name | ||
) |
Annotates an OpenCL memory object.
Allows to associate an OpenCL memory object with a user-provided name.
memobj | - The handle of the OpenCL memory object to name. |
name | - The name of the OpenCL memory object. |
NVTX_DECLSPEC void NVTX_API nvtxNameClProgramA | ( | cl_program | program, |
const char * | name | ||
) |
Annotates an OpenCL program.
Allows to associate an OpenCL program with a user-provided name.
program | - The handle of the OpenCL program to name. |
name | - The name of the OpenCL program. |
NVTX_DECLSPEC void NVTX_API nvtxNameClSamplerA | ( | cl_sampler | sampler, |
const char * | name | ||
) |
Annotates an OpenCL sampler.
Allows to associate an OpenCL sampler with a user-provided name.
sampler | - The handle of the OpenCL sampler to name. |
name | - The name of the OpenCL sampler. |
NVTX_DECLSPEC void NVTX_API nvtxNameCuContextA | ( | CUcontext | context, |
const char * | name | ||
) |
Annotates a CUDA context.
Allows the user to associate a CUDA context with a user-provided name.
context | - The handle of the CUDA context to name. |
name | - The name of the CUDA context. |
NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceA | ( | int | device, |
const char * | name | ||
) |
Annotates a CUDA device.
Allows the user to associate a CUDA device with a user-provided name.
device | - The id of the CUDA device to name. |
name | - The name of the CUDA device. |
NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventA | ( | cudaEvent_t | event, |
const char * | name | ||
) |
Annotates a CUDA event.
Allows the user to associate a CUDA event with a user-provided name.
event | - The handle of the CUDA event to name. |
name | - The name of the CUDA event. |
NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamA | ( | cudaStream_t | stream, |
const char * | name | ||
) |
Annotates a CUDA stream.
Allows the user to associate a CUDA stream with a user-provided name.
stream | - The handle of the CUDA stream to name. |
name | - The name of the CUDA stream. |
NVTX_DECLSPEC void NVTX_API nvtxNameCuDeviceA | ( | CUdevice | device, |
const char * | name | ||
) |
Annotates a CUDA device.
Allows the user to associate a CUDA device with a user-provided name.
device | - The handle of the CUDA device to name. |
name | - The name of the CUDA device. |
NVTX_DECLSPEC void NVTX_API nvtxNameCuEventA | ( | CUevent | event, |
const char * | name | ||
) |
Annotates a CUDA event.
Allows the user to associate a CUDA event with a user-provided name.
event | - The handle of the CUDA event to name. |
name | - The name of the CUDA event. |
NVTX_DECLSPEC void NVTX_API nvtxNameCuStreamA | ( | CUstream | stream, |
const char * | name | ||
) |
Annotates a CUDA stream.
Allows the user to associate a CUDA stream with a user-provided name.
stream | - The handle of the CUDA stream to name. |
name | - The name of the CUDA stream. |
NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA | ( | uint32_t | threadId, |
const char * | name | ||
) |
Annotate an OS thread.
Allows the user to name an active thread of the current process. If an invalid thread ID is provided or a thread ID from a different process is used the behavior of the tool is implementation dependent.
Tools expect thread ID to be a number that uniquely identifies the thread at the time of the call. Note that a thread's ID can be reused after it is destroyed. Tools may choose how to handle aliasing of thread IDs.
POSIX pthread_t type returned by pthread_self() may not comply with these expectations. Please use OS-specific thread ID instead of pthread_t.
The thread name is associated to the default domain. To support domains use resource objects via nvtxDomainResourceCreate.
threadId | - The ID of the thread to name. |
name | - The name of the thread. |
Windows:
Android:
Linux:
macOS: