Types
ConvAlgoSpace[T; Algo] = object algo*: Algo workspace*: ref [ptr T] sizeInBytes*: csize_t
- Source Edit
ConvConfig[N] = object pad*: array[N, cint] strides*: array[N, cint] dilation*: array[N, cint]
- Source Edit
Procs
proc conv_bwd_data_algo_workspace[T: SomeFloat]( srcTensorDesc: cudnnTensorDescriptor_t; gradOutputTensorDesc: cudnnTensorDescriptor_t; kernelDesc: cudnnFilterDescriptor_t; convDesc: cudnnConvolutionDescriptor_t; gradInputTensorDesc: cudnnTensorDescriptor_t): ConvAlgoSpace[T, cudnnConvolutionBwdDataAlgo_t] {.noinit.}
- Source Edit
proc conv_bwd_kernel_algo_workspace[T: SomeFloat]( srcTensorDesc: cudnnTensorDescriptor_t; gradOutputTensorDesc: cudnnTensorDescriptor_t; gradKernelDesc: cudnnFilterDescriptor_t; convDesc: cudnnConvolutionDescriptor_t): ConvAlgoSpace[T, cudnnConvolutionBwdFilterAlgo_t] {.noinit.}
- Source Edit
proc convOutDims(input, kernel: CudaTensor; padding, strides, dilation: SizeHW): Metadata {. inline, noinit.}
- Each dimension of the (nbDims-2)-D images of the output tensor is computed as followed: outputDim = 1 + ( inputDim + 2pad - (((filterDim-1)upscaleA)+1) )/ convolutionStride; Source Edit
proc newConv2dDesc[T: SomeFloat](padding, strides, dilation: SizeHW): cudnnConvolutionDescriptor_t {. noinit, inline.}
- Source Edit
proc newConvAlgoSpace[T: SomeFloat](srcTensorDesc: cudnnTensorDescriptor_t; kernelDesc: cudnnFilterDescriptor_t; convDesc: cudnnConvolutionDescriptor_t; dstTensorDesc: cudnnTensorDescriptor_t): ConvAlgoSpace[ T, cudnnConvolutionFwdAlgo_t] {.noinit.}
- Source Edit
proc newCudnnConvKernelDesc[T: SomeFloat](convKernel: CudaTensor[T]): cudnnFilterDescriptor_t {. inline, noinit.}
- Source Edit