Hi,
i want to use the functions in torch._C._thcunn. Is there any docs for that?
what’s the meaning of the parameters?
i find the C code for CudaSpatialFullDilatedConvolution_updateGradInput
void THNN_(SpatialFullDilatedConvolution_updateOutput)(
THCState *state,
THCTensor *input,
THCTensor *output,
THCTensor *weight,
THCTensor *bias,
THCTensor *columns,
THCTensor *ones,
int kW, int kH,
int dW, int dH,
int padW, int padH,
int dilationW, int dilationH,
int adjW, int adjH)```
but i don't know the meaning of the ```ones```?
a) Don’t do that. The torch.nn.functional interface is the supported way to use that.
b) Ones and columns are buffers (see aten/src/ATen/nn.yaml), likely for storing information for the backward, they are used to store the columns after im2col and have a buffer of ones to pass into multiplication functions at the right time.
That’s where legacy coda (THC/THCUNN) keeps the information it needs on the GPUs, the RNG state, allocators etc. This used to be passed to every function. Nowadays ATen usually handles most in the background and there are some GlobalContext functions to get the current device, stream etc.