Cupti: CUpti_ActivityMemory2 Struct Reference

# CUpti_ActivityMemory2 Struct Reference
[CUPTI Activity API]

The activity record for memory. More...

## Data Fields
uint64_t | address
uint64_t | bytes
uint32_t | contextId
uint32_t | correlationId
uint32_t | deviceId
uint32_t | isAsync
CUpti_ActivityKind | kind
CUpti_ActivityMemoryKind | memoryKind
CUpti_ActivityMemoryOperationType | memoryOperationType
struct {
uint64_t address
CUpti_ActivityMemoryPoolType memoryPoolType
uint64_t releaseThreshold
} | memoryPoolConfig
const char * | name
uint64_t | PC
uint32_t | processId
uint32_t | streamId
uint64_t | timestamp
uint64_t | processId
uint64_t | size

## Detailed Description

This activity record represents a memory allocation and free operation (CUPTI_ACTIVITY_KIND_MEMORY2). This activity record provides separate records for memory allocation and memory release operations. This allows to correlate the corresponding driver and runtime API activity record with the memory operation.

Note: This activity record is an upgrade over CUpti_ActivityMemory enabled using the kind CUPTI_ACTIVITY_KIND_MEMORY. CUpti_ActivityMemory provides a single record for the memory allocation and memory release operations.

## Field Documentation

uint64_t CUpti_ActivityMemory2::address

The virtual address of the allocation.

The base address of the memory pool.

uint64_t CUpti_ActivityMemory2::bytes

The number of bytes of memory allocated.

uint32_t CUpti_ActivityMemory2::contextId

The ID of the context. If context is NULL, `contextId` is set to CUPTI_INVALID_CONTEXT_ID.

uint32_t CUpti_ActivityMemory2::correlationId

The correlation ID of the memory operation. Each memory operation is assigned a unique correlation ID that is identical to the correlation ID in the driver and runtime API activity record that launched the memory operation.

uint32_t CUpti_ActivityMemory2::deviceId

The ID of the device where the memory operation is taking place.

uint32_t CUpti_ActivityMemory2::isAsync

`isAsync` is set if memory operation happens through async memory APIs.

CUpti_ActivityKind CUpti_ActivityMemory2::kind

The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY2

CUpti_ActivityMemoryKind CUpti_ActivityMemory2::memoryKind

The memory kind requested by the user, CUpti_ActivityMemoryKind.

CUpti_ActivityMemoryOperationType CUpti_ActivityMemory2::memoryOperationType

The memory operation requested by the user, CUpti_ActivityMemoryOperationType.

struct { ... } CUpti_ActivityMemory2::memoryPoolConfig

The memory pool configuration used for the memory operations.

CUpti_ActivityMemoryPoolType CUpti_ActivityMemory2::memoryPoolType

The type of the memory pool, CUpti_ActivityMemoryPoolType

const char* CUpti_ActivityMemory2::name

Variable name. This name is shared across all activity records representing the same symbol, and so should not be modified.

uint64_t CUpti_ActivityMemory2::PC

The program counter of the memory operation.

uint64_t CUpti_ActivityMemory2::processId

The processId of the memory pool. `processId` is valid if `memoryPoolType` is CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED, CUpti_ActivityMemoryPoolType.

uint32_t CUpti_ActivityMemory2::processId

The ID of the process to which this record belongs to.

uint64_t CUpti_ActivityMemory2::releaseThreshold

The release threshold of the memory pool in bytes. `releaseThreshold` is valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, CUpti_ActivityMemoryPoolType.

uint64_t CUpti_ActivityMemory2::size

The size of the memory pool in bytes. `size` is valid if `memoryPoolType` is CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, CUpti_ActivityMemoryPoolType.

uint32_t CUpti_ActivityMemory2::streamId

The ID of the stream. If memory operation is not async, `streamId` is set to CUPTI_INVALID_STREAM_ID.

uint64_t CUpti_ActivityMemory2::timestamp

The start timestamp for the memory operation, in ns.