pub unsafe extern "C" fn cudaFreeAsync(
devPtr: *mut c_void,
hStream: cudaStream_t,
) -> cudaError_tExpand description
Frees memory with stream ordered semantics.
Inserts a free operation into hStream. The allocation must not be accessed after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the GPU or querying its pointer attributes results in undefined behavior.
Note: During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.
Note that this function may also return error codes from previous, asynchronous launches.
Note: This function uses standard default stream semantics.
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
hStream: The stream establishing the stream ordering promise.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_NOT_SUPPORTED
See also: cuMemFreeAsync, cudaMallocAsync.