This document is relevant for: Inf2, Trn1, Trn1n

nki.kernels.resize_nearest_fixed_dma_kernel#

nki.kernels.resize_nearest_fixed_dma_kernel(data_tensor, out_tensor)[source]#

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

This document is relevant for: Inf2, Trn1, Trn1n