Skip to main content

conv1d_backward_dx

Function conv1d_backward_dx 

Source
pub fn conv1d_backward_dx<T: Triton, D: Num, const KL: i32, const STRIDE: i32, const PAD: i32, const BLOCK_OL: i32>(
    dy_ptr: T::Pointer<D>,
    w_ptr: T::Pointer<D>,
    dx_ptr: T::Pointer<D>,
    _B: i32,
    C_IN: i32,
    C_OUT: i32,
    L: i32,
    OL: i32,
)
where T::I32Tensor: Tensor<i32, 1> + Comparison<i32, BoolTensor = T::BoolTensor>, T::BoolTensor: BitAnd<Output = T::BoolTensor>, T::Pointer<D>: AddOffsets<i32, 1, T::I32Tensor, Output = T::Tensor<T::Pointer<D>>>,
Expand description

1-D convolution backward pass — gradient with respect to input (dx).

Grid: pid = (b * C_OUT + c_out) * num_ol_tiles + ol_tile

Scatters gradient back via atomic_add to handle overlapping receptive fields. Padding positions (those that correspond to out-of-bounds input locations) are skipped.