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 function

resize_linear_gpu

def resize_linear_gpu[coordinate_transformation_mode: CoordinateTransformationMode, antialias: Bool, dtype: DType](input: TileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type], output: TileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type], ctx: DeviceContext)

Resizes input to output shape using linear interpolation on the GPU.

Interpolation is separable, so this runs one pass per resized axis, the same as resize_linear, with each pass writing into a scratch buffer until the last, which writes the output.

Parameters:

  • ​coordinate_transformation_mode (CoordinateTransformationMode): How to map a coordinate in output to a coordinate in input.
  • ​antialias (Bool): Whether to stretch the linear filter by 1 / scale when downsampling, which reads more input points to avoid aliasing.
  • ​dtype (DType): Type of input and output.

Args:

Was this page helpful?