Library/ManagedCuda/CudaDNN/CudaDNNNativeMethods.cs
/// <summary>
/// This function attempts all available cuDNN algorithms for cudnnConvolutionForward, using 
/// user-allocated GPU memory, and outputs performance metrics to a user-allocated array of 
/// cudnnConvolutionFwdAlgoPerf_t. These metrics are written in sorted fashion where the first 
/// element has the lowest compute time. The workspace size should be the largest workspace you 
/// can spare in device memory; the size of this workspace will determine the availablity of 
/// the convolution algorithms.
/// </summary>
/// <param name="handle">Handle to a previously created cuDNN context.</param>
/// <param name="xDesc">Handle to the previously initialized input tensor descriptor.</param>
/// <param name="x">Data pointer to GPU memory associated with the tensor descriptor xDesc.</param>
/// <param name="wDesc">Handle to a previously initialized filter descriptor.</param>
/// <param name="w">Data pointer to GPU memory associated with the filter descriptor wDesc.</param>
/// <param name="convDesc">Previously initialized convolution descriptor.</param>
/// <param name="yDesc">Handle to the previously initialized output tensor descriptor.</param>
/// <param name="y">Data pointer to GPU memory associated with the tensor descriptor yDesc. The content of this tensor will be overwritten with arbitary values.</param>
/// <param name="requestedAlgoCount">The maximum number of elements to be stored in perfResults.</param>
/// <param name="returnedAlgoCount">The number of output elements stored in perfResults.</param>
/// <param name="perfResults">A user-allocated array to store performance metrics sorted ascending by compute time.</param>
/// <param name="workSpace">Data pointer to GPU memory that is a necessary workspace for some algorithms. The size of this workspace will determine the availability of algorithms. A nil pointer is considered a workSpace of 0 bytes.</param>
/// <param name="workSpaceSizeInBytes">Specifies the size in bytes of the provided workSpace.</param>
This function attempts all available cuDNN algorithms for cudnnConvolutionForward, using
user-allocated GPU memory, and outputs performance metrics to a user-allocated array of
cudnnConvolutionFwdAlgoPerf_t. These metrics are written in sorted fashion where the first
element has the lowest compute time. The workspace size should be the largest workspace you
can spare in device memory; the size of this workspace will determine the availablity of
the convolution algorithms.
This function attempts all available cuDNN algorithms for cudnnConvolutionForward using user - allocated GPU memory and outputs performance metrics to a user - allocated array of cudnnConvolutionFwdAlgoPerf_t . These metrics are written in sorted fashion where the first element has the lowest compute time . The workspace size should be the largest workspace you can spare in device memory ; the size of this workspace will determine the availablity of the convolution algorithms .
[DllImport(CUDNN_API_DLL_NAME)]
        public static extern cudnnStatus cudnnFindConvolutionForwardAlgorithmEx(
                                        cudnnHandle handle,
                                        cudnnTensorDescriptor xDesc,
                                        CUdeviceptr x,
                                        cudnnFilterDescriptor wDesc,
                                        CUdeviceptr w,
                                        cudnnConvolutionDescriptor convDesc,
                                        cudnnTensorDescriptor yDesc,
                                        CUdeviceptr y,
                                        int requestedAlgoCount,
                                        ref int returnedAlgoCount,
                                        ref cudnnConvolutionFwdAlgoPerf      perfResults,
                                        CUdeviceptr workSpace,
                                        SizeT                              workSpaceSizeInBytes );
[ DllImport ( CUDNN_API_DLL_NAME ) ] public static extern cudnnStatus cudnnFindConvolutionForwardAlgorithmEx ( cudnnHandle handle , cudnnTensorDescriptor xDesc , CUdeviceptr x , cudnnFilterDescriptor wDesc , CUdeviceptr w , cudnnConvolutionDescriptor convDesc , cudnnTensorDescriptor yDesc , CUdeviceptr y , int requestedAlgoCount , ref int returnedAlgoCount , ref cudnnConvolutionFwdAlgoPerf perfResults , CUdeviceptr workSpace , SizeT workSpaceSizeInBytes ) ;
This function attempts all available cuDNN algorithms for cudnnConvolutionForward, using
user-allocated GPU memory, and outputs performance metrics to a user-allocated array of
cudnnConvolutionFwdAlgoPerf_t.
This function attempts all available cuDNN algorithms for cudnnConvolutionForward using user - allocated GPU memory and outputs performance metrics to a user - allocated array of cudnnConvolutionFwdAlgoPerf_t .
handle
cudnnHandle
Handle to a previously created cuDNN context.
Handle to a previously created cuDNN context .
xDesc
cudnnTensorDescriptor
Handle to the previously initialized input tensor descriptor.
Handle to the previously initialized input tensor descriptor .
x
CUdeviceptr
Data pointer to GPU memory associated with the tensor descriptor xDesc.
Data pointer to GPU memory associated with the tensor descriptor xDesc .
wDesc
cudnnFilterDescriptor
Handle to a previously initialized filter descriptor.
Handle to a previously initialized filter descriptor .
w
CUdeviceptr
Data pointer to GPU memory associated with the filter descriptor wDesc.
Data pointer to GPU memory associated with the filter descriptor wDesc .
convDesc
cudnnConvolutionDescriptor
Previously initialized convolution descriptor.
Previously initialized convolution descriptor .
yDesc
cudnnTensorDescriptor
Handle to the previously initialized output tensor descriptor.
Handle to the previously initialized output tensor descriptor .
y
CUdeviceptr
Data pointer to GPU memory associated with the tensor descriptor yDesc. The content of this tensor will be overwritten with arbitary values.
Data pointer to GPU memory associated with the tensor descriptor yDesc . The content of this tensor will be overwritten with arbitary values .
requestedAlgoCount
int
The maximum number of elements to be stored in perfResults.
The maximum number of elements to be stored in perfResults .
int
ref
cudnnConvolutionFwdAlgoPerf
ref
workSpace
CUdeviceptr
Data pointer to GPU memory that is a necessary workspace for some algorithms. The size of this workspace will determine the availability of algorithms. A nil pointer is considered a workSpace of 0 bytes.
Data pointer to GPU memory that is a necessary workspace for some algorithms . The size of this workspace will determine the availability of algorithms . A nil pointer is considered a workSpace of 0 bytes .
workSpaceSizeInBytes
SizeT
Specifies the size in bytes of the provided workSpace.
Specifies the size in bytes of the provided workSpace .
returnedAlgoCount
The number of output elements stored in perfResults.
The number of output elements stored in perfResults .
perfResults
A user-allocated array to store performance metrics sorted ascending by compute time.
A user - allocated array to store performance metrics sorted ascending by compute time .