xnn.cnn.fast.conv#

3D convolutions on cuDNN’s channels-last kernels, with its algorithm search.

For the 3D grids of the voxel models cuDNN’s kernels for the channels-last memory format are several times faster than those for the default one, and for the double backward of force training its timed algorithm search (torch.backends.cudnn.benchmark) beats its heuristic choice. Both settings must reach the backward passes, which run outside any forward context, so conv3d() evaluates the convolution as a multilinear block whose value and adjoints run cuDNN on channels-last copies of their operands (the outputs and input gradients stay channels-last, as the next convolution takes them), in batch chunks that bound the kernels’ workspace, with the search on: the same convolution and the same derivatives (to the round-off of the chosen algorithms), keeping only the input and the kernel for the backward pass, as autograd does. The search runs once per input shape and is cached by cuDNN for the process.

Module Attributes

SEARCH

Whether the convolutions use cuDNN's timed algorithm search (in addition to the channels-last kernels).

CHUNK_ELEMENTS

Output elements per cuDNN call.

Functions

conv3d(x, weight[, bias, stride, padding, ...])

torch.nn.functional.conv3d on cuDNN's channels-last kernels, twice differentiable.

supported(device, dtype)

Whether the searched convolutions run: a CUDA device with cuDNN, float32 or float64.