Class RNNDescriptor
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda.CudaDNN
Assembly: CudaDNN.dll
Syntax
public class RNNDescriptor : IDisposable
Constructors
| Improve this Doc View SourceRNNDescriptor(CudaDNNContext)
Declaration
public RNNDescriptor(CudaDNNContext context)
Parameters
Type | Name | Description |
---|---|---|
CudaDNNContext | context |
Properties
| Improve this Doc View SourceDesc
Returns the inner handle.
Declaration
public cudnnRNNDescriptor Desc { get; }
Property Value
Type | Description |
---|---|
cudnnRNNDescriptor |
MathType
The math type specified in a given RNN descriptor.
Declaration
public cudnnMathType MathType { set; }
Property Value
Type | Description |
---|---|
cudnnMathType |
Methods
| Improve this Doc View SourcecudnnGetRNNParamsSize(TensorDescriptor, ref SizeT, cudnnDataType)
This function is used to query the amount of parameter space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void cudnnGetRNNParamsSize(TensorDescriptor xDesc, ref SizeT sizeInBytes, cudnnDataType dataType)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor | xDesc | A fully packed tensor descriptor describing the input to one recurrent iteration. |
SizeT | sizeInBytes | Minimum amount of GPU memory needed as parameter space to be able to execute an RNN with the specified descriptor and input tensors. |
cudnnDataType | dataType | The data type of the parameters. |
Dispose()
Dispose
Declaration
public void Dispose()
Dispose(Boolean)
For IDisposable
Declaration
protected virtual void Dispose(bool fDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fDisposing |
Finalize()
For dispose
Declaration
protected void Finalize()
GetRNNLinLayerBiasParams(Int32, TensorDescriptor, FilterDescriptor, CudaDeviceVariable<Double>, Int32, FilterDescriptor, CudaDeviceVariable<SizeT>)
This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void GetRNNLinLayerBiasParams(int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable<double> w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable<SizeT> linLayerBias)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | layer | The layer to query. |
TensorDescriptor | xDesc | A fully packed tensor descriptor describing the input to one recurrent iteration. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Double> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
System.Int32 | linLayerID | The linear layer to obtain information about:
|
FilterDescriptor | linLayerBiasDesc | Handle to a previously created filter descriptor. |
CudaDeviceVariable<SizeT> | linLayerBias | Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc. |
GetRNNLinLayerBiasParams(Int32, TensorDescriptor, FilterDescriptor, CudaDeviceVariable<Single>, Int32, FilterDescriptor, CudaDeviceVariable<SizeT>)
This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void GetRNNLinLayerBiasParams(int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable<float> w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable<SizeT> linLayerBias)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | layer | The layer to query. |
TensorDescriptor | xDesc | A fully packed tensor descriptor describing the input to one recurrent iteration. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Single> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
System.Int32 | linLayerID | The linear layer to obtain information about:
|
FilterDescriptor | linLayerBiasDesc | Handle to a previously created filter descriptor. |
CudaDeviceVariable<SizeT> | linLayerBias | Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc. |
GetRNNLinLayerMatrixParams(Int32, TensorDescriptor, FilterDescriptor, CudaDeviceVariable<Double>, Int32, FilterDescriptor, CudaDeviceVariable<SizeT>)
This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void GetRNNLinLayerMatrixParams(int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable<double> w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable<SizeT> linLayerMat)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | layer | The layer to query. |
TensorDescriptor | xDesc | A fully packed tensor descriptor describing the input to one recurrent iteration. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Double> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
System.Int32 | linLayerID | The linear layer to obtain information about:
|
FilterDescriptor | linLayerMatDesc | Handle to a previously created filter descriptor. |
CudaDeviceVariable<SizeT> | linLayerMat | Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc. |
GetRNNLinLayerMatrixParams(Int32, TensorDescriptor, FilterDescriptor, CudaDeviceVariable<Single>, Int32, FilterDescriptor, CudaDeviceVariable<SizeT>)
This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void GetRNNLinLayerMatrixParams(int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable<float> w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable<SizeT> linLayerMat)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | layer | The layer to query. |
TensorDescriptor | xDesc | A fully packed tensor descriptor describing the input to one recurrent iteration. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Single> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
System.Int32 | linLayerID | The linear layer to obtain information about:
|
FilterDescriptor | linLayerMatDesc | Handle to a previously created filter descriptor. |
CudaDeviceVariable<SizeT> | linLayerMat | Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc. |
GetRNNTrainingReserveSize(Int32, TensorDescriptor[], ref SizeT)
This function is used to query the amount of reserved space required for training the RNN described by rnnDesc with inputs dimensions defined by xDesc. The same reserve space must be passed to cudnnRNNForwardTraining, cudnnRNNBackwardData and cudnnRNNBackwardWeights.
Declaration
public void GetRNNTrainingReserveSize(int seqLength, TensorDescriptor[] xDesc, ref SizeT sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | seqLength | Number of iterations to unroll over. |
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. |
SizeT | sizeInBytes | Minimum amount of GPU memory needed as reserve space to be able to train an RNN with the specified descriptor and input tensors. |
GetRNNWorkspaceSize(Int32, TensorDescriptor[], ref SizeT)
This function is used to query the amount of work space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.
Declaration
public void GetRNNWorkspaceSize(int seqLength, TensorDescriptor[] xDesc, ref SizeT sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | seqLength | Number of iterations to unroll over. |
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. |
SizeT | sizeInBytes | Minimum amount of GPU memory needed as workspace to be able to execute an RNN with the specified descriptor and input tensors. |
RNNBackwardData(TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, FilterDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>, SizeT, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.
Declaration
public void RNNBackwardData(TensorDescriptor[] yDesc, CudaDeviceVariable<double> y, TensorDescriptor[] dyDesc, CudaDeviceVariable<double> dy, TensorDescriptor dhyDesc, CudaDeviceVariable<double> dhy, TensorDescriptor dcyDesc, CudaDeviceVariable<double> dcy, FilterDescriptor wDesc, CudaDeviceVariable<double> w, TensorDescriptor hxDesc, CudaDeviceVariable<double> hx, TensorDescriptor cxDesc, CudaDeviceVariable<double> cx, TensorDescriptor[] dxDesc, CudaDeviceVariable<double> dx, TensorDescriptor dhxDesc, CudaDeviceVariable<double> dhx, TensorDescriptor dcxDesc, CudaDeviceVariable<double> dcx, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Double> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
TensorDescriptor[] | dyDesc | An array of tensor descriptors describing the gradient at the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Double> | dy | Data pointer to GPU memory associated with the tensor descriptors in the array dyDesc. |
TensorDescriptor | dhyDesc | Handle to a previously initialized tensor descriptor describing the gradients at the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | dhy | Data pointer to GPU memory associated with the tensor descriptor dhyDesc. If a NULL pointer is passed, the gradients at the final hidden state of the network will be initialized to zero. |
TensorDescriptor | dcyDesc | Handle to a previously initialized tensor descriptor describing the gradients at the final cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | dcy | Data pointer to GPU memory associated with the tensor descriptor dcyDesc. If a NULL pointer is passed, the gradients at the final cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Double> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
TensorDescriptor[] | dxDesc | An array of tensor descriptors describing the gradient at the input of each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | dx | Data pointer to GPU memory associated with the tensor descriptors in the array dxDesc. |
TensorDescriptor | dhxDesc | Handle to a previously initialized tensor descriptor describing the gradient at the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | dhx | Data pointer to GPU memory associated with the tensor descriptor dhxDesc. If a NULL pointer is passed, the gradient at the hidden input of the network will not be set. |
TensorDescriptor | dcxDesc | Handle to a previously initialized tensor descriptor describing the gradient at the initial cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | dcx | Data pointer to GPU memory associated with the tensor descriptor dcxDesc. If a NULL pointer is passed, the gradient at the cell input of the network will not be set. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
RNNBackwardData(TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, FilterDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, CudaDeviceVariable<Byte>, SizeT, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.
Declaration
public void RNNBackwardData(TensorDescriptor[] yDesc, CudaDeviceVariable<float> y, TensorDescriptor[] dyDesc, CudaDeviceVariable<float> dy, TensorDescriptor dhyDesc, CudaDeviceVariable<float> dhy, TensorDescriptor dcyDesc, CudaDeviceVariable<float> dcy, FilterDescriptor wDesc, CudaDeviceVariable<float> w, TensorDescriptor hxDesc, CudaDeviceVariable<float> hx, TensorDescriptor cxDesc, CudaDeviceVariable<float> cx, TensorDescriptor[] dxDesc, CudaDeviceVariable<float> dx, TensorDescriptor dhxDesc, CudaDeviceVariable<float> dhx, TensorDescriptor dcxDesc, CudaDeviceVariable<float> dcx, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Single> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
TensorDescriptor[] | dyDesc | An array of tensor descriptors describing the gradient at the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Single> | dy | Data pointer to GPU memory associated with the tensor descriptors in the array dyDesc. |
TensorDescriptor | dhyDesc | Handle to a previously initialized tensor descriptor describing the gradients at the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | dhy | Data pointer to GPU memory associated with the tensor descriptor dhyDesc. If a NULL pointer is passed, the gradients at the final hidden state of the network will be initialized to zero. |
TensorDescriptor | dcyDesc | Handle to a previously initialized tensor descriptor describing the gradients at the final cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | dcy | Data pointer to GPU memory associated with the tensor descriptor dcyDesc. If a NULL pointer is passed, the gradients at the final cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Single> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
TensorDescriptor[] | dxDesc | An array of tensor descriptors describing the gradient at the input of each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | dx | Data pointer to GPU memory associated with the tensor descriptors in the array dxDesc. |
TensorDescriptor | dhxDesc | Handle to a previously initialized tensor descriptor describing the gradient at the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | dhx | Data pointer to GPU memory associated with the tensor descriptor dhxDesc. If a NULL pointer is passed, the gradient at the hidden input of the network will not be set. |
TensorDescriptor | dcxDesc | Handle to a previously initialized tensor descriptor describing the gradient at the initial cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | dcx | Data pointer to GPU memory associated with the tensor descriptor dcxDesc. If a NULL pointer is passed, the gradient at the cell input of the network will not be set. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
RNNBackwardWeights(TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor[], CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>, SizeT, FilterDescriptor, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>, SizeT)
This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.
Declaration
public void RNNBackwardWeights(TensorDescriptor[] xDesc, CudaDeviceVariable<double> x, TensorDescriptor hxDesc, CudaDeviceVariable<double> hx, TensorDescriptor[] yDesc, CudaDeviceVariable<double> y, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable<double> dw, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Double> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
FilterDescriptor | dwDesc | Handle to a previously initialized filter descriptor describing the gradients of the weights for the RNN. |
CudaDeviceVariable<System.Double> | dw | Data pointer to GPU memory associated with the filter descriptor dwDesc. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
RNNBackwardWeights(TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor[], CudaDeviceVariable<Single>, CudaDeviceVariable<Byte>, SizeT, FilterDescriptor, CudaDeviceVariable<Single>, CudaDeviceVariable<Byte>, SizeT)
This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.
Declaration
public void RNNBackwardWeights(TensorDescriptor[] xDesc, CudaDeviceVariable<float> x, TensorDescriptor hxDesc, CudaDeviceVariable<float> hx, TensorDescriptor[] yDesc, CudaDeviceVariable<float> y, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable<float> dw, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Single> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
FilterDescriptor | dwDesc | Handle to a previously initialized filter descriptor describing the gradients of the weights for the RNN. |
CudaDeviceVariable<System.Single> | dw | Data pointer to GPU memory associated with the filter descriptor dwDesc. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
RNNForwardInference(TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, FilterDescriptor, CudaDeviceVariable<Double>, TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.
Declaration
public void RNNForwardInference(TensorDescriptor[] xDesc, CudaDeviceVariable<double> x, TensorDescriptor hxDesc, CudaDeviceVariable<double> hx, TensorDescriptor cxDesc, CudaDeviceVariable<double> cx, FilterDescriptor wDesc, CudaDeviceVariable<double> w, TensorDescriptor[] yDesc, CudaDeviceVariable<double> y, TensorDescriptor hyDesc, CudaDeviceVariable<double> hy, TensorDescriptor cyDesc, CudaDeviceVariable<double> cy, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. The data are expected to be packed contiguously with the first element of iteration n+1 following directly from the last element of iteration n. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Double> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Double> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. The data are expected to be packed contiguously with the first element of iteration n+1 following directly from the last element of iteration n. |
TensorDescriptor | hyDesc | Handle to a previously initialized tensor descriptor describing the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hy | Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL pointer is passed, the final hidden state of the network will not be saved. |
TensorDescriptor | cyDesc | Handle to a previously initialized tensor descriptor describing the final cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | cy | Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is passed, the final cell state of the network will be not be saved. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
RNNForwardInference(TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, FilterDescriptor, CudaDeviceVariable<Single>, TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.
Declaration
public void RNNForwardInference(TensorDescriptor[] xDesc, CudaDeviceVariable<float> x, TensorDescriptor hxDesc, CudaDeviceVariable<float> hx, TensorDescriptor cxDesc, CudaDeviceVariable<float> cx, FilterDescriptor wDesc, CudaDeviceVariable<float> w, TensorDescriptor[] yDesc, CudaDeviceVariable<float> y, TensorDescriptor hyDesc, CudaDeviceVariable<float> hy, TensorDescriptor cyDesc, CudaDeviceVariable<float> cy, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. The data are expected to be packed contiguously with the first element of iteration n+1 following directly from the last element of iteration n. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Single> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Single> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. The data are expected to be packed contiguously with the first element of iteration n+1 following directly from the last element of iteration n. |
TensorDescriptor | hyDesc | Handle to a previously initialized tensor descriptor describing the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hy | Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL pointer is passed, the final hidden state of the network will not be saved. |
TensorDescriptor | cyDesc | Handle to a previously initialized tensor descriptor describing the final cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | cy | Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is passed, the final cell state of the network will be not be saved. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
RNNForwardTraining(TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, FilterDescriptor, CudaDeviceVariable<Double>, TensorDescriptor[], CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, TensorDescriptor, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>, SizeT, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.
Declaration
public void RNNForwardTraining(TensorDescriptor[] xDesc, CudaDeviceVariable<double> x, TensorDescriptor hxDesc, CudaDeviceVariable<double> hx, TensorDescriptor cxDesc, CudaDeviceVariable<double> cx, FilterDescriptor wDesc, CudaDeviceVariable<double> w, TensorDescriptor[] yDesc, CudaDeviceVariable<double> y, TensorDescriptor hyDesc, CudaDeviceVariable<double> hy, TensorDescriptor cyDesc, CudaDeviceVariable<double> cy, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Double> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Double> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
TensorDescriptor | hyDesc | Handle to a previously initialized tensor descriptor describing the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | hy | Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL pointer is passed, the final hidden state of the network will not be saved. |
TensorDescriptor | cyDesc | Handle to a previously initialized tensor descriptor describing the final cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Double> | cy | Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is passed, the final cell state of the network will be not be saved. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
RNNForwardTraining(TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, FilterDescriptor, CudaDeviceVariable<Single>, TensorDescriptor[], CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, TensorDescriptor, CudaDeviceVariable<Single>, CudaDeviceVariable<Byte>, SizeT, CudaDeviceVariable<Byte>, SizeT)
This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.
Declaration
public void RNNForwardTraining(TensorDescriptor[] xDesc, CudaDeviceVariable<float> x, TensorDescriptor hxDesc, CudaDeviceVariable<float> hx, TensorDescriptor cxDesc, CudaDeviceVariable<float> cx, FilterDescriptor wDesc, CudaDeviceVariable<float> w, TensorDescriptor[] yDesc, CudaDeviceVariable<float> y, TensorDescriptor hyDesc, CudaDeviceVariable<float> hy, TensorDescriptor cyDesc, CudaDeviceVariable<float> cy, CudaDeviceVariable<byte> workspace, SizeT workSpaceSizeInBytes, CudaDeviceVariable<byte> reserveSpace, SizeT reserveSpaceSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
TensorDescriptor[] | xDesc | An array of tensor descriptors describing the input to each recurrent iteration. Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from element n to element n+1 but may not increase. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | x | Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. |
TensorDescriptor | hxDesc | Handle to a previously initialized tensor descriptor describing the initial hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hx | Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is passed, the initial hidden state of the network will be initialized to zero. |
TensorDescriptor | cxDesc | Handle to a previously initialized tensor descriptor describing the initial cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | cx | Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is passed, the initial cell state of the network will be initialized to zero. |
FilterDescriptor | wDesc | Handle to a previously initialized filter descriptor describing the weights for the RNN. |
CudaDeviceVariable<System.Single> | w | Data pointer to GPU memory associated with the filter descriptor wDesc. |
TensorDescriptor[] | yDesc | An array of tensor descriptors describing the output from each recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc:
|
CudaDeviceVariable<System.Single> | y | Data pointer to GPU memory associated with the output tensor descriptor yDesc. |
TensorDescriptor | hyDesc | Handle to a previously initialized tensor descriptor describing the final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | hy | Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL pointer is passed, the final hidden state of the network will not be saved. |
TensorDescriptor | cyDesc | Handle to a previously initialized tensor descriptor describing the final cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed. |
CudaDeviceVariable<System.Single> | cy | Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is passed, the final cell state of the network will be not be saved. |
CudaDeviceVariable<System.Byte> | workspace | Data pointer to GPU memory to be used as a workspace for this call. |
SizeT | workSpaceSizeInBytes | Specifies the size in bytes of the provided workspace. |
CudaDeviceVariable<System.Byte> | reserveSpace | Data pointer to GPU memory to be used as a reserve space for this call. |
SizeT | reserveSpaceSizeInBytes | Specifies the size in bytes of the provided reserveSpace. |
SetPersistentRNNPlan(PersistentRNNPlan)
This function sets the persistent RNN plan to be executed when using rnnDesc and CUDNN_RNN_ALGO_PERSIST_DYNAMIC algo.
Declaration
public void SetPersistentRNNPlan(PersistentRNNPlan plan)
Parameters
Type | Name | Description |
---|---|---|
PersistentRNNPlan | plan |
SetRNNDescriptor(CudaDNNContext, Int32, Int32, DropoutDescriptor, cudnnRNNInputMode, cudnnDirectionMode, cudnnRNNMode, cudnnRNNAlgo, cudnnDataType)
This function initializes a previously created RNN descriptor object.
Declaration
public void SetRNNDescriptor(CudaDNNContext ctx, int hiddenSize, int numLayers, DropoutDescriptor dropoutDesc, cudnnRNNInputMode inputMode, cudnnDirectionMode direction, cudnnRNNMode mode, cudnnRNNAlgo algo, cudnnDataType dataType)
Parameters
Type | Name | Description |
---|---|---|
CudaDNNContext | ctx | Handle to a previously created cuDNN library descriptor. |
System.Int32 | hiddenSize | Size of the internal hidden state for each layer. |
System.Int32 | numLayers | Number of layers. |
DropoutDescriptor | dropoutDesc | Handle to a previously created and initialized dropout descriptor. |
cudnnRNNInputMode | inputMode | Specifies the behavior at the input to the first layer. |
cudnnDirectionMode | direction | Specifies the recurrence pattern. (eg. bidirectional) |
cudnnRNNMode | mode | The type of RNN to compute. |
cudnnRNNAlgo | algo | Specifies which RNN algorithm should be used to compute the results. |
cudnnDataType | dataType | Math precision. |