cuda.bindings._v2.driver.ctx_get_limit#

cuda.bindings._v2.driver.ctx_get_limit(int limit) → size_t#

Returns resource limits.

Returns in *pvalue the current size of limit. The supported CUlimit values are:.

  • CU_LIMIT_STACK_SIZE: stack size in bytes of each GPU thread.

  • CU_LIMIT_PRINTF_FIFO_SIZE: size in bytes of the FIFO used by the printf() device system call.

  • CU_LIMIT_MALLOC_HEAP_SIZE: size in bytes of the heap used by the malloc() and free() device system calls.

  • CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH: maximum grid depth at which a thread can issue the device runtime call cudaDeviceSynchronize() to wait on child grid launches to complete.

  • CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT: maximum number of outstanding device runtime launches that can be made from this context.

  • CU_LIMIT_MAX_L2_FETCH_GRANULARITY: L2 cache fetch granularity.

  • CU_LIMIT_PERSISTING_L2_CACHE_SIZE: Persisting L2 cache size in bytes.

  • CU_LIMIT_PER_BLOCK_MEMORY_SIZE: Per-block memory in bytes.

Parameters:

limit (Limit) – Limit to query.

Returns:

Returned size of limit.

Return type:

size_t

See also

cuCtxGetLimit