Skip to content

Commit 908d1fe

Browse files
committed
Removing the misc and removing the grid_sampler.3d cases
1 parent b298710 commit 908d1fe

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,8 @@ def aten_ops_fmod(
330330
return impl.elementwise.fmod(ctx, target, SourceIR.ATEN, name, args[0], args[1])
331331

332332

333-
@dynamo_tensorrt_converter(torch.ops.aten.grid_sampler) # type: ignore[misc]
334-
@dynamo_tensorrt_converter(torch.ops.aten.grid_sampler_2d) # type: ignore[misc]
335-
# commented this for now, see py/dynamo/conversion/tests/test_grid_aten. Should this be removed altogether?
336-
# @dynamo_tensorrt_converter(torch.ops.aten.grid_sampler_3d) # type: ignore[misc]
333+
@dynamo_tensorrt_converter(torch.ops.aten.grid_sampler)
334+
@dynamo_tensorrt_converter(torch.ops.aten.grid_sampler_2d)
337335
@enforce_tensor_types(
338336
{
339337
0: (TRTTensor,),

tests/py/dynamo/conversion/test_grid_aten.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,6 @@
115115
[1, 1, 5, 5],
116116
[1, 5, 2, 2],
117117
),
118-
# The 3d cases with 4d input gives the error that it requires 5d input for both input and grid
119-
# The 5d input fails in the generation of the Grid Layer since the TensorRT layer requires 4d input
120-
# ("input_grid_interpolation_nearest_sample_fill_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 0, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
121-
# ("input_grid_interpolation_nearest_sample_clamp_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 1, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
122-
# ("input_grid_interpolation_nearest_sample_reflect_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 2, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
123-
# ("input_grid_interpolation_linear_sample_fill_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 0, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
124-
# ("input_grid_interpolation_linear_sample_clamp_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 1, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
125-
# ("input_grid_interpolation_linear_sample_reflect_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 2, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
126-
# ("input_grid_interpolation_cubic_sample_fill_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 0, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
127-
# ("input_grid_interpolation_cubic_sample_clamp_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 1, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
128-
# ("input_grid_interpolation_cubic_sample_reflect_3d", (lambda x, grid: torch.ops.aten.grid_sampler_3d(x, grid, 0, 2, True)), [1, 1, 5, 5, 5], [1, 5, 5, 2, 2]),
129118
]
130119

131120

0 commit comments

Comments
 (0)