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
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
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.
then what’s the meaning of the state. It seems there is no state in python interface.
yes, i understand that. So how about the state?
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.
Maybe i need to implement a cpp extension for that.
That sounds like a good way, in particular given that the code is all there.