pytorch/torch/csrc/api
inventshah bf28d1cafc Expose bicubic mode for torch::nn::functional::grid_sample in LibTorch (#150817)
When bicubic interpolation was added to grid_sampler in #44780, `GridSampleFuncOptions` was not updated to allow a user to use bicubic mode in LibTorch, even though the function could handle it. This PR fixes the parity such that LibTorch's  `torch::nn::functional::grid_sample` behaves the same as PyTorch's `torch.nn.functional.grid_sample`.

Existing users can directly use `torch::grid_sampler` but must know what int to pass for the interpolation (2 for bicubic) and padding mode parameters, which is not ideal.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150817
Approved by: https://github.com/Skylion007
2025-04-21 08:55:27 +00:00
..
include/torch Expose bicubic mode for torch::nn::functional::grid_sample in LibTorch (#150817) 2025-04-21 08:55:27 +00:00
src Revert "Fix the Problems About Defining Static Variable in Inline Function (#147095)" 2025-04-08 17:10:36 +00:00