IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo module

pad_gpu

Implements GPU-specific tensor padding kernels with constant, reflect, and repeat (edge-fill) strategies.

Functions​

  • ​get_padding_output_shape: Computes the output shape produced by padding input_shape with the before/after amounts given in paddings.
  • ​pad_constant: Fill output with values from input, and edges padded with constant based on paddings.
  • ​pad_reflect: Fill output with values from input, and edges padded with reflected values from the unpadded region.
  • ​pad_repeat: Fill output with values from input, and edges padded with the boundary values from the unpadded region.
  • ​padded_copy_kernel:
  • ​padded_index_mode_kernel: GPU kernel shared by the reflect and edge (repeat) pad modes.

Was this page helpful?