# CUpti_ActivityKernel9 Struct Reference
[CUPTI Activity API]

The activity record for kernel. More...

## Data Fields

int32_t | blockX
int32_t | blockY
int32_t | blockZ
union {
} | cacheConfig
uint32_t | channelID
CUpti_ChannelType | channelType
uint32_t | clusterSchedulingPolicy
uint32_t | clusterX
uint32_t | clusterY
uint32_t | clusterZ
uint64_t | completed
uint32_t | contextId
uint32_t | correlationId
uint32_t | deviceId
int32_t | dynamicSharedMemory
uint64_t | end
uint32_t | graphId
uint64_t | graphNodeId
int64_t | gridId
int32_t | gridX
int32_t | gridY
int32_t | gridZ
uint8_t | isSharedMemoryCarveoutRequested
CUpti_ActivityKind | kind
uint8_t | launchType
uint32_t | localMemoryPerThread
uint32_t | localMemoryTotal
uint64_t | localMemoryTotal_v2
uint32_t | maxActiveClusters
uint32_t | maxPotentialClusterSize
const char * | name
CUaccessPolicyWindow * | pAccessPolicyWindow
uint8_t | padding
CUpti_ActivityPartitionedGlobalCacheConfig | partitionedGlobalCacheExecuted
CUpti_ActivityPartitionedGlobalCacheConfig | partitionedGlobalCacheRequested
uint64_t | queued
uint16_t | registersPerThread
void * | reserved0
uint8_t | sharedMemoryCarveoutRequested
uint8_t | sharedMemoryConfig
uint32_t | sharedMemoryExecuted
CUpti_FuncShmemLimitConfig | shmemLimitConfig
uint64_t | start
int32_t | staticSharedMemory
uint32_t | streamId
uint64_t | submitted
uint8_t | executed:4
uint8_t | requested:4

## Detailed Description

This activity record represents a kernel execution (CUPTI_ACTIVITY_KIND_KERNEL and CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL)

## Field Documentation

int32_t CUpti_ActivityKernel9::blockX

The X-dimension block size for the kernel.

int32_t CUpti_ActivityKernel9::blockY

The Y-dimension block size for the kernel.

int32_t CUpti_ActivityKernel9::blockZ

The Z-dimension grid size for the kernel.

union { ... } CUpti_ActivityKernel9::cacheConfig

For devices with compute capability 7.0+ cacheConfig values are not updated in case field isSharedMemoryCarveoutRequested is set

uint32_t CUpti_ActivityKernel9::channelID

The ID of the HW channel on which the kernel is launched.

CUpti_ChannelType CUpti_ActivityKernel9::channelType

The type of the channel

uint32_t CUpti_ActivityKernel9::clusterSchedulingPolicy

The cluster scheduling policy for the kernel. Refer CUclusterSchedulingPolicy Field is valid for devices with compute capability 9.0 and higher

uint32_t CUpti_ActivityKernel9::clusterX

The X-dimension cluster size for the kernel. Field is valid for devices with compute capability 9.0 and higher

uint32_t CUpti_ActivityKernel9::clusterY

The Y-dimension cluster size for the kernel. Field is valid for devices with compute capability 9.0 and higher

uint32_t CUpti_ActivityKernel9::clusterZ

The Z-dimension cluster size for the kernel. Field is valid for devices with compute capability 9.0 and higher

uint64_t CUpti_ActivityKernel9::completed

The completed timestamp for the kernel execution, in ns. It represents the completion of all it's child kernels and the kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the completion time is unknown.

uint32_t CUpti_ActivityKernel9::contextId

The ID of the context where the kernel is executing.

uint32_t CUpti_ActivityKernel9::correlationId

The correlation ID of the kernel. Each kernel execution is assigned a unique correlation ID that is identical to the correlation ID in the driver or runtime API activity record that launched the kernel.

uint32_t CUpti_ActivityKernel9::deviceId

The ID of the device where the kernel is executing.

int32_t CUpti_ActivityKernel9::dynamicSharedMemory

The dynamic shared memory reserved for the kernel, in bytes.

uint64_t CUpti_ActivityKernel9::end

The end timestamp for the kernel execution, in ns. A value of 0 for both the start and end timestamps indicates that timestamp information could not be collected for the kernel.

uint8_t CUpti_ActivityKernel9::executed

The cache configuration used for the kernel. The value is one of the CUfunc_cache enumeration values from cuda.h.

uint32_t CUpti_ActivityKernel9::graphId

The unique ID of the graph that launched this kernel through graph launch APIs. This field will be 0 if the kernel is not launched through graph launch APIs.

uint64_t CUpti_ActivityKernel9::graphNodeId

The unique ID of the graph node that launched this kernel through graph launch APIs. This field will be 0 if the kernel is not launched through graph launch APIs.

int64_t CUpti_ActivityKernel9::gridId

The grid ID of the kernel. Each kernel is assigned a unique grid ID at runtime.

int32_t CUpti_ActivityKernel9::gridX

The X-dimension grid size for the kernel.

int32_t CUpti_ActivityKernel9::gridY

The Y-dimension grid size for the kernel.

int32_t CUpti_ActivityKernel9::gridZ

The Z-dimension grid size for the kernel.

uint8_t CUpti_ActivityKernel9::isSharedMemoryCarveoutRequested

This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was updated for the kernel launch

CUpti_ActivityKind CUpti_ActivityKernel9::kind

The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.

uint8_t CUpti_ActivityKernel9::launchType

The indicates if the kernel was executed via a regular launch or via a single/multi device cooperative launch.

See also:
  CUpti_ActivityLaunchType

uint32_t CUpti_ActivityKernel9::localMemoryPerThread

The amount of local memory reserved for each thread, in bytes.

uint32_t CUpti_ActivityKernel9::localMemoryTotal

The total amount of local memory reserved for the kernel, in bytes (deprecated in CUDA 11.8). Refer field localMemoryTotal_v2

uint64_t CUpti_ActivityKernel9::localMemoryTotal_v2

The total amount of local memory reserved for the kernel, in bytes.

uint32_t CUpti_ActivityKernel9::maxActiveClusters

The maximum clusters that could co-exist on the target device for the kernel

uint32_t CUpti_ActivityKernel9::maxPotentialClusterSize

The maximum cluster size for the kernel

const char* CUpti_ActivityKernel9::name

The name of the kernel. This name is shared across all activity records representing the same kernel, and so should not be modified.

CUaccessPolicyWindow* CUpti_ActivityKernel9::pAccessPolicyWindow

The pointer to the access policy window. The structure CUaccessPolicyWindow is defined in cuda.h.

uint8_t CUpti_ActivityKernel9::padding

Undefined. Reserved for internal use.

CUpti_ActivityPartitionedGlobalCacheConfig CUpti_ActivityKernel9::partitionedGlobalCacheExecuted

The partitioned global caching executed for the kernel. Partitioned global caching is required to enable caching on certain chips, such as devices with compute capability 5.2. Partitioned global caching can be automatically disabled if the occupancy requirement of the launch cannot support caching.

CUpti_ActivityPartitionedGlobalCacheConfig CUpti_ActivityKernel9::partitionedGlobalCacheRequested

The partitioned global caching requested for the kernel. Partitioned global caching is required to enable caching on certain chips, such as devices with compute capability 5.2.

uint64_t CUpti_ActivityKernel9::queued

The timestamp when the kernel is queued up in the command buffer, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time could not be collected for the kernel. This timestamp is not collected by default. Use API cuptiActivityEnableLatencyTimestamps() to enable collection.

Command buffer is a buffer written by CUDA driver to send commands like kernel launch, memory copy etc to the GPU. All launches of CUDA kernels are asynchrnous with respect to the host, the host requests the launch by writing commands into the command buffer, then returns without checking the GPU's progress.

uint16_t CUpti_ActivityKernel9::registersPerThread

The number of registers required for each thread executing the kernel.

uint8_t CUpti_ActivityKernel9::requested

The cache configuration requested by the kernel. The value is one of the CUfunc_cache enumeration values from cuda.h.

void* CUpti_ActivityKernel9::reserved0

Undefined. Reserved for internal use.

uint8_t CUpti_ActivityKernel9::sharedMemoryCarveoutRequested

Shared memory carveout value requested for the function in percentage of the total resource. The value will be updated only if field isSharedMemoryCarveoutRequested is set.

uint8_t CUpti_ActivityKernel9::sharedMemoryConfig

The shared memory configuration used for the kernel. The value is one of the CUsharedconfig enumeration values from cuda.h.

uint32_t CUpti_ActivityKernel9::sharedMemoryExecuted

Shared memory size set by the driver.

CUpti_FuncShmemLimitConfig CUpti_ActivityKernel9::shmemLimitConfig

The shared memory limit config for the kernel. This field shows whether user has opted for a higher per block limit of dynamic shared memory.

uint64_t CUpti_ActivityKernel9::start

The start timestamp for the kernel execution, in ns. A value of 0 for both the start and end timestamps indicates that timestamp information could not be collected for the kernel.

int32_t CUpti_ActivityKernel9::staticSharedMemory

The static shared memory allocated for the kernel, in bytes.

uint32_t CUpti_ActivityKernel9::streamId

The ID of the stream where the kernel is executing.

uint64_t CUpti_ActivityKernel9::submitted

The timestamp when the command buffer containing the kernel launch is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the submitted time could not be collected for the kernel. This timestamp is not collected by default. Use API cuptiActivityEnableLatencyTimestamps() to enable collection.