paleo/third_party/libcudnn.py
def cudnnGetConvolutionForwardWorkspaceSize(handle, srcDesc, wDesc, convDesc,
                                            destDesc, algo):
    """"
    This function returns the amount of GPU memory workspace the user needs
    to allocate to be able to call cudnnConvolutionForward with the specified algorithm.

    Parameters
    ----------
    handle : cudnnHandle
        Handle to a previously created cuDNN context.
    srcDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    wDesc : cudnnFilterDescriptor
        Handle to a previously initialized filter descriptor.
    convDesc : cudnnConvolutionDescriptor
        Previously initialized convolution descriptor.
    destDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    algo : cudnnConvolutionFwdAlgo
        Enumerant that specifies the chosen convolution algorithm.

    Returns
    -------
    sizeInBytes: c_size_t
        Amount of GPU memory needed as workspace to be able to execute a
        forward convolution with the sepcified algo.
    """
    sizeInBytes = ctypes.c_size_t()

    status = _libcudnn.cudnnGetConvolutionForwardWorkspaceSize(
        handle, srcDesc, wDesc, convDesc, destDesc, algo,
        ctypes.byref(sizeInBytes))
    cudnnCheckStatus(status)

    return sizeInBytes

    This function returns the amount of GPU memory workspace the user needs
    to allocate to be able to call cudnnConvolutionForward with the specified algorithm.

    Parameters
    ----------
    handle : cudnnHandle
        Handle to a previously created cuDNN context.
    srcDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    wDesc : cudnnFilterDescriptor
        Handle to a previously initialized filter descriptor.
    convDesc : cudnnConvolutionDescriptor
        Previously initialized convolution descriptor.
    destDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    algo : cudnnConvolutionFwdAlgo
        Enumerant that specifies the chosen convolution algorithm.

    Returns
    -------
    sizeInBytes: c_size_t
        Amount of GPU memory needed as workspace to be able to execute a
        forward convolution with the sepcified algo.
    
This function returns the amount of GPU memory workspace the user needs
to allocate to be able to call cudnnConvolutionForward with the specified algorithm.

Parameters

handle : cudnnHandle
Handle to a previously created cuDNN context.
srcDesc : cudnnTensorDescriptor
Handle to a previously initialized tensor descriptor.
wDesc : cudnnFilterDescriptor
Handle to a previously initialized filter descriptor.
convDesc : cudnnConvolutionDescriptor
Previously initialized convolution descriptor.
destDesc : cudnnTensorDescriptor
Handle to a previously initialized tensor descriptor.
algo : cudnnConvolutionFwdAlgo
Enumerant that specifies the chosen convolution algorithm.

Returns

c_size_t
Amount of GPU memory needed as workspace to be able to execute a
forward convolution with the sepcified algo.
This function returns the amount of GPU memory workspace the user needs to allocate to be able to call cudnnConvolutionForward with the specified algorithm . Parameters handle : cudnnHandle Handle to a previously created cuDNN context . srcDesc : cudnnTensorDescriptor Handle to a previously initialized tensor descriptor . wDesc : cudnnFilterDescriptor Handle to a previously initialized filter descriptor . convDesc : cudnnConvolutionDescriptor Previously initialized convolution descriptor . destDesc : cudnnTensorDescriptor Handle to a previously initialized tensor descriptor . algo : cudnnConvolutionFwdAlgo Enumerant that specifies the chosen convolution algorithm . Returns c_size_t Amount of GPU memory needed as workspace to be able to execute a forward convolution with the sepcified algo .
def cudnnGetConvolutionForwardWorkspaceSize(handle, srcDesc, wDesc, convDesc,
                                            destDesc, algo):
    sizeInBytes = ctypes.c_size_t()
    status = _libcudnn.cudnnGetConvolutionForwardWorkspaceSize(
        handle, srcDesc, wDesc, convDesc, destDesc, algo,
        ctypes.byref(sizeInBytes))
    cudnnCheckStatus(status)
    return sizeInBytes
def cudnnGetConvolutionForwardWorkspaceSize ( handle , srcDesc , wDesc , convDesc , destDesc , algo ) : sizeInBytes = ctypes . c_size_t ( ) status = _libcudnn . cudnnGetConvolutionForwardWorkspaceSize ( handle , srcDesc , wDesc , convDesc , destDesc , algo , ctypes . byref ( sizeInBytes ) ) cudnnCheckStatus ( status ) return sizeInBytes
This function returns the amount of GPU memory workspace the user needs
to allocate to be able to call cudnnConvolutionForward with the specified algorithm.
This function returns the amount of GPU memory workspace the user needs to allocate to be able to call cudnnConvolutionForward with the specified algorithm .
""""
    This function returns the amount of GPU memory workspace the user needs
    to allocate to be able to call cudnnConvolutionForward with the specified algorithm.

    Parameters
    ----------
    handle : cudnnHandle
        Handle to a previously created cuDNN context.
    srcDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    wDesc : cudnnFilterDescriptor
        Handle to a previously initialized filter descriptor.
    convDesc : cudnnConvolutionDescriptor
        Previously initialized convolution descriptor.
    destDesc : cudnnTensorDescriptor
        Handle to a previously initialized tensor descriptor.
    algo : cudnnConvolutionFwdAlgo
        Enumerant that specifies the chosen convolution algorithm.

    Returns
    -------
    sizeInBytes: c_size_t
        Amount of GPU memory needed as workspace to be able to execute a
        forward convolution with the sepcified algo.
    """
handle
srcDesc
wDesc
convDesc
destDesc
algo