Skip to content

Fix GridSample always using nearest mode on opset 20+ - #1060

Open
mertalev wants to merge 1 commit into
onnx:mainfrom
mertalev:fix/gridsample-mode-naming
Open

Fix GridSample always using nearest mode on opset 20+#1060
mertalev wants to merge 1 commit into
onnx:mainfrom
mertalev:fix/gridsample-mode-naming

Conversation

@mertalev

Copy link
Copy Markdown

Description

GridSample 20 renamed bilinear and bicubic to linear and cubic, respectively. This meant the checks for bilinear and bicubic don't match and it silently falls back to nearest. Reproduced with both TensorRT 11.1 and TensorRT-RTX 1.5.

This PR makes it accept both strings and aborts when it encounters an unknown string instead of using the wrong mode.

Fixes NVIDIA/TensorRT#4646

@mertalev
mertalev force-pushed the fix/gridsample-mode-naming branch from 6fb9f33 to 4538c13 Compare July 11, 2026 02:00
Signed-off-by: Mert Alev <101130780+mertalev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GridSample outputs incorrect results in ONNX opset 20 (opset 18 works correctly)

1 participant