I think .unfold would work in this case.
Have a look at this code:
x = torch.randn(1, 500, 500, 500)  # batch, c, h, w
kc, kh, kw = 64, 64, 64  # kernel size
dc, dh, dw = 64, 64, 64  # stride
patches = x.unfold(1, kc, dc).unfold(2, kh, dh).unfold(3, kw, dw)
patches = patches.contiguous().view(patches.size(0), -1, kc, kh, kw)
print(patches.shape)
> torch.Size([1, 343, 64, 64, 64])

As you can see patches will give you 7*7*7=343 patches each of shape [64, 64, 64].
If you would like to overlap the patches, you should change the stride for each dimension.
Let me know, if that works for you.