Ejemplo n.º 1
0
 /* Tensor Bias addition : srcDest = alpha * bias + beta * srcDestDesc  */
 public void AddTensor(cudnnAddMode mode,
                       double alpha,
                       TensorDescriptor biasDesc,
                       CudaDeviceVariable <double> biasData,
                       double beta,
                       TensorDescriptor srcDestDesc,
                       CudaDeviceVariable <double> srcDestData
                       )
 {
     res = CudaDNNNativeMethods.cudnnAddTensor(_handle, mode, ref alpha, biasDesc.Desc, biasData.DevicePointer, ref beta, srcDestDesc.Desc, srcDestData.DevicePointer);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnAddTensor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
Ejemplo n.º 2
0
        /* Tensor Bias addition : srcDest = alpha * bias + beta * srcDestDesc  */
        public void AddTensor(cudnnAddMode mode,
									double alpha,
									TensorDescriptor biasDesc,
									CudaDeviceVariable<double> biasData,
									double beta,
									TensorDescriptor srcDestDesc,
									CudaDeviceVariable<double> srcDestData
									)
        {
            res = CudaDNNNativeMethods.cudnnAddTensor(_handle, mode, ref alpha, biasDesc.Desc, biasData.DevicePointer, ref beta, srcDestDesc.Desc, srcDestData.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnAddTensor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
Ejemplo n.º 3
0
		public static extern cudnnStatus cudnnAddTensor(   cudnnHandle                    handle,
													cudnnAddMode                   mode,
													ref double alpha,
													cudnnTensorDescriptor    biasDesc,
													CUdeviceptr biasData,
													ref double beta,
													cudnnTensorDescriptor          srcDestDesc,
													CUdeviceptr srcDestData
												  );