Example #1
0
 /// <summary>
 ///
 /// </summary>
 public void SetRNNDataDescriptor(cudnnDataType dataType,
                                  cudnnRNNDataLayout layout, int maxSeqLength, int batchSize,
                                  int vectorSize,
                                  int[] seqLengthArray, /* length of each sequence in the batch */
                                  IntPtr paddingFill)
 {
     res = CudaDNNNativeMethods.cudnnSetRNNDataDescriptor(_desc, dataType,
                                                          layout, maxSeqLength, batchSize, vectorSize, seqLengthArray, paddingFill);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetRNNDataDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 public void GetRNNDataDescriptor(ref cudnnDataType dataType,
                                  ref cudnnRNNDataLayout layout, ref int maxSeqLength, ref int batchSize,
                                  ref int vectorSize, int arrayLengthRequested, int[] seqLengthArray,
                                  IntPtr paddingFill)
 {
     res = CudaDNNNativeMethods.cudnnGetRNNDataDescriptor(_desc, ref dataType,
                                                          ref layout, ref maxSeqLength, ref batchSize,
                                                          ref vectorSize, arrayLengthRequested, seqLengthArray,
                                                          paddingFill);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetRNNDataDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }