PTX ISA v9.4

10.35. Special Registers: %perctamemorysize

%perctamemorysize

Size of the per-CTA global memory slice in bytes.

Syntax (predefined)

ptx
.sreg .u32 %perctamemorysize;

Description

A predefined, read-only 32-bit special register initialized with the size (in bytes) of the per-CTA global memory region. This is the pitch between consecutive CTA regions in the per-CTA global memory.

The value is guaranteed to be a multiple of 1024 bytes.

Usage of this special register is valid only inside entry functions that also specify directive [.minperctamemory](../11-directives/04-performance-tuning/minperctamemory.md).

The value of this special register is 0 on Driver that doesn't support allocation of per CTA global memory. On Drivers supporting such allocation, value is guaranteed to be greater or equal than the size specified by .minperctamemory directive.

PTX ISA Notes

Introduced in PTX ISA version 9.4.

Target ISA Notes

Requires sm_80 or higher.

Examples

ptx
mov.u32  %r0, %perctamemorysize;
esc
Type to search across all documentation