@triton.jit
def triton_swiglu_backward(grad_output_ptr, input_a_ptr, input_b_ptr,
    row_stride, num_columns: tl.constexpr, BLOCK_SIZE: tl.constexpr):
    prog_id = tl.program_id(0).to(tl.int64)
    grad_output_ptr += prog_id * row_stride
    input_a_ptr += prog_id * row_stride
    input_b_ptr += prog_id * row_stride
    column_offsets = tl.arange(0, BLOCK_SIZE)
    active_mask = column_offsets < num_columns
    grad_output_row = tl.load(grad_output_ptr + column_offsets, mask=
        active_mask, other=0)
    input_a_row = tl.load(input_a_ptr + column_offsets, mask=active_mask,
        other=0).to(tl.float32)
    input_b_row = tl.load(input_b_ptr + column_offsets, mask=active_mask,
        other=0)
    sigmoid_a = tl.sigmoid(input_a_row)
    silu_a = input_a_row * sigmoid_a
    grad_b_row = grad_output_row * silu_a
    grad_a_row = grad_output_row * (silu_a * (1 - sigmoid_a) + sigmoid_a
        ) * input_b_row
    tl.store(input_a_ptr + column_offsets, grad_a_row, mask=active_mask)
    tl.store(input_b_ptr + column_offsets, grad_b_row, mask=active_mask)
