Library/ManagedCuda/CudaDNN/CudaDNNContext.cs
/// <summary>
/// This function serves as a heuristic for obtaining the best suited algorithm for
/// cudnnConvolutionBackwardFilter_v3 for the given layer specifications. Based
/// on the input preference, this function will either return the fastest algorithm or the
/// fastest algorithm within a given memory limit. For an exhaustive search for the fastest
/// algorithm, please use cudnnFindConvolutionBackwardFilterAlgorithm.
/// </summary>
/// <param name="xDesc">Handle to the previously initialized input tensor descriptor.</param>
/// <param name="dyDesc">Handle to the previously initialized input differential tensor descriptor.</param>
/// <param name="convDesc">Previously initialized convolution descriptor.</param>
/// <param name="dwDesc">Handle to a previously initialized filter descriptor.</param>
/// <param name="preference">Enumerant to express the preference criteria in terms of memory requirement and speed.</param>
/// <param name="memoryLimitInbytes">It is to specify the maximum amount of GPU memory the user is willing to 
/// use as a workspace. This is currently a placeholder and is not used.</param>
/// <returns>Enumerant that specifies which convolution algorithm should be used to
/// compute the results according to the specified preference</returns>
This function serves as a heuristic for obtaining the best suited algorithm for
cudnnConvolutionBackwardFilter_v3 for the given layer specifications. Based
on the input preference, this function will either return the fastest algorithm or the
fastest algorithm within a given memory limit. For an exhaustive search for the fastest
algorithm, please use cudnnFindConvolutionBackwardFilterAlgorithm.
This function serves as a heuristic for obtaining the best suited algorithm for cudnnConvolutionBackwardFilter_v3 for the given layer specifications . Based on the input preference this function will either return the fastest algorithm or the fastest algorithm within a given memory limit . For an exhaustive search for the fastest algorithm please use cudnnFindConvolutionBackwardFilterAlgorithm .
public cudnnConvolutionBwdFilterAlgo GetConvolutionBackwardFilterAlgorithm(TensorDescriptor xDesc,
                                                            TensorDescriptor dyDesc,
                                                            ConvolutionDescriptor convDesc,
                                                            FilterDescriptor dwDesc,
                                                            cudnnConvolutionBwdFilterPreference preference,
                                                            SizeT memoryLimitInbytes
                                                            )
        {
            cudnnConvolutionBwdFilterAlgo algo = new cudnnConvolutionBwdFilterAlgo();
            res = CudaDNNNativeMethods.cudnnGetConvolutionBackwardFilterAlgorithm(_handle, xDesc.Desc, dyDesc.Desc, convDesc.Desc, dwDesc.Desc, preference, memoryLimitInbytes, ref algo);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetConvolutionBackwardFilterAlgorithm", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
            return algo;
        }
public cudnnConvolutionBwdFilterAlgo GetConvolutionBackwardFilterAlgorithm ( TensorDescriptor xDesc , TensorDescriptor dyDesc , ConvolutionDescriptor convDesc , FilterDescriptor dwDesc , cudnnConvolutionBwdFilterPreference preference , SizeT memoryLimitInbytes ) { cudnnConvolutionBwdFilterAlgo algo = new cudnnConvolutionBwdFilterAlgo ( ) ; res = CudaDNNNativeMethods . cudnnGetConvolutionBackwardFilterAlgorithm ( _handle , xDesc . Desc , dyDesc . Desc , convDesc . Desc , dwDesc . Desc , preference , memoryLimitInbytes , ref algo ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; return algo ; }
This function serves as a heuristic for obtaining the best suited algorithm for
cudnnConvolutionBackwardFilter_v3 for the given layer specifications.
This function serves as a heuristic for obtaining the best suited algorithm for cudnnConvolutionBackwardFilter_v3 for the given layer specifications .
Enumerant that specifies which convolution algorithm should be used to
compute the results according to the specified preference
Enumerant that specifies which convolution algorithm should be used to compute the results according to the specified preference
xDesc
TensorDescriptor
Handle to the previously initialized input tensor descriptor.
Handle to the previously initialized input tensor descriptor .
dyDesc
TensorDescriptor
Handle to the previously initialized input differential tensor descriptor.
Handle to the previously initialized input differential tensor descriptor .
convDesc
ConvolutionDescriptor
Previously initialized convolution descriptor.
Previously initialized convolution descriptor .
dwDesc
FilterDescriptor
Handle to a previously initialized filter descriptor.
Handle to a previously initialized filter descriptor .
preference
cudnnConvolutionBwdFilterPreference
Enumerant to express the preference criteria in terms of memory requirement and speed.
Enumerant to express the preference criteria in terms of memory requirement and speed .
memoryLimitInbytes
SizeT
It is to specify the maximum amount of GPU memory the user is willing to
use as a workspace. This is currently a placeholder and is not used.
It is to specify the maximum amount of GPU memory the user is willing to use as a workspace . This is currently a placeholder and is not used .