From b9fbd65dfd5e703bacbc6c25258d1215108b4faf Mon Sep 17 00:00:00 2001 From: Benjamin Glass Date: Fri, 3 Jan 2025 01:12:58 +0000 Subject: [PATCH] AOTI fallback ops: remove ops that were never codegen'ed (#143421) Removes 4 fallback ops that are currently not possible to codegen, which does not break ABI-compatibility. 1. `_cudnn_rnn_backward` and `_histogramdd_bin_edges` both return `Tensor[]`, which we cannot codegen with the current design. 2. `_sparse_coo_tensor_with_dims_and_tensors` only supplies a Sparse operator, which we don't support. 3. `zeros.names` requires a `Dimname` input, which we can't currently codegen. Removing these ops from the list will improve test performance, since the fallback op generation will use the Python proxy executor instead of calling non-existent C functions. Pull Request resolved: https://github.com/pytorch/pytorch/pull/143421 Approved by: https://github.com/desertfire ghstack dependencies: #141371, #143223 --- torchgen/aoti/fallback_ops.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/torchgen/aoti/fallback_ops.py b/torchgen/aoti/fallback_ops.py index b9cf120255569..c44129223d731 100644 --- a/torchgen/aoti/fallback_ops.py +++ b/torchgen/aoti/fallback_ops.py @@ -39,7 +39,6 @@ "aten.cholesky_solve.default", "aten.convolution_backward.default", "aten._cudnn_rnn.default", - "aten._cudnn_rnn_backward.default", "aten.convolution.default", "aten.cummax.default", "aten.cummin.default", @@ -70,7 +69,6 @@ "aten.grid_sampler_2d_backward.default", "aten.histc.default", "aten.histogram.bin_ct", - "aten._histogramdd_bin_edges.default", "aten._histogramdd_from_bin_cts.default", "aten.index_put.default", "aten.index_reduce.default", @@ -139,7 +137,6 @@ "aten.soft_margin_loss_backward.default", "aten.sort.default", "aten.sort.stable", - "aten._sparse_coo_tensor_with_dims_and_tensors.default", "aten._thnn_fused_lstm_cell.default", "aten.topk.default", "aten._to_sparse.default", @@ -154,5 +151,4 @@ "aten.view_as_real.default", "aten.view.dtype", "aten._weight_int8pack_mm.default", - "aten.zeros.names", }