Library/ManagedCuda/CudaDNN/CudaDNNContext.cs
/// <summary>
/// Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
/// </summary>
/// <param name="reduceTensorDesc"></param>
/// <param name="aDesc"></param>
/// <param name="cDesc"></param>
Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
public SizeT GetReductionWorkspaceSize(
                                ReduceTensorDescriptor reduceTensorDesc,
                                TensorDescriptor aDesc,
                                TensorDescriptor cDesc)
        {
            SizeT sizeInBytes = new SizeT();
            res = CudaDNNNativeMethods.cudnnGetReductionWorkspaceSize(_handle, reduceTensorDesc.Desc, aDesc.Desc, cDesc.Desc, ref sizeInBytes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetReductionWorkspaceSize", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
            return sizeInBytes;
        }
public SizeT GetReductionWorkspaceSize ( ReduceTensorDescriptor reduceTensorDesc , TensorDescriptor aDesc , TensorDescriptor cDesc ) { SizeT sizeInBytes = new SizeT ( ) ; res = CudaDNNNativeMethods . cudnnGetReductionWorkspaceSize ( _handle , reduceTensorDesc . Desc , aDesc . Desc , cDesc . Desc , ref sizeInBytes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; return sizeInBytes ; }
Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
reduceTensorDesc
ReduceTensorDescriptor
None
aDesc
TensorDescriptor
None
cDesc
TensorDescriptor
None