C/C++ code of F.interpolate

Hi,

I need to convert F.interpolate to C or C++ code. I notice that F.interpolate calls torch._C._nn.upsample_bicubic2d.

May I access torch._C._nn.upsample_bicubic2d C/C++ code? or is there any way to help to convert it C/C++ code?

You can find the host code here and the GPU code here.

@ptrblck
Thank you!

The bilinear interpolation should be in:
cpu_upsample_linear_backward function in pytorch/aten/src/ATen/native/cpu/UpSampleMoreKernel.cpp file

Dear @ptrblck ,

I would like to run interpolate or resize in a single core MCU. So, there is no mutil-process/thread.
I only need the very simple C or Cpp (prefer C) code of interpolate or resize.

if the code has only bi-linear interpolate or resize, it is good enough. The only purpose is to run the C code of interpolate in a single core MCU, and the output is same as the interpolate or resize in pytorch or opencv.

where could I find the C code?

you’ll have to refactor the code that was pointed out and write a version for yourself. such code isn’t readily available.