Class LibMatrixCuDNNPoolingDescriptors
- java.lang.Object
-
- org.apache.sysds.runtime.matrix.data.LibMatrixCuDNNPoolingDescriptors
-
- All Implemented Interfaces:
AutoCloseable
public class LibMatrixCuDNNPoolingDescriptors 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.
-
-
Field Summary
Fields Modifier and Type Field Description jcuda.jcudnn.cudnnTensorDescriptor
dxDesc
jcuda.jcudnn.cudnnTensorDescriptor
dyDesc
jcuda.jcudnn.cudnnPoolingDescriptor
poolingDesc
jcuda.jcudnn.cudnnTensorDescriptor
xDesc
jcuda.jcudnn.cudnnTensorDescriptor
yDesc
-
Constructor Summary
Constructors Constructor Description LibMatrixCuDNNPoolingDescriptors()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static LibMatrixCuDNNPoolingDescriptors
cudnnPoolingBackwardDescriptors(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, LibMatrixDNN.PoolingType poolingType)
Get descriptors for maxpooling backward operationstatic LibMatrixCuDNNPoolingDescriptors
cudnnPoolingDescriptors(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, LibMatrixDNN.PoolingType poolingType)
Get descriptors for maxpooling operation
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
cudnnPoolingBackwardDescriptors
public static LibMatrixCuDNNPoolingDescriptors cudnnPoolingBackwardDescriptors(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, LibMatrixDNN.PoolingType poolingType)
Get descriptors for maxpooling backward operation- Parameters:
gCtx
- gpu contextinstName
- instruction nameN
- batch sizeC
- number of channelsH
- height of imageW
- width of imageK
- number of filtersR
- height of filterS
- width of filterpad_h
- vertical paddingpad_w
- horizontal paddingstride_h
- horizontal stridestride_w
- vertical strideP
- (H - R + 1 + 2*pad_h)/stride_hQ
- (W - S + 1 + 2*pad_w)/stride_wpoolingType
- type of pooling- Returns:
- decriptor wrapper
-
cudnnPoolingDescriptors
public static LibMatrixCuDNNPoolingDescriptors cudnnPoolingDescriptors(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, LibMatrixDNN.PoolingType poolingType)
Get descriptors for maxpooling operation- Parameters:
gCtx
- gpu contextinstName
- instruction nameN
- batch sizeC
- number of channelsH
- height of imageW
- width of imageK
- number of filtersR
- height of filterS
- width of filterpad_h
- vertical paddingpad_w
- horizontal paddingstride_h
- horizontal stridestride_w
- vertical strideP
- (H - R + 1 + 2*pad_h)/stride_hQ
- (W - S + 1 + 2*pad_w)/stride_wpoolingType
- type of pooling- Returns:
- decriptor wrapper
-
-