Class LibMatrixCuDNNConvolutionAlgorithm
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.LibMatrixCuDNNConvolutionAlgorithm
 
- 
- All Implemented Interfaces:
- AutoCloseable
 
 public class LibMatrixCuDNNConvolutionAlgorithm extends Object implements AutoCloseable This class is a wrapper that contain necessary data structures to invoke a cudnn convolution* functions (such as cudnnConvolutionForward, etc) It implements autocloseable to simplify the LibMatrixCuDNN code and also avoids potential memory leaks. The caller has to use the factory methods: cudnnGetConvolutionForwardAlgorithm, cudnnGetConvolutionBackwardFilterAlgorithm and cudnnGetConvolutionBackwardDataAlgorithm to get the LibMatrixCuDNNConvolutionAlgorithm object. The naming of this methods is consistent with that of CuDNN library.
- 
- 
Field SummaryFields Modifier and Type Field Description intalgolongsizeInBytesjcuda.PointerworkSpace
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Deallocates the tensor and filter descriptors as well as allocated workspacestatic LibMatrixCuDNNConvolutionAlgorithmcudnnGetConvolutionBackwardDataAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit)Factory method to get the algorithm wrapper for convolution backward datastatic LibMatrixCuDNNConvolutionAlgorithmcudnnGetConvolutionBackwardFilterAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit)Factory method to get the algorithm wrapper for convolution backward filterstatic LibMatrixCuDNNConvolutionAlgorithmcudnnGetConvolutionForwardAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit)Factory method to get the algorithm wrapper for convolution forward
 
- 
- 
- 
Method Detail- 
closepublic void close() Deallocates the tensor and filter descriptors as well as allocated workspace- Specified by:
- closein interface- AutoCloseable
 
 - 
cudnnGetConvolutionForwardAlgorithmpublic static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionForwardAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) Factory method to get the algorithm wrapper for convolution forward- Parameters:
- gCtx- a valid- GPUContext
- instName- the invoking instruction's name for record- Statistics.
- N- number of input images
- C- number of channels
- H- height of each image
- W- width of each image
- K- number of output "channels"
- R- height of filter
- S- width of filter
- pad_h- padding height
- pad_w- padding width
- stride_h- stride height
- stride_w- string width
- P- output height
- Q- output width
- workspaceLimit- maximum intermediate memory to use
- Returns:
- algorithm wrapper
 
 - 
cudnnGetConvolutionBackwardFilterAlgorithmpublic static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionBackwardFilterAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) Factory method to get the algorithm wrapper for convolution backward filter- Parameters:
- gCtx- a valid- GPUContext
- instName- the invoking instruction's name for record- Statistics.
- N- number of input images
- C- number of channels
- H- height of each image
- W- width of each image
- K- number of output "channels"
- R- height of filter
- S- width of filter
- pad_h- padding height
- pad_w- padding width
- stride_h- stride height
- stride_w- string width
- P- output height
- Q- output width
- workspaceLimit- maximum intermediate memory to use
- Returns:
- algorithm wrapper
 
 - 
cudnnGetConvolutionBackwardDataAlgorithmpublic static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionBackwardDataAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) Factory method to get the algorithm wrapper for convolution backward data- Parameters:
- gCtx- a valid- GPUContext
- instName- the invoking instruction's name for record- Statistics.
- N- number of input images
- C- number of channels
- H- height of each image
- W- width of each image
- K- number of output "channels"
- R- height of filter
- S- width of filter
- pad_h- padding height
- pad_w- padding width
- stride_h- stride height
- stride_w- string width
- P- output height
- Q- output width
- workspaceLimit- maximum intermediate memory to use
- Returns:
- algorithm wrapper
 
 
- 
 
-