# Sanitizer Callback API

## Data Structures
struct | Sanitizer_BatchMemopData
| Data passed into a batch memop callback function. More...
struct | Sanitizer_CallbackData
| Data passed into a runtime or driver API callback function. More...
struct | Sanitizer_EventData
| Data passed into an event callback function. More...
struct | Sanitizer_ExternalMemoryData
| Data passed into an external memory callback function. More...
struct | Sanitizer_GraphExecData
| Data passed into a graphexec creation callback function. More...
struct | Sanitizer_GraphLaunchData
| Data passed into a graph launch callback function. More...
struct | Sanitizer_GraphNodeLaunchData
| Data passed into a graph node launch callback function. More...
struct | Sanitizer_LaunchData
| Data passed into a launch callback function. More...
struct | Sanitizer_MemcpyData
| Data passed into a memcpy callback function. More...
struct | Sanitizer_MemsetData
| Data passed into a memset callback function. More...
struct | Sanitizer_ResourceArrayData
| Data passed into a CUDA array callback function. More...
struct | Sanitizer_ResourceContextData
| Data passed into a context resource callback function. More...
struct | Sanitizer_ResourceFunctionsLazyLoadedData
| Data passed into a CUDA function callback function. More...
struct | Sanitizer_ResourceMemoryData
| Data passed into a memory resource callback function. More...
struct | Sanitizer_ResourceMempoolData
| Data passed into a mempool resource callback function. More...
struct | Sanitizer_ResourceModuleData
| Data passed into a module resource callback function. More...
struct | Sanitizer_ResourceStreamData
| Data passed into a stream resource callback function. More...
struct | Sanitizer_ResourceVirtualRange
| Data passed into a VA reservation callback function. More...
struct | Sanitizer_SynchronizeData
| Data passed into a synchronization callback function. More...
struct | Sanitizer_UvmData
| Data passed into a managed memory callback function. More...
## Typedefs
typedef void(SANITIZERAPI * | Sanitizer_CallbackFunc )(void *userdata, Sanitizer_CallbackDomain domain, Sanitizer_CallbackId cbid, const void *cbdata)
| Function type for a callback.
typedef uint32_t | Sanitizer_CallbackId
| Callback ID.
typedef struct Sanitizer_Subscriber_st * | Sanitizer_SubscriberHandle
| A callback subscriber.
## Enumerations
enum | Sanitizer_ApiCallbackSite { SANITIZER_API_ENTER = 0, SANITIZER_API_EXIT = 1 }
| Specifies the point in an API call that a callback is issued. More...
enum | Sanitizer_BatchMemopType { SANITIZER_BATCH_MEMOP_TYPE_32B = 0, SANITIZER_BATCH_MEMOP_TYPE_64B = 1 }
| Specifies the type of batch memory operation. More...
enum | Sanitizer_CallackIdSync { SANITIZER_CBID_SYNCHRONIZE_INVALID = 0, SANITIZER_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED = 1, SANITIZER_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED = 2 }
| Callback IDs for synchronization domain. More...
enum | Sanitizer_CallbackDomain { SANITIZER_CB_DOMAIN_INVALID = 0, SANITIZER_CB_DOMAIN_DRIVER_API = 1, SANITIZER_CB_DOMAIN_RUNTIME_API = 2, SANITIZER_CB_DOMAIN_RESOURCE = 3, SANITIZER_CB_DOMAIN_SYNCHRONIZE = 4, SANITIZER_CB_DOMAIN_LAUNCH = 5, SANITIZER_CB_DOMAIN_MEMCPY = 6, SANITIZER_CB_DOMAIN_MEMSET = 7, SANITIZER_CB_DOMAIN_BATCH_MEMOP = 8, SANITIZER_CB_DOMAIN_UVM = 9, SANITIZER_CB_DOMAIN_GRAPHS = 10, SANITIZER_CB_DOMAIN_EVENTS = 11, SANITIZER_CB_DOMAIN_EXTERNAL_MEMORY = 12 }
| Callback domains. More...
enum | Sanitizer_CallbackIdBatchMemop { SANITIZER_CBID_BATCH_MEMOP_INVALID = 0, SANITIZER_CBID_BATCH_MEMOP_WRITE = 1 }
| Callback IDs for batch memop domain. More...
enum | Sanitizer_CallbackIdEvents { SANITIZER_CBID_EVENTS_INVALID = 0, SANITIZER_CBID_EVENTS_CREATED = 1, SANITIZER_CBID_EVENTS_DESTROYED = 2, SANITIZER_CBID_EVENTS_RECORD = 3, SANITIZER_CBID_EVENTS_STREAM_WAIT = 4, SANITIZER_CBID_EVENTS_SYNCHRONIZE = 5 }
| Callback IDs for events domain. More...
enum | Sanitizer_CallbackIdExternalMemory { SANITIZER_CBID_EXTERNAL_MEMORY_INVALID = 0, SANITIZER_CBID_EXTERNAL_MEMORY_IMPORT = 1, SANITIZER_CBID_EXTERNAL_MEMORY_MAPPED = 2, SANITIZER_CBID_EXTERNAL_MEMORY_DESTROYED = 3 }
| Callback IDs for external memory domain. More...
enum | Sanitizer_CallbackIdGraphs { SANITIZER_CBID_GRAPHS_INVALID = 0, SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATING = 1, SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATED = 2, SANITIZER_CBID_GRAPHS_GRAPHEXEC_DESTROYING = 3, SANITIZER_CBID_GRAPHS_NODE_LAUNCH_BEGIN = 4, SANITIZER_CBID_GRAPHS_NODE_LAUNCH_END = 5, SANITIZER_CBID_GRAPHS_LAUNCH_BEGIN = 6, SANITIZER_CBID_GRAPHS_LAUNCH_END = 7 }
| Callback IDs for graphs domain. More...
enum | Sanitizer_CallbackIdLaunch { SANITIZER_CBID_LAUNCH_INVALID = 0, SANITIZER_CBID_LAUNCH_BEGIN = 1, SANITIZER_CBID_LAUNCH_AFTER_SYSCALL_SETUP = 2, SANITIZER_CBID_LAUNCH_END = 3 }
| Callback IDs for launch domain. More...
enum | Sanitizer_CallbackIdMemcpy { SANITIZER_CBID_MEMCPY_INVALID = 0, SANITIZER_CBID_MEMCPY_STARTING = 1 }
| Callback IDs for memcpy domain. More...
enum | Sanitizer_CallbackIdMemset { SANITIZER_CBID_MEMSET_INVALID = 0, SANITIZER_CBID_MEMSET_STARTING = 1 }
| Callback IDs for memset domain. More...
enum | Sanitizer_CallbackIdResource { SANITIZER_CBID_RESOURCE_INVALID = 0, SANITIZER_CBID_RESOURCE_INIT_FINISHED = 1, SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_STARTING = 2, SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_FINISHED = 3, SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_STARTING = 4, SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_FINISHED = 5, SANITIZER_CBID_RESOURCE_STREAM_CREATED = 6, SANITIZER_CBID_RESOURCE_STREAM_DESTROY_STARTING = 7, SANITIZER_CBID_RESOURCE_STREAM_DESTROY_FINISHED = 8, SANITIZER_CBID_RESOURCE_MODULE_LOADED = 9, SANITIZER_CBID_RESOURCE_MODULE_UNLOAD_STARTING = 10, SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_ALLOC = 11, SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_FREE = 12, SANITIZER_CBID_RESOURCE_HOST_MEMORY_ALLOC = 13, SANITIZER_CBID_RESOURCE_HOST_MEMORY_FREE = 14, SANITIZER_CBID_RESOURCE_MEMORY_ALLOC_ASYNC = 15, SANITIZER_CBID_RESOURCE_MEMORY_FREE_ASYNC = 16, SANITIZER_CBID_RESOURCE_MEMORY_FREE_ASYNC_DONE = 17, SANITIZER_CBID_RESOURCE_MEMPOOL_CREATED = 18, SANITIZER_CBID_RESOURCE_MEMPOOL_DESTROYING = 19, SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_ENABLED = 20, SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_DISABLING = 21, SANITIZER_CBID_RESOURCE_ARRAY_CREATED = 22, SANITIZER_CBID_RESOURCE_ARRAY_DESTROYED = 23, SANITIZER_CBID_RESOURCE_FUNCTIONS_LAZY_LOADED = 24, SANITIZER_CBID_RESOURCE_FUNCTIONS_LAZY_PATCHED = 25, SANITIZER_CBID_RESOURCE_VIRTUAL_RESERVE = 26, SANITIZER_CBID_RESOURCE_VIRTUAL_RELEASE = 27 }
| Callback IDs for resource domain. More...
enum | Sanitizer_CallbackIdUvm { SANITIZER_CBID_UVM_INVALID = 0, SANITIZER_CBID_UVM_ATTACH_MEM = 1 }
| Callback IDs for managed memory domain. More...
enum | Sanitizer_MemcpyDirection { SANITIZER_MEMCPY_DIRECTION_UNKNOWN = 0, SANITIZER_MEMCPY_DIRECTION_HOST_TO_HOST = 1, SANITIZER_MEMCPY_DIRECTION_HOST_TO_DEVICE = 2, SANITIZER_MEMCPY_DIRECTION_DEVICE_TO_HOST = 3, SANITIZER_MEMCPY_DIRECTION_DEVICE_TO_DEVICE = 4 }
| Memcpy direction. More...
enum | Sanitizer_MemoryVisibility { SANITIZER_MEMORY_VISIBILITY_INVALID = 0, SANITIZER_MEMORY_VISIBILITY_GLOBAL = 1, SANITIZER_MEMORY_VISIBILITY_HOST = 2, SANITIZER_MEMORY_VISIBILITY_STREAM = 3 }
| Specifies the visibility of an allocation. More...
enum | Sanitizer_ResourceMemoryFlags { SANITIZER_MEMORY_FLAG_NONE = 0, SANITIZER_MEMORY_FLAG_MODULE = 0x1, SANITIZER_MEMORY_FLAG_MANAGED = 0x2, SANITIZER_MEMORY_FLAG_HOST_MAPPED = 0x4, SANITIZER_MEMORY_FLAG_HOST_PINNED = 0x8, SANITIZER_MEMORY_FLAG_PEER = 0x10, SANITIZER_MEMORY_FLAG_PEER_ATOMIC = 0x20, SANITIZER_MEMORY_FLAG_CG_RUNTIME = 0x40, SANITIZER_MEMORY_FLAG_CNP = 0x80 }
| Flags describing a memory allocation. More...
enum | Sanitizer_ResourceMemoryPermissions { SANITIZER_MEMORY_PERMISSION_NONE = 0, SANITIZER_MEMORY_PERMISSION_READ = 0x1, SANITIZER_MEMORY_PERMISSION_WRITE = 0x2, SANITIZER_MEMORY_PERMISSION_ATOMIC = 0x4, SANITIZER_MEMORY_PERMISSION_ALL = 0x7 }
| Permissions for a memory allocation. More...
## Functions
SanitizerResult SANITIZERAPI | sanitizerEnableAllDomains (uint32_t enable, Sanitizer_SubscriberHandle subscriber)
| Enable or disable all callbacks in all domains.
SanitizerResult SANITIZERAPI | sanitizerEnableCallback (uint32_t enable, Sanitizer_SubscriberHandle subscriber, Sanitizer_CallbackDomain domain, Sanitizer_CallbackId cbid)
| Enable or disable callbacks for a specific domain and callback ID.
SanitizerResult SANITIZERAPI | sanitizerEnableDomain (uint32_t enable, Sanitizer_SubscriberHandle subscriber, Sanitizer_CallbackDomain domain)
| Enable or disable all callbacks for a specific domain.
SanitizerResult SANITIZERAPI | sanitizerGetCallbackState (uint32_t *enable, Sanitizer_SubscriberHandle subscriber, Sanitizer_CallbackDomain domain, Sanitizer_CallbackId cbid)
| Get the current enabled/disabled state of a callback for a specific domain and function ID.
SanitizerResult SANITIZERAPI | sanitizerSubscribe (Sanitizer_SubscriberHandle *subscriber, Sanitizer_CallbackFunc callback, void *userdata)
| Initialize a callback subscriber with a callback function and user data.
SanitizerResult SANITIZERAPI | sanitizerUnsubscribe (Sanitizer_SubscriberHandle subscriber)
| Unregister a callback subscriber.
## Variables
union {
Sanitizer_LaunchData launchData
Sanitizer_ResourceMemoryData Sanitizer_GraphNodeLaunchData::memAllocData
Sanitizer_MemcpyData Sanitizer_GraphNodeLaunchData::memcpyData
uint64_t Sanitizer_GraphNodeLaunchData::memFreeAddress
Sanitizer_MemsetData Sanitizer_GraphNodeLaunchData::memsetData
}; |
uint64_t | Sanitizer_ExternalMemoryData::address
uint64_t | Sanitizer_UvmData::address
uint64_t | Sanitizer_BatchMemopData::address
uint64_t | Sanitizer_MemsetData::address
CUcontext | Sanitizer_LaunchData::apiContext
CUstream | Sanitizer_LaunchData::apiStream
uint32_t | Sanitizer_GraphExecData::containsDeviceGraphLaunches
CUcontext | Sanitizer_EventData::context
CUcontext | Sanitizer_ResourceMemoryData::context
CUcontext | Sanitizer_CallbackData::context
size_t | Sanitizer_ResourceModuleData::cubinSize
CUdevice | Sanitizer_ExternalMemoryData::device
CUdevice | Sanitizer_LaunchData::device
CUdevice | Sanitizer_ResourceMempoolData::device
CUdevice | Sanitizer_ResourceMemoryData::device
CUdevice | Sanitizer_ResourceContextData::device
CUcontext | Sanitizer_GraphExecData::deviceGraphLaunchesContext
Sanitizer_MemcpyDirection | Sanitizer_MemcpyData::direction
uint64_t | Sanitizer_MemcpyData::dstAddress
CUcontext | Sanitizer_MemcpyData::dstContext
uint64_t | Sanitizer_MemcpyData::dstPitch
CUstream | Sanitizer_MemcpyData::dstStream
CUexternalMemory | Sanitizer_ExternalMemoryData::extMemory
uint32_t | Sanitizer_ResourceMemoryData::flags
CUfunction | Sanitizer_LaunchData::function
const char * | Sanitizer_LaunchData::functionName
const char * | Sanitizer_CallbackData::functionName
const void * | Sanitizer_CallbackData::functionParams
const void * | Sanitizer_CallbackData::functionReturnValue
const CUfunction * | Sanitizer_ResourceFunctionsLazyLoadedData::functions
CUgraphExec | Sanitizer_GraphLaunchData::graphExec
CUgraphExec | Sanitizer_GraphExecData::graphExec
uint64_t | Sanitizer_LaunchData::gridId
Sanitizer_StreamHandle | Sanitizer_LaunchData::hApiStream
CUarray | Sanitizer_ResourceArrayData::hArray
Sanitizer_StreamHandle | Sanitizer_MemcpyData::hDstStream
Sanitizer_LaunchHandle | Sanitizer_LaunchData::hLaunch
Sanitizer_StreamHandle | Sanitizer_MemcpyData::hSrcStream
Sanitizer_StreamHandle | Sanitizer_EventData::hStream
Sanitizer_StreamHandle | Sanitizer_GraphLaunchData::hStream
Sanitizer_StreamHandle | Sanitizer_UvmData::hStream
Sanitizer_StreamHandle | Sanitizer_BatchMemopData::hStream
Sanitizer_StreamHandle | Sanitizer_MemsetData::hStream
Sanitizer_StreamHandle | Sanitizer_LaunchData::hStream
Sanitizer_StreamHandle | Sanitizer_SynchronizeData::hStream
Sanitizer_StreamHandle | Sanitizer_ResourceMemoryData::hStream
Sanitizer_StreamHandle | Sanitizer_ResourceStreamData::hStream
uint32_t | Sanitizer_MemsetData::isAsync
uint32_t | Sanitizer_MemcpyData::isAsync
uint32_t | Sanitizer_GraphExecData::isDeviceLaunch
uint32_t | Sanitizer_GraphLaunchData::isGraphUpload
uint32_t | Sanitizer_GraphNodeLaunchData::isGraphUpload
uint32_t | Sanitizer_GraphNodeLaunchData::launchId
CUlibrary | Sanitizer_ResourceModuleData::library
Sanitizer_ResourceMemoryData Sanitizer_GraphNodeLaunchData::memAllocData
Sanitizer_MemcpyData Sanitizer_GraphNodeLaunchData::memcpyData
uint64_t Sanitizer_GraphNodeLaunchData::memFreeAddress
CUmemoryPool | Sanitizer_ResourceMemoryData::memoryPool
Sanitizer_MemsetData Sanitizer_GraphNodeLaunchData::memsetData
CUmodule | Sanitizer_LaunchData::module
CUmodule | Sanitizer_ResourceFunctionsLazyLoadedData::module
CUmodule | Sanitizer_ResourceModuleData::module
CUgraphNode | Sanitizer_GraphNodeLaunchData::node
CUgraphNodeType | Sanitizer_GraphNodeLaunchData::nodeType
uint32_t | Sanitizer_ResourceFunctionsLazyLoadedData::numFunctions
const char * | Sanitizer_ResourceModuleData::pCubin
CUdevice | Sanitizer_ResourceMempoolData::peerDevice
uint32_t | Sanitizer_ResourceMemoryData::permissions
uint64_t | Sanitizer_ExternalMemoryData::size
uint64_t | Sanitizer_MemcpyData::size
uint64_t | Sanitizer_ResourceVirtualRange::size
uint64_t | Sanitizer_ResourceMemoryData::size
CUdevice | Sanitizer_ResourceMemoryData::sourceDevice
uint64_t | Sanitizer_MemcpyData::srcAddress
uint64_t | Sanitizer_MemcpyData::srcPitch
CUstream | Sanitizer_MemcpyData::srcStream
CUstream | Sanitizer_EventData::stream
CUstream | Sanitizer_GraphLaunchData::stream
CUstream | Sanitizer_UvmData::stream
CUstream | Sanitizer_BatchMemopData::stream
CUstream | Sanitizer_MemsetData::stream
CUstream | Sanitizer_LaunchData::stream
CUstream | Sanitizer_SynchronizeData::stream
CUstream | Sanitizer_ResourceMemoryData::stream
CUstream | Sanitizer_ResourceStreamData::stream
const char * | Sanitizer_CallbackData::symbolName
Sanitizer_BatchMemopType | Sanitizer_BatchMemopData::type
uint64_t | Sanitizer_BatchMemopData::value
uint32_t | Sanitizer_MemsetData::value
Sanitizer_MemoryVisibility | Sanitizer_UvmData::visibility
Sanitizer_MemoryVisibility | Sanitizer_ResourceMemoryData::visibility
uint64_t | Sanitizer_MemsetData::width
uint64_t | Sanitizer_MemcpyData::width
uint64_t | Sanitizer_ResourceArrayData::width
uint32_t | Sanitizer_LaunchData::blockDim_x
uint32_t | Sanitizer_LaunchData::blockDim_y
uint32_t | Sanitizer_LaunchData::blockDim_z
uint32_t | Sanitizer_LaunchData::clusterDim_x
uint32_t | Sanitizer_LaunchData::clusterDim_y
uint32_t | Sanitizer_LaunchData::clusterDim_z
uint32_t | Sanitizer_LaunchData::gridDim_x
uint32_t | Sanitizer_LaunchData::gridDim_y
uint32_t | Sanitizer_LaunchData::gridDim_z

## Detailed Description

Functions, types, and enums that implement the Sanitizer Callback API.

## Typedef Documentation

typedef void(SANITIZERAPI * Sanitizer_CallbackFunc)(void *userdata, Sanitizer_CallbackDomain domain, Sanitizer_CallbackId cbid, const void *cbdata)

Function type for a callback. The type of the data passed to the callback in `cbdata` depends on the domain. If `domain` is SANITIZER_CB_DOMAIN_DRIVER_API or SANITIZER_CB_DOMAIN_RUNTIME_API the type of `cbdata` will be Sanitizer_CallbackData. If `domain` is SANITIZER_CB_DOMAIN_RESOURCE the type of `cbdata` will be dependent on cbid. Refer to Sanitizer_ResourceContextData, Sanitizer_ResourceStreamData, Sanitizer_ResourceModuleData and Sanitizer_ResourceMemoryFlags documentations. If `domain` is SANITIZER_CB_DOMAIN_SYNCHRONIZE the type of `cbdata` will be Sanitizer_SynchronizeData. If `domain` is SANITIZER_CB_DOMAIN_LAUNCH the type of `cbdata` will be Sanitizer_LaunchData. If `domain` is SANITIZER_CB_DOMAIN_MEMCPY the type of `cbdata` will be Sanitizer_MemcpyData. If `domain` is SANITIZER_CB_DOMAIN_MEMSET the type of `cbdata` will be Sanitizer_MemsetData. If `domain` is SANITIZER_CB_DOMAIN_BATCH_MEMOP the type of `cbdata` will be Sanitizer_BatchMemopData.

## Enumeration Type Documentation

enum Sanitizer_ApiCallbackSite

Specifies the point in an API that a callback is issued. This value is communicated to the callback function via Sanitizer_CallbackData::CallbackSize.

Enumerator:

  SANITIZER_API_ENTER | This callback is at API entry.
  SANITIZER_API_EXIT | This callback is at API exit.

enum Sanitizer_BatchMemopType

Specifies the type of batch memory operation reported by a callback in domain SANITIZER_CB_DOMAIN_BATCH_MEMOP. This value is communicated to the callback function via Sanitizer_BatchMemopData::type.

Enumerator:

  SANITIZER_BATCH_MEMOP_TYPE_32B | Batch memory operation size is 32 bits.
  SANITIZER_BATCH_MEMOP_TYPE_64B | Batch memory operation size is 64 bits.

enum Sanitizer_CallackIdSync

Callback IDs for resource domain SANITIZER_CB_DOMAIN_SYNCHRONIZE. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_SYNCHRONIZE_INVALID | Invalid synchronize callback ID.
  SANITIZER_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED | Stream synchronization has completed for a given stream.
  SANITIZER_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED | Context synchronization has completed for a given context.

enum Sanitizer_CallbackDomain

Callback domain. Each domain represents callback points for a group of related API functions or CUDA driver activity.

Enumerator:

  SANITIZER_CB_DOMAIN_INVALID | Invalid domain.
  SANITIZER_CB_DOMAIN_DRIVER_API | Domain containing callback points for all driver API functions.
  SANITIZER_CB_DOMAIN_RUNTIME_API | Domain containing callback points for all runtime API functions.
  SANITIZER_CB_DOMAIN_RESOURCE | Domain containing callback points for CUDA resource tracking.
  SANITIZER_CB_DOMAIN_SYNCHRONIZE | Domain containing callback points for CUDA synchronization.
  SANITIZER_CB_DOMAIN_LAUNCH | Domain containing callback points for CUDA grid launches.
  SANITIZER_CB_DOMAIN_MEMCPY | Domain containing callback points for CUDA memcpy operations.
  SANITIZER_CB_DOMAIN_MEMSET | Domain containing callback points for CUDA memset operations.
  SANITIZER_CB_DOMAIN_BATCH_MEMOP | Domain containing callback points for CUDA batch memop operations.
  SANITIZER_CB_DOMAIN_UVM | Domain containing callback points for CUDA managed memory operations.
  SANITIZER_CB_DOMAIN_GRAPHS | Domain containing callback points for CUDA graphs operations.
  SANITIZER_CB_DOMAIN_EVENTS | Domain containing callback points for CUDA events.
  SANITIZER_CB_DOMAIN_EXTERNAL_MEMORY | Domain containing callback points for CUDA external memory.

enum Sanitizer_CallbackIdBatchMemop

Callback IDs for resource domain SANITIZER_CB_DOMAIN_BATCH_MEMOP. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_BATCH_MEMOP_INVALID | Invalid batch memop callback ID.
  SANITIZER_CBID_BATCH_MEMOP_WRITE | A batch memory operation was initiated.

enum Sanitizer_CallbackIdEvents

Callback IDs for resource domain SANITIZER_CB_DOMAIN_EVENTS. This value is communicated to the callback function via the `cbid` parameter. Available with a driver version of 515 or newer.

Enumerator:

  SANITIZER_CBID_EVENTS_INVALID | Invalid event callback ID.
  SANITIZER_CBID_EVENTS_CREATED | An event was created.
  SANITIZER_CBID_EVENTS_DESTROYED | An event was destroyed.
  SANITIZER_CBID_EVENTS_RECORD | An event was recorded.
  SANITIZER_CBID_EVENTS_STREAM_WAIT | A stream was synchronized to an event.
  SANITIZER_CBID_EVENTS_SYNCHRONIZE | An event was synchronized.

enum Sanitizer_CallbackIdExternalMemory

Callback IDs for resource domain SANITIZER_CB_DOMAIN_EXTERNA_MEMORY. This value is communicated to the callback function via the `cbid` parameter. Available with a driver version of 535 or newer.

Enumerator:

  SANITIZER_CBID_EXTERNAL_MEMORY_INVALID | Invalid external memory callback ID.
  SANITIZER_CBID_EXTERNAL_MEMORY_IMPORT | External memory was imported.
  SANITIZER_CBID_EXTERNAL_MEMORY_MAPPED | External memory was mapped.
  SANITIZER_CBID_EXTERNAL_MEMORY_DESTROYED | External memory was destroyed.

enum Sanitizer_CallbackIdGraphs

Callback IDs for resource domain SANITIZER_CB_DOMAIN_GRAPHS. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_GRAPHS_INVALID | Invalid graphs callback ID.
  SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATING | A new graphexec is being created.
  SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATED | A new graphexec is created.
  SANITIZER_CBID_GRAPHS_GRAPHEXEC_DESTROYING | A graphexec is being destroyed
  SANITIZER_CBID_GRAPHS_NODE_LAUNCH_BEGIN | A node launch was initiated.
  SANITIZER_CBID_GRAPHS_NODE_LAUNCH_END | A node launch is complete.
  SANITIZER_CBID_GRAPHS_LAUNCH_BEGIN | A graph launch was initiated.
  SANITIZER_CBID_GRAPHS_LAUNCH_END | A graph launch is complete.

enum Sanitizer_CallbackIdLaunch

Callback IDs for resource domain SANITIZER_CB_DOMAIN_LAUNCH. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_LAUNCH_INVALID | Invalid launch callback ID.
  SANITIZER_CBID_LAUNCH_BEGIN | A grid launch was initiated.
  SANITIZER_CBID_LAUNCH_AFTER_SYSCALL_SETUP | A grid launch has completed syscalls setup.
  SANITIZER_CBID_LAUNCH_END | The grid launch is complete.

enum Sanitizer_CallbackIdMemcpy

Callback IDs for resource domain SANITIZER_CB_DOMAIN_MEMCPY. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_MEMCPY_INVALID | Invalid memcpy callback ID.
  SANITIZER_CBID_MEMCPY_STARTING | A memcpy operation was initiated.

enum Sanitizer_CallbackIdMemset

Callback IDs for resource domain SANITIZER_CB_DOMAIN_MEMSET. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_MEMSET_INVALID | Invalid memset callback ID.
  SANITIZER_CBID_MEMSET_STARTING | A memset operation was initiated.

enum Sanitizer_CallbackIdResource

Callback IDs for resource domain SANITIZER_CB_DOMAIN_RESOURCE. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_RESOURCE_INVALID | Invalid resource callback ID.
  SANITIZER_CBID_RESOURCE_INIT_FINISHED | Driver initialization is finished.
  SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_STARTING | A new context is about to be created.
  SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_FINISHED | A new context was created.
  SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_STARTING | A context is about to be destroyed.
  SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_FINISHED | A context was destroyed.
  SANITIZER_CBID_RESOURCE_STREAM_CREATED | A new stream was created.
  SANITIZER_CBID_RESOURCE_STREAM_DESTROY_STARTING | A stream is about to be destroyed.
  SANITIZER_CBID_RESOURCE_STREAM_DESTROY_FINISHED | A stream was destroyed.
  SANITIZER_CBID_RESOURCE_MODULE_LOADED | A module was loaded.
  SANITIZER_CBID_RESOURCE_MODULE_UNLOAD_STARTING | A module is about to be unloaded.
  SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_ALLOC | Device memory was allocated.
  SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_FREE | Device memory was freed.
  SANITIZER_CBID_RESOURCE_HOST_MEMORY_ALLOC | Pinned host memory was allocated.
  SANITIZER_CBID_RESOURCE_HOST_MEMORY_FREE | Pinned host memory was freed.
  SANITIZER_CBID_RESOURCE_MEMORY_ALLOC_ASYNC | Memory was allocated asynchronously.
  SANITIZER_CBID_RESOURCE_MEMORY_FREE_ASYNC | Memory was freed asynchronously.
  SANITIZER_CBID_RESOURCE_MEMORY_FREE_ASYNC_DONE | Memory freed asynchronously was released, only happens if a regular allocation (cudaMalloc) is free'd asynchronously (cudaFreeAsync). See CUDA runtime documentation for cudaFreeAsync
  SANITIZER_CBID_RESOURCE_MEMPOOL_CREATED | A new mempool was created.
  SANITIZER_CBID_RESOURCE_MEMPOOL_DESTROYING | A mempool is about to be destroyed.
  SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_ENABLED | A mempool is now accessible from a peer device.
  SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_DISABLING | A mempool is no longer accessible from a peer device.
  SANITIZER_CBID_RESOURCE_ARRAY_CREATED | A CUDA array was created.
  SANITIZER_CBID_RESOURCE_ARRAY_DESTROYED | A CUDA array was destroyed.
  SANITIZER_CBID_RESOURCE_FUNCTIONS_LAZY_LOADED | CUDA functions were loaded lazily and are fully loaded.
  SANITIZER_CBID_RESOURCE_FUNCTIONS_LAZY_PATCHED | CUDA lazily loaded functions were patched.
  SANITIZER_CBID_RESOURCE_VIRTUAL_RESERVE | The CUDA driver reserved a virtual address range.
  SANITIZER_CBID_RESOURCE_VIRTUAL_RELEASE | The CUDA driver released a virtual address range.

enum Sanitizer_CallbackIdUvm

Callback IDs for resource domain SANITIZER_CB_DOMAIN_UVM. This value is communicated to the callback function via the `cbid` parameter.

Enumerator:

  SANITIZER_CBID_UVM_INVALID | Invalid managed memory callback ID.
  SANITIZER_CBID_UVM_ATTACH_MEM | Modify the stream association of an allocation (see cudaStreamAttachMemAsync)

enum Sanitizer_MemcpyDirection

Indicates the direction of a memcpy, passed inside `Sanitizer_Memcpydata`.

Enumerator:

  SANITIZER_MEMCPY_DIRECTION_UNKNOWN | Unknown memcpy direction
  SANITIZER_MEMCPY_DIRECTION_HOST_TO_HOST | Memcpy from host to host.
  SANITIZER_MEMCPY_DIRECTION_HOST_TO_DEVICE | Memcpy from host to device.
  SANITIZER_MEMCPY_DIRECTION_DEVICE_TO_HOST | Memcpy from device to host.
  SANITIZER_MEMCPY_DIRECTION_DEVICE_TO_DEVICE | Memcpy from device to device.

enum Sanitizer_MemoryVisibility

Specifies the visibility of an allocation. This is typically GLOBAL on allocations made via cudaMalloc, cudaHostAlloc and similar APIs. This can be GLOBAL or HOST for cudaMallocManaged allocations depending on the flags parameter. This can be changed after allocation time using cudaMemAttachSingle API (see SANITIZER_CBID_UVM_ATTACH_MEM for the corresponding callback).

Enumerator:

  SANITIZER_MEMORY_VISIBILITY_INVALID | Invalid memory visibility
  SANITIZER_MEMORY_VISIBILITY_GLOBAL | Memory can be accessed by any stream on any device (see cudaMemAttachGlobal)
  SANITIZER_MEMORY_VISIBILITY_HOST | Memory cannot be accessed by any stream on any device (see cudaMemAttachHost)
  SANITIZER_MEMORY_VISIBILITY_STREAM | Memory can only be accessed by a single stream on the associated device (see cudaMemAttachSingle)

enum Sanitizer_ResourceMemoryFlags

Flags describing a memory allocation. These values are to be used in order to interpret the value of Sanitizer_ResourceMemoryData::flags

Enumerator:

  SANITIZER_MEMORY_FLAG_NONE | Empty flag.
  SANITIZER_MEMORY_FLAG_MODULE | Specifies that the allocation is static scoped to a module.
  SANITIZER_MEMORY_FLAG_MANAGED | Specifies that the allocation is managed memory.
  SANITIZER_MEMORY_FLAG_HOST_MAPPED | Species that the allocation accessible from the host.
  SANITIZER_MEMORY_FLAG_HOST_PINNED | Specifies that the allocation is pinned on the host.
  SANITIZER_MEMORY_FLAG_PEER | Specifies that the allocation is located on a peer GPU.
  SANITIZER_MEMORY_FLAG_PEER_ATOMIC | Specifies that the allocation is located on a peer GPU supporting native atomics. This implies that SANITIZER_MEMORY_FLAG_PEER is set as well.
  SANITIZER_MEMORY_FLAG_CG_RUNTIME | Specifies that the allocation is used by the Cooperative Groups runtime functions.
  SANITIZER_MEMORY_FLAG_CNP | Specifies that this is an allocation used for CUDA Dynamic Parallelism purposes.

enum Sanitizer_ResourceMemoryPermissions

Permissions for a memory allocation. These values are to be used in order to interpret the value of Sanitizer_ResourceMemoryData::permissions

Enumerator:

  SANITIZER_MEMORY_PERMISSION_NONE | No permissions.
  SANITIZER_MEMORY_PERMISSION_READ | Specifies that the allocation is readable.
  SANITIZER_MEMORY_PERMISSION_WRITE | Specifies that the allocation is writable.
  SANITIZER_MEMORY_PERMISSION_ATOMIC | Specifies that the allocation is readable/writable with atomic operations.
  SANITIZER_MEMORY_PERMISSION_ALL | Specifies that the allocation has all permissions.

## Function Documentation

SanitizerResult SANITIZERAPI sanitizerEnableAllDomains | ( | uint32_t | enable,
|  | Sanitizer_SubscriberHandle | subscriber |
| ) |  |  |

Enable or disable all callbacks in all domains.

Note:
  Thread-safety: a subscriber must serialize access to sanitizerGetCallbackState, sanitizerEnableCallback, sanitizerEnableDomain, and sanitizerEnableAllDomains. For example, if sanitizerGetCallbackState(sub, d, *) and sanitizerEnableAllDomains(sub) are called concurrently, the results are undefined.

Parameters:

  | enable | New enable state for all callbacks in all domains. Zero disables all callbacks, non-zero enables all callbacks.
  | subscriber | - Handle of the initialized subscriber

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_INVALID_PARAMETER | if `subscriber` is invalid

SanitizerResult SANITIZERAPI sanitizerEnableCallback | ( | uint32_t | enable,
|  | Sanitizer_SubscriberHandle | subscriber,
|  | Sanitizer_CallbackDomain | domain,
|  | Sanitizer_CallbackId | cbid |
| ) |  |  |

Enable or disable callbacks for a subscriber for a specific domain and callback ID.

Note:
  Thread-safety: a subscriber must serialize access to sanitizerGetCallbackState, sanitizerEnableCallback, sanitizerEnableDomain, and sanitizerEnableAllDomains. For example, if sanitizerGetCallbackState(sub, d, c) and sanitizerEnableCallback(sub, d, c) are called concurrently, the results are undefined.

Parameters:

  | enable | New enable state for the callback. Zero disables the callback, non-zero enables the callback
  | subscriber | - Handle of the initialized subscriber
  | domain | The domain of the callback
  | cbid | The ID of the callback

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_INVALID_PARAMETER | if `subscriber`, `domain` or `cbid` is invalid

SanitizerResult SANITIZERAPI sanitizerEnableDomain | ( | uint32_t | enable,
|  | Sanitizer_SubscriberHandle | subscriber,
|  | Sanitizer_CallbackDomain | domain |
| ) |  |  |

Enable or disable all callbacks for a specific domain.

Note:
  Thread-safety: a subscriber must serialize access to sanitizerGetCallbackState, sanitizerEnableCallback, sanitizerEnableDomain, and sanitizerEnableAllDomains. For example, if sanitizerGetCallbackEnabled(sub, d, *) and sanitizerEnableDomain(sub, d) are called concurrently, the results are undefined.

Parameters:

  | enable | New enable state for all callbacks in the domain. Zero disables all callbacks, non-zero enables all callbacks
  | subscriber | - Handle of the initialized subscriber
  | domain | The domain of the callback

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_INVALID_PARAMETER | if `subscriber` or `domain` is invalid

SanitizerResult SANITIZERAPI sanitizerGetCallbackState | ( | uint32_t * | enable,
|  | Sanitizer_SubscriberHandle | subscriber,
|  | Sanitizer_CallbackDomain | domain,
|  | Sanitizer_CallbackId | cbid |
| ) |  |  |

Returns non-zero in `*enable` if the callback for a domain and callback ID is enabled, and zero if not enabled.

Note:
  Thread-safety: a subscriber must serialize access to sanitizerGetCallbackState, sanitizerEnableCallback, sanitizerEnableDomain, and sanitizerEnableAllDomains. For example, if sanitizerGetCallbackState(sub, d, c) and sanitizerEnableCallback(sub, d, c) are called concurrently, the results are undefined.

Parameters:

  | enable | Returns non-zero if callback enabled, zero if not enabled
  | subscriber | Handle to the initialized subscriber
  | domain | The domain of the callback
  | cbid | The ID of the callback

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_INVALID_PARAMETER | if `enabled` is NULL, or if `subscriber`, `domain` or `cbid` is invalid.

SanitizerResult SANITIZERAPI sanitizerSubscribe | ( | Sanitizer_SubscriberHandle * | subscriber,
|  | Sanitizer_CallbackFunc | callback,
|  | void * | userdata |
| ) |  |  |

Initialize a callback subscriber with a callback function and (optionally) a pointer to user data. The returned subscriber handle can be used to enable and disable the callback for specific domains and callback IDs.

Note:
  Only one subscriber can be registered at a time.

  This function does not enable any callbacks.

  Thread-safety: this function is thread safe.

Parameters:

  | subscriber | Returns handle to initialize subscriber
  | callback | The callback function
  | userdata | A pointer to user data. This data will be passed to the callback function via the `userdata` parameter

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_MAX_LIMIT_RACHED | if there is already a sanitizer subscriber
  | SANITIZER_ERROR_INVALID_PARAMETER | if `subscriber` is NULL

SanitizerResult SANITIZERAPI sanitizerUnsubscribe | ( | Sanitizer_SubscriberHandle | subscriber | ) |

Removes a callback subscriber so that no future callback will be issued to that subscriber.

Note:
  Thread-safety: this function is thread safe.

Parameters:

  | subscriber | Handle to the initialized subscriber

Return values:

  | SANITIZER_SUCCESS | on success
  | SANITIZER_ERROR_NOT_INITIALIZED | if unable to initialize the sanitizer
  | SANITIZER_ERROR_INVALID_PARAMETER | if `subscriber` is NULL or not initialized

## Variable Documentation

union { ... } `[inherited]`

Data for this node launch.

uint64_t Sanitizer_ExternalMemoryData::address`[inherited]`

Address of the mapped memory. This field is only valid for SANITIZER_CBID_EXTERNAL_MEMORY_MAPPED

uint64_t Sanitizer_UvmData::address`[inherited]`

The address of the allocation.

uint64_t Sanitizer_BatchMemopData::address`[inherited]`

The address to be written.

uint64_t Sanitizer_MemsetData::address`[inherited]`

The address of the memset start.

CUcontext Sanitizer_LaunchData::apiContext`[inherited]`

Only valid for graph node launches. This is the context of the stream used in the graph launch API call.

CUstream Sanitizer_LaunchData::apiStream`[inherited]`

Only valid for graph node launches. This is the stream used in the graph launch API call.

uint32_t Sanitizer_LaunchData::blockDim_x`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::blockDim_y`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::blockDim_z`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::clusterDim_x`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::clusterDim_y`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::clusterDim_z`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_GraphExecData::containsDeviceGraphLaunches`[inherited]`

Boolean value indicating if the graphexec may launch device graphs. Only valid in the SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATED callback with driver version of 535 or newer.

CUcontext Sanitizer_EventData::context`[inherited]`

For SANITIZER_CBID_EVENTS_CREATED, SANITIZER_CBID_EVENTS_DESTROYED, and SANITIZER_CBID_EVENTS_SYNCHNONIZED, this is the context containing the event. For SANITIZER_CBID_EVENTS_RECORD and SANITIZER_CBID_EVENTS_STREAM_WAIT, this is the context containing the stream being recorded or waiting.

CUcontext Sanitizer_ResourceMemoryData::context`[inherited]`

Context containing the allocation being created or destroyed. Can be NULL if the allocation is not attached to a context.

CUcontext Sanitizer_CallbackData::context`[inherited]`

Driver context current to the thread, or null if no context is current. This value can change from the entry to exit callback of a runtime API function if the runtime initialized a context.

size_t Sanitizer_ResourceModuleData::cubinSize`[inherited]`

The size of the cubin.

CUdevice Sanitizer_ExternalMemoryData::device`[inherited]`

Device containing the external memory.

CUdevice Sanitizer_LaunchData::device`[inherited]`

The device where the grid is launched

CUdevice Sanitizer_ResourceMempoolData::device`[inherited]`

Device that owns the memory pool.

CUdevice Sanitizer_ResourceMemoryData::device`[inherited]`

Device where the allocation is being created. Available for all cbid with a driver version of 455 or newer.

CUdevice Sanitizer_ResourceContextData::device`[inherited]`

The device on which the context is being created or destroyed. This field is only valid for SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_* callbacks

CUcontext Sanitizer_GraphExecData::deviceGraphLaunchesContext`[inherited]`

Context where the graphexec can launch device graphs. NULL if the graphExec doesn't launch device graphs. Only valid in the SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATED callback with driver version of 535 or newer.

Sanitizer_MemcpyDirection Sanitizer_MemcpyData::direction`[inherited]`

The direction of the transfer

uint64_t Sanitizer_MemcpyData::dstAddress`[inherited]`

The destination allocation address.

CUcontext Sanitizer_MemcpyData::dstContext`[inherited]`

The context where the destination allocation is located

uint64_t Sanitizer_MemcpyData::dstPitch`[inherited]`

The destination allocation pitch.

CUstream Sanitizer_MemcpyData::dstStream`[inherited]`

The stream where the memcpy is executed on the destination context

CUexternalMemory Sanitizer_ExternalMemoryData::extMemory`[inherited]`

External memory object.

uint32_t Sanitizer_ResourceMemoryData::flags`[inherited]`

Allocation details: use Sanitizer_ResourceMemoryFlags to interpret this field.

CUfunction Sanitizer_LaunchData::function`[inherited]`

The function of the grid launch.

const char* Sanitizer_LaunchData::functionName`[inherited]`

The name of the launched function.

const char* Sanitizer_CallbackData::functionName`[inherited]`

Name of the runtime or driver API function which issued the callback. This string is a global constant and so may be accessed outside of the callback.

const void* Sanitizer_CallbackData::functionParams`[inherited]`

Pointer to the arguments passed to the runtime or driver API call. See generated_cuda_runtime_api_meta.h and generated_cuda_meta.h for structure definitions for the parameters for each runtime and driver API function.

const void* Sanitizer_CallbackData::functionReturnValue`[inherited]`

Pointer to the return value of the runtime or driver API call. This field is only valid within the SANITIZER_API_EXIT callback. For a runtime API `functionReturnValue` points to a `cudaError_t`. For a driver API `functionReturnValue` points to a `CUresult`.

const CUfunction* Sanitizer_ResourceFunctionsLazyLoadedData::functions`[inherited]`

An array containing the functions.

CUgraphExec Sanitizer_GraphLaunchData::graphExec`[inherited]`

Instance of the CUDA graph being launched.

CUgraphExec Sanitizer_GraphExecData::graphExec`[inherited]`

Instance of the CUDA graph. Can be NULL for device graph launches in the SANITIZER_CBID_GRAPHS_GRAPHEXEC_CREATING callback.

uint32_t Sanitizer_LaunchData::gridDim_x`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::gridDim_y`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint32_t Sanitizer_LaunchData::gridDim_z`[inherited]`

Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN and graph node launch callbacks

uint64_t Sanitizer_LaunchData::gridId`[inherited]`

Unique identifier of the grid launch. For graph node launches, this is only unique within the graphexec launch.

Sanitizer_StreamHandle Sanitizer_LaunchData::hApiStream`[inherited]`

Unique handle for the API stream.

CUarray Sanitizer_ResourceArrayData::hArray`[inherited]`

The CUDA array being created or destroyed.

Sanitizer_StreamHandle Sanitizer_MemcpyData::hDstStream`[inherited]`

Unique handle for the destination context stream.

Sanitizer_LaunchHandle Sanitizer_LaunchData::hLaunch`[inherited]`

Handle of the grid launch. This is only valid between the launch begin and end callbacks.

Sanitizer_StreamHandle Sanitizer_MemcpyData::hSrcStream`[inherited]`

Unique handle for the source context stream.

Sanitizer_StreamHandle Sanitizer_EventData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_GraphLaunchData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_UvmData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_BatchMemopData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_MemsetData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_LaunchData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_SynchronizeData::hStream`[inherited]`

Unique handle for the stream.

Sanitizer_StreamHandle Sanitizer_ResourceMemoryData::hStream`[inherited]`

Stream containing the allocation being created or destroyed. Can be NULL if the allocation is not attached to a stream.

Sanitizer_StreamHandle Sanitizer_ResourceStreamData::hStream`[inherited]`

Unique handle for the stream.

uint32_t Sanitizer_MemsetData::isAsync`[inherited]`

Boolean value indicating if the transfer is asynchronous.

uint32_t Sanitizer_MemcpyData::isAsync`[inherited]`

Boolean value indicating if the transfer is asynchronous.

uint32_t Sanitizer_GraphExecData::isDeviceLaunch`[inherited]`

Boolean value indicating if the graphexec is for a device graph launch

uint32_t Sanitizer_GraphLaunchData::isGraphUpload`[inherited]`

Boolean value indicating if the launch callback is part of a graph upload. This field is only valid if the driver version is 510 or newer.

uint32_t Sanitizer_GraphNodeLaunchData::isGraphUpload`[inherited]`

Boolean value indicating if the node launch callback is part of a graph upload.

Sanitizer_LaunchData { ... } ::launchData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_KERNEL.

uint32_t Sanitizer_GraphNodeLaunchData::launchId`[inherited]`

Launch ID for this CUDA graph instance

CUlibrary Sanitizer_ResourceModuleData::library`[inherited]`

Library associated with the module.

Sanitizer_ResourceMemoryData { ... } ::memAllocData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEM_ALLOC.

Sanitizer_ResourceMemoryData Sanitizer_GraphNodeLaunchData::memAllocData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEM_ALLOC.

Sanitizer_MemcpyData { ... } ::memcpyData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEMCPY.

Sanitizer_MemcpyData Sanitizer_GraphNodeLaunchData::memcpyData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEMCPY.

uint64_t { ... } ::memFreeAddress`[inherited]`

The freed device pointer This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEM_FREE.

uint64_t Sanitizer_GraphNodeLaunchData::memFreeAddress`[inherited]`

The freed device pointer This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEM_FREE.

CUmemoryPool Sanitizer_ResourceMemoryData::memoryPool`[inherited]`

Memory pool containing the allocation being created or destroyed. Can be NULL if the allocation is not attached to a memory pool.

Sanitizer_MemsetData { ... } ::memsetData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEMSET.

Sanitizer_MemsetData Sanitizer_GraphNodeLaunchData::memsetData`[inherited]`

This is only valid if nodeType is CU_GRAPH_NODE_TYPE_MEMSET.

CUmodule Sanitizer_LaunchData::module`[inherited]`

The module containing the grid code.

CUmodule Sanitizer_ResourceFunctionsLazyLoadedData::module`[inherited]`

The module containing the functions.

CUmodule Sanitizer_ResourceModuleData::module`[inherited]`

The module being loaded or unloaded.

CUgraphNode Sanitizer_GraphNodeLaunchData::node`[inherited]`

CUDA graphs node being launched.

CUgraphNodeType Sanitizer_GraphNodeLaunchData::nodeType`[inherited]`

CUDA graphs node type.

uint32_t Sanitizer_ResourceFunctionsLazyLoadedData::numFunctions`[inherited]`

The size of the function array.

const char* Sanitizer_ResourceModuleData::pCubin`[inherited]`

Pointer to the associated cubin.

CUdevice Sanitizer_ResourceMempoolData::peerDevice`[inherited]`

Device that access type changed. Available if cbid is SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_ENABLED or SANITIZER_CBID_RESOURCE_MEMPOOL_PEER_ACCESS_DISABLING.

uint32_t Sanitizer_ResourceMemoryData::permissions`[inherited]`

Allocation permissions: use Sanitizer_ResourceMemoryPermissions to interpret this field.

uint64_t Sanitizer_ExternalMemoryData::size`[inherited]`

Size of the memory imported or mapped. This field is only valid for SANITIZER_CBID_EXTERNAL_MEMORY_IMPORT and SANITIZER_CBID_EXTERNAL_MEMORY_MAPPED.

uint64_t Sanitizer_MemcpyData::size`[inherited]`

Size of the transfer in bytes.

uint64_t Sanitizer_ResourceVirtualRange::size`[inherited]`

Size of the VA range being reserved or released.

uint64_t Sanitizer_ResourceMemoryData::size`[inherited]`

Size of the allocation being created or destroyed.

CUdevice Sanitizer_ResourceMemoryData::sourceDevice`[inherited]`

Source device of this allocation (different from device if SANITIZER_MEMORY_FLAG_PEER is set).

uint64_t Sanitizer_MemcpyData::srcAddress`[inherited]`

The source allocation address.

uint64_t Sanitizer_MemcpyData::srcPitch`[inherited]`

The source allocation pitch.

CUstream Sanitizer_MemcpyData::srcStream`[inherited]`

The stream where the memcpy is executed on the source context

CUstream Sanitizer_EventData::stream`[inherited]`

The stream being recorded or waiting. Available if cbid is SANITIZER_CBID_EVENTS_RECORD or SANITIZER_CBID_EVENTS_STREAM_WAIT.

CUstream Sanitizer_GraphLaunchData::stream`[inherited]`

The stream where the graph is launched.

CUstream Sanitizer_UvmData::stream`[inherited]`

The stream on which the memory is attached. This is only valid if visibility is SANITIZER_MEMORY_VISIBILITY_STREAM

CUstream Sanitizer_BatchMemopData::stream`[inherited]`

The stream where the batch memop is executed.

CUstream Sanitizer_MemsetData::stream`[inherited]`

The stream where the memset is executed.

CUstream Sanitizer_LaunchData::stream`[inherited]`

The stream where the grid is launched.

CUstream Sanitizer_SynchronizeData::stream`[inherited]`

This field is only valid for SANITIZER_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED. This is the stream being synchronized.

CUstream Sanitizer_ResourceMemoryData::stream`[inherited]`

Public handle for the stream.

CUstream Sanitizer_ResourceStreamData::stream`[inherited]`

The stream being created or destroyed. This handle will be NULL for the STREAM_DESTROY_FINISHED cbid.

const char* Sanitizer_CallbackData::symbolName`[inherited]`

Name of the symbol operated on by the runtime or driver API function which issued the callback. This entry is valid only for driver and runtime launch callbacks, where it returns the name of the kernel.

Sanitizer_BatchMemopType Sanitizer_BatchMemopData::type`[inherited]`

Type of batch memory operation.

uint64_t Sanitizer_BatchMemopData::value`[inherited]`

The value to be written.

uint32_t Sanitizer_MemsetData::value`[inherited]`

Value to be written.

Sanitizer_MemoryVisibility Sanitizer_UvmData::visibility`[inherited]`

New visibility for the allocation.

Sanitizer_MemoryVisibility Sanitizer_ResourceMemoryData::visibility`[inherited]`

Visibility of the allocation.

uint64_t Sanitizer_MemsetData::width`[inherited]`

Memset size configuration.

uint64_t Sanitizer_MemcpyData::width`[inherited]`

Memcpy size configuration.

uint64_t Sanitizer_ResourceArrayData::width`[inherited]`

The CUDA array size.