nki_samples.reference.vision.resize_nearest_fixed_dma_kernel

nki_samples.reference.vision.resize_nearest_fixed_dma_kernel = <neuronxcc.nki.compile.GenericKernel object>

Resize the input image to the given size using the nearest interpolation mode. This kernel is designed to be used when the scaling factor is not an integer.

Example

  • Input height : 30, Input width : 20

  • Output height : 59, Output width : 38

IO tensor layouts:
  • data_tensor: shape (in_b, in_h, in_w, in_c)

  • out_tensor: shape (out_b, out_h, out_w, out_c)

  • b : batch, c : channel, h : height, w : width

  • This kernel requires in_b == out_b as input batch and output batch must be identical

  • This kernel requires in_c == out_c as input channel and output channel must be identical