torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

[DUPLICATE] Add onnx GridSample support for border padding mode

Open Ax9D opened this issue 9 months ago • 4 comments

Duplicate of #3819, rebasing on latest changes

Adds support for padding_mode="border"

Clamps the grid coordinates between 0 and size - 1 like this when using this padding mode:

x_result = min(max(0, x), W - 1) y_result = min(max(0, y), H - 1) Added Lit tests for both TorchToLinalg and OnnxToTorch lowerings

Ax9D avatar May 18 '25 16:05 Ax9D

@Ax9D Please fix the CI failures.

vivekkhandelwal1 avatar Jun 30 '25 05:06 vivekkhandelwal1

The new failures on nightly seems unrelated

Ax9D avatar Jul 02 '25 11:07 Ax9D

The new failures on nightly seems unrelated

Yeah, they were because of a PyTorch version upgrade. Should be fixed now.

vivekkhandelwal1 avatar Jul 15 '25 16:07 vivekkhandelwal1

Is there anything else pending for this?

Ax9D avatar Aug 25 '25 17:08 Ax9D