Function cudaDeviceGetLimit

Source
pub unsafe extern "C" fn cudaDeviceGetLimit(
    pValue: *mut usize,
    limit: cudaLimit,
) -> cudaError_t
Expand description

\brief Return resource limits

Returns in \p *pValue the current size of \p limit. The following ::cudaLimit values are supported.

  • ::cudaLimitStackSize is the stack size in bytes of each GPU thread.
  • ::cudaLimitPrintfFifoSize is the size in bytes of the shared FIFO used by the ::printf() device system call.
  • ::cudaLimitMallocHeapSize is the size in bytes of the heap used by the ::malloc() and ::free() device system calls.
  • ::cudaLimitDevRuntimeSyncDepth is the maximum grid depth at which a thread can isssue the device runtime call ::cudaDeviceSynchronize() to wait on child grid launches to complete. This functionality is removed for devices of compute capability >= 9.0, and hence will return error ::cudaErrorUnsupportedLimit on such devices.
  • ::cudaLimitDevRuntimePendingLaunchCount is the maximum number of outstanding device runtime launches.
  • ::cudaLimitMaxL2FetchGranularity is the L2 cache fetch granularity.
  • ::cudaLimitPersistingL2CacheSize is the persisting L2 cache size in bytes.

\param limit - Limit to query \param pValue - Returned size of the limit

\return ::cudaSuccess, ::cudaErrorUnsupportedLimit, ::cudaErrorInvalidValue \notefnerr \note_init_rt \note_callback

\sa ::cudaDeviceSetLimit, ::cuCtxGetLimit