Skip to main content

dispatch_log_backward_f32

Function dispatch_log_backward_f32 

Source
pub fn dispatch_log_backward_f32(
    encoder: &mut CommandEncoder,
    registry: &mut KernelRegistry,
    device: &DeviceRef,
    x: &MlxBuffer,
    dy: &MlxBuffer,
    dx: &MlxBuffer,
) -> Result<()>
Expand description

Encode dx[i] = dy[i] / x[i] (the backward pass for elementwise log). x is the FORWARD INPUT, not the forward output.