Hi,
No cudnn does not provide such functions.
But unfold and fold are mostly playing with size and stride, not doing anything. on the GPU really so you don’t need cuda kernels for them right?
Then you only need a matmul which is already implemented.
Does something like this works for you?
inp = torch.randn(1, 3, 10, 12)
w = torch.randn(2, 3, 4, 5)

inp_unf = torch.nn.functional.unfold(inp, (4, 5))
out_unf = inp_unf.transpose(1, 2).matmul(w.view(w.size(0), -1).t()).transpose(1, 2)
out = torch.nn.functional.fold(out_unf, (7, 8), (1, 1))