pub unsafe extern "C" fn cudaDeviceGetLimit(
pValue: *mut size_t,
limit: cudaLimit,
) -> cudaError_tExpand description
Return resource limits.
Returns in *pValue the current size of limit. The following cudaLimit values are supported.
cudaLimit::cudaLimitStackSizeis the stack size in bytes of each GPU thread.cudaLimit::cudaLimitPrintfFifoSizeis the size in bytes of the shared FIFO used by theprintf()device system call.cudaLimit::cudaLimitMallocHeapSizeis the size in bytes of the heap used by themalloc()andfree()device system calls.cudaLimit::cudaLimitDevRuntimeSyncDepthis the maximum grid depth at which a thread can isssue the device runtime callcudaDeviceSynchronizeto wait on child grid launches to complete. This functionality is removed for devices of compute capability >= 9.0, and hence will return errorcudaError_t::CUDA_ERROR_UNSUPPORTED_LIMITon such devices.cudaLimit::cudaLimitDevRuntimePendingLaunchCountis the maximum number of outstanding device runtime launches.cudaLimit::cudaLimitMaxL2FetchGranularityis the L2 cache fetch granularity.cudaLimit::cudaLimitPersistingL2CacheSizeis the persisting L2 cache size in bytes.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
pValue: Returned size of the limit.limit: Limit to query.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_UNSUPPORTED_LIMITcudaError_t::CUDA_ERROR_INVALID_VALUE
See also: cudaDeviceSetLimit, cuCtxGetLimit.