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:
- input (
TileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type]): The input to be resized, on the device. - output (
TileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type]): The output containing the resized input, on the device. - ctx (
DeviceContext): The device context used to launch the kernels.