xlnstorch.csrc.conv1d_backward

xlnstorch.csrc.conv1d_backward#

xlnstorch.csrc.conv1d_backward(grad, x, weight, base, bias_defined, stride, padding, dilation, groups)#

Perform the backward pass for LNS 1D convolution.

Parameters:
  • grad (torch.Tensor) – The gradient tensor in LNS format (torch.int64).

  • x (torch.Tensor) – The input tensor in LNS format (torch.int64).

  • weight (torch.Tensor) – The convolution kernel in LNS format (torch.int64).

  • base (torch.Tensor) – The base for the LNS representation.

  • bias_defined (bool) – Whether the bias tensor is defined.

  • stride (int) – The stride of the convolution.

  • padding (int) – The padding applied to the input tensor.

  • dilation (int) – The dilation factor for the convolution.

  • groups (int) – The number of groups for the convolution.

Returns:

The output gradient tensor in LNS format (torch.int64).

Return type:

torch.Tensor