Skip to main content

Module pad

Module pad 

Source
Expand description

Vulkan dispatch wrappers for padding forward/backward.

Functions§

pad_backward
PadBackward — 1 input (grad_out) + 1 output (grad_in). Reads geometry from OpParams::PadBackward. Currently handles mode_tag == 0 (constant) only; reflect/replicate need atomic float add (not yet wired) and fall through to CPU.
pad_const
Pad — 1 input + 1 output. Reads geometry from OpParams::Pad. mode_tag == 0 (constant) is the only mode this dispatch shim handles; other modes fall through to CPU. Byte width is taken from the OUTPUT dtype’s size.