IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo module

pad_gpu

Implements GPU-specific tensor padding kernels with constant or 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.
  • ​padded_copy_kernel: Copies rows from input_tensor into the unpadded region of output_tensor using a cooperatively vectorized, coalesced row copy.