lib/torch/native/native_functions.yaml in torch-rb-0.1.8 vs lib/torch/native/native_functions.yaml in torch-rb-0.2.0
- old
+ new
@@ -37,28 +37,34 @@
use_c10_dispatcher: full
variants: function
# Computes the gradient of current tensor w.r.t. graph leaves.
- func: backward(Tensor self, Tensor? gradient=None, bool keep_graph=False, bool create_graph=False) -> ()
+ manual_kernel_registration: True
variants: method
# DEPRECATED. Sets the tensor data held by this `Variable` to be the same as
# `new_data`. It requires that `new_data` and `Variable` have compatible tensor
# type, by checking `_has_compatible_shallow_copy_type(this, new_data)`.
#
# This function is deprecated because it doesn't really make sense in a world
# where Variables *are* Tensors (as opposed to them containing tensors, which
# is what the previous interpretation was.)
- func: set_data(Tensor(a!) self, Tensor new_data) -> ()
- use_c10_dispatcher: unboxed_only
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
variants: method
- func: data(Tensor self) -> Tensor
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
variants: method
# True if this `Variable` is a leaf and thus does not have a `grad_fn`.
- func: is_leaf(Tensor self) -> bool
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
variants: method
# Returns the output index of this variable from the forward operation that
# produced it. Conversely, it returns the input index of the gradient `Node` to
# which this `Variable` is connected (because in the gradient computation,
@@ -68,19 +74,30 @@
# assert y0.output_nr == 0
# assert y1.output_nr == 1
# assert y2.output_nr == 2
#
- func: output_nr(Tensor self) -> int
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
variants: method
supports_named_tensor: True
- func: _version(Tensor self) -> int
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
variants: method
- func: requires_grad_(Tensor(a!) self, bool _requires_grad=True) -> Tensor(a!)
+ manual_kernel_registration: True
variants: method
+# Enables .grad attribute for non-leaf Tensors.
+- func: retain_grad(Tensor(a!) self) -> ()
+ use_c10_dispatcher: full
+ manual_kernel_registration: True
+ variants: method
+
- func: rename_(Tensor(a!) self, Dimname[]? names) -> Tensor(a!)
variants: method
supports_named_tensor: True
- func: rename(Tensor(a) self, Dimname[]? names) -> Tensor(a)
@@ -121,10 +138,13 @@
- func: _cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor)
dispatch:
CUDA: _cudnn_ctc_loss
+- func: _use_cudnn_rnn_flatten_weight() -> bool
+ use_c10_dispatcher: full
+
- func: _cudnn_rnn_flatten_weight(Tensor[] weight_arr, int weight_stride0, int input_size, int mode, int hidden_size, int num_layers, bool batch_first, bool bidirectional) -> Tensor
dispatch:
CUDA: _cudnn_rnn_flatten_weight
- func: _cudnn_rnn(Tensor input, Tensor[] weight, int weight_stride0, Tensor? weight_buf, Tensor hx, Tensor? cx, int mode, int hidden_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, int[] batch_sizes, Tensor? dropout_state) -> (Tensor, Tensor, Tensor, Tensor, Tensor)
@@ -207,52 +227,34 @@
- func: abs.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
- func: angle(Tensor self) -> Tensor
+ use_c10_dispatcher: full
variants: function, method
supports_named_tensor: True
- named_guard: False
- func: angle.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
- named_guard: False
supports_named_tensor: True
- dispatch:
- CPU: _angle_out_cpu
- func: real(Tensor self) -> Tensor
- variants: function, method
- named_guard: False
+ use_c10_dispatcher: full
+ variants: function
supports_named_tensor: True
-- func: real.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
- named_guard: False
- supports_named_tensor: True
- dispatch:
- CPU: _real_out_cpu
-
- func: imag(Tensor self) -> Tensor
- variants: function, method
- named_guard: False
+ use_c10_dispatcher: full
+ variants: function
supports_named_tensor: True
-- func: imag.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
- named_guard: False
- supports_named_tensor: True
- dispatch:
- CPU: _imag_out_cpu
-
- func: conj(Tensor self) -> Tensor
+ use_c10_dispatcher: full
variants: function, method
- named_guard: False
supports_named_tensor: True
- func: conj.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
- named_guard: False
supports_named_tensor: True
- dispatch:
- CPU: _conj_out_cpu
- func: acos(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
@@ -393,16 +395,20 @@
# (so that it can be traced directly).
- func: _dim_arange(Tensor like, int dim) -> Tensor
use_c10_dispatcher: full
- func: argmax(Tensor self, int? dim=None, bool keepdim=False) -> Tensor
- use_c10_dispatcher: full
variants: function, method
+ dispatch:
+ CPU: argmax
+ CUDA: argmax
- func: argmin(Tensor self, int? dim=None, bool keepdim=False) -> Tensor
- use_c10_dispatcher: full
variants: function, method
+ dispatch:
+ CPU: argmin
+ CUDA: argmin
- func: as_strided(Tensor(a) self, int[] size, int[] stride, int? storage_offset=None) -> Tensor(a)
variants: function, method
dispatch:
CPU: as_strided_tensorimpl
@@ -471,10 +477,15 @@
- func: bartlett_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, bool cudnn_enabled) -> Tensor
+- func: quantized_batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor var, float eps, float output_scale, int output_zero_point) -> Tensor
+ requires_tensor: True
+ dispatch:
+ QuantizedCPU: quantized_batch_norm
+
- func: _batch_norm_impl_index(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, bool cudnn_enabled) -> (Tensor, Tensor, Tensor, Tensor, int)
- func: _batch_norm_impl_index_backward(int impl_index, Tensor input, Tensor grad_output, Tensor? weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var_transform, bool train, float eps, bool[3] output_mask, Tensor reservedSpace) -> (Tensor, Tensor, Tensor)
# Sample bernoulli with values in `self` as probability.
@@ -506,10 +517,38 @@
- func: bernoulli.p(Tensor self, float p, *, Generator? generator=None) -> Tensor
variants: function, method
- func: bilinear(Tensor input1, Tensor input2, Tensor weight, Tensor? bias) -> Tensor
+- func: binary_cross_entropy(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor
+ python_module: nn
+ variants: function
+ dispatch:
+ CPU: binary_cross_entropy_cpu
+ CUDA: binary_cross_entropy_cuda
+
+- func: binary_cross_entropy.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!)
+ python_module: nn
+ variants: function
+ dispatch:
+ CPU: binary_cross_entropy_out_cpu
+ CUDA: binary_cross_entropy_out_cuda
+
+- func: binary_cross_entropy_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor
+ python_module: nn
+ variants: function
+ dispatch:
+ CPU: binary_cross_entropy_backward_cpu
+ CUDA: binary_cross_entropy_backward_cuda
+
+- func: binary_cross_entropy_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) grad_input) -> Tensor(a!)
+ python_module: nn
+ variants: function
+ dispatch:
+ CPU: binary_cross_entropy_backward_out_cpu
+ CUDA: binary_cross_entropy_backward_out_cuda
+
- func: binary_cross_entropy_with_logits(Tensor self, Tensor target, Tensor? weight=None, Tensor? pos_weight=None, int reduction=Mean) -> Tensor
variants: function
- func: binary_cross_entropy_with_logits_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, Tensor? pos_weight=None, int reduction=Mean) -> Tensor
variants: function
@@ -561,10 +600,38 @@
dispatch:
CPU: logical_xor_out
CUDA: logical_xor_out
supports_named_tensor: True
+- func: logical_and(Tensor self, Tensor other) -> Tensor
+ variants: function, method
+ supports_named_tensor: True
+
+- func: logical_and_(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+ supports_named_tensor: True
+
+- func: logical_and.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ dispatch:
+ CPU: logical_and_out
+ CUDA: logical_and_out
+ supports_named_tensor: True
+
+- func: logical_or(Tensor self, Tensor other) -> Tensor
+ variants: function, method
+ supports_named_tensor: True
+
+- func: logical_or_(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+ supports_named_tensor: True
+
+- func: logical_or.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ dispatch:
+ CPU: logical_or_out
+ CUDA: logical_or_out
+ supports_named_tensor: True
+
- func: blackman_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: blackman_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: bmm(Tensor self, Tensor mat2) -> Tensor
@@ -622,10 +689,14 @@
- func: clamp(Tensor self, Scalar? min=None, Scalar? max=None) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
+ dispatch:
+ CPU: clamp
+ CUDA: clamp
+ QuantizedCPU: quantized_clamp
- func: clamp_(Tensor(a!) self, Scalar? min=None, Scalar? max=None) -> Tensor(a!)
supports_named_tensor: True
variants: function, method
dispatch:
@@ -714,10 +785,11 @@
- func: conv_transpose2d.input(Tensor input, Tensor weight, Tensor? bias=None, int[2] stride=1, int[2] padding=0, int[2] output_padding=0, int groups=1, int[2] dilation=1) -> Tensor
- func: conv_transpose3d.input(Tensor input, Tensor weight, Tensor? bias=None, int[3] stride=1, int[3] padding=0, int[3] output_padding=0, int groups=1, int[3] dilation=1) -> Tensor
- func: copy_(Tensor(a!) self, Tensor src, bool non_blocking=False) -> Tensor(a!)
+ manual_kernel_registration: True
variants: method
device_guard: False
supports_named_tensor: True
- func: _copy_from(Tensor self, Tensor dst, bool non_blocking=False) -> Tensor
@@ -781,46 +853,44 @@
# NB: You can only use this if you used cudnn_batch_norm training=True
- func: cudnn_batch_norm_backward(Tensor input, Tensor grad_output, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, float epsilon, Tensor reserveSpace) -> (Tensor, Tensor, Tensor)
dispatch:
CUDA: cudnn_batch_norm_backward
-- func: cudnn_convolution(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
+- func: cudnn_convolution.deprecated(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
dispatch:
+ CUDA: cudnn_convolution_deprecated
+
+- func: cudnn_convolution(Tensor self, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
+ dispatch:
CUDA: cudnn_convolution
- func: cudnn_convolution_backward_input(int[] self_size, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
dispatch:
CUDA: cudnn_convolution_backward_input
-- func: cudnn_convolution_backward(Tensor self, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic, bool[3] output_mask) -> (Tensor, Tensor, Tensor)
+- func: cudnn_convolution_backward(Tensor self, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic, bool[2] output_mask) -> (Tensor, Tensor)
dispatch:
CUDA: cudnn_convolution_backward
-- func: cudnn_convolution_backward_bias(Tensor grad_output) -> Tensor
- use_c10_dispatcher: full
- dispatch:
- CUDA: cudnn_convolution_backward_bias
-
- func: cudnn_convolution_backward_weight(int[] weight_size, Tensor grad_output, Tensor self, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
dispatch:
CUDA: cudnn_convolution_backward_weight
-- func: cudnn_convolution_transpose(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
+- func: cudnn_convolution_transpose.deprecated(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
dispatch:
+ CUDA: cudnn_convolution_transpose_deprecated
+
+- func: cudnn_convolution_transpose(Tensor self, Tensor weight, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
+ dispatch:
CUDA: cudnn_convolution_transpose
# NB: output_padding not strictly needed here, but it's helpful for the float
# backwards
-- func: cudnn_convolution_transpose_backward(Tensor self, Tensor grad_output, Tensor weight, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic, bool[3] output_mask) -> (Tensor, Tensor, Tensor)
+- func: cudnn_convolution_transpose_backward(Tensor self, Tensor grad_output, Tensor weight, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic, bool[2] output_mask) -> (Tensor, Tensor)
dispatch:
CUDA: cudnn_convolution_transpose_backward
-- func: cudnn_convolution_transpose_backward_bias(Tensor grad_output) -> Tensor
- use_c10_dispatcher: full
- dispatch:
- CUDA: cudnn_convolution_backward_bias
-
- func: cudnn_convolution_transpose_backward_input(Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
dispatch:
CUDA: cudnn_convolution_transpose_backward_input
- func: cudnn_convolution_transpose_backward_weight(int[] weight_size, Tensor grad_output, Tensor self, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor
@@ -835,24 +905,50 @@
- func: cudnn_grid_sampler_backward(Tensor self, Tensor grid, Tensor grad_output) -> (Tensor grad_self, Tensor grad_grid)
dispatch:
CUDA: cudnn_grid_sampler_backward
-- func: cumsum(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor
+- func: cummax(Tensor self, int dim) -> (Tensor values, Tensor indices)
supports_named_tensor: True
variants: function, method
-- func: cumsum.out(Tensor self, int dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
+- func: cummax.out(Tensor self, int dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices)
supports_named_tensor: True
-- func: cumsum.dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor
+- func: cummax.dimname(Tensor self, Dimname dim) -> (Tensor values, Tensor indices)
supports_named_tensor: True
variants: function, method
-- func: cumsum.dimname_out(Tensor self, Dimname dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
+- func: cummax.dimname_out(Tensor self, Dimname dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices)
supports_named_tensor: True
+- func: _cummax_helper(Tensor self, Tensor(a!) values, Tensor(b!) indices, int dim) -> ()
+ variants: function
+ dispatch:
+ CPU: cummax_helper_cpu
+ CUDA: cummax_helper_cuda
+
+- func: cummin(Tensor self, int dim) -> (Tensor values, Tensor indices)
+ supports_named_tensor: True
+ variants: function, method
+
+- func: cummin.out(Tensor self, int dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices)
+ supports_named_tensor: True
+
+- func: cummin.dimname(Tensor self, Dimname dim) -> (Tensor values, Tensor indices)
+ supports_named_tensor: True
+ variants: function, method
+
+- func: cummin.dimname_out(Tensor self, Dimname dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices)
+ supports_named_tensor: True
+
+- func: _cummin_helper(Tensor self, Tensor(a!) values, Tensor(b!) indices, int dim) -> ()
+ variants: function
+ dispatch:
+ CPU: cummin_helper_cpu
+ CUDA: cummin_helper_cuda
+
- func: cumprod(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor
supports_named_tensor: True
variants: function, method
- func: cumprod.out(Tensor self, int dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
@@ -863,10 +959,24 @@
variants: function, method
- func: cumprod.dimname_out(Tensor self, Dimname dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
+- func: cumsum(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor
+ supports_named_tensor: True
+ variants: function, method
+
+- func: cumsum.out(Tensor self, int dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
+ supports_named_tensor: True
+
+- func: cumsum.dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor
+ supports_named_tensor: True
+ variants: function, method
+
+- func: cumsum.dimname_out(Tensor self, Dimname dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!)
+ supports_named_tensor: True
+
- func: ctc_loss.IntList(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank=0, int reduction=Mean, bool zero_infinity=False) -> Tensor
# convenience function that converts to intlists for you
- func: ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank=0, int reduction=Mean, bool zero_infinity=False) -> Tensor
use_c10_dispatcher: full
@@ -893,11 +1003,16 @@
use_c10_dispatcher: full
variants: function, method
- func: diagonal(Tensor(a) self, int offset=0, int dim1=0, int dim2=1) -> Tensor(a)
variants: function, method
+ supports_named_tensor: True
+- func: diagonal.Dimname(Tensor(a) self, *, Dimname outdim, Dimname dim1, Dimname dim2, int offset=0) -> Tensor(a)
+ variants: function, method
+ supports_named_tensor: True
+
- func: fill_diagonal_(Tensor(a!) self, Scalar fill_value, bool wrap=False) -> Tensor(a!)
variants: method
- func: div.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
@@ -976,13 +1091,13 @@
# the backward inputs are the same as forward ones.
# The above `embedding_bag` wrapper is created to achieve this, e.g.,
# applying indices = indices.contiguous().
# The backward functions apply a check that these input tensors are contiguous.
-- func: embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None) -> (Tensor, Tensor, Tensor, Tensor)
+- func: embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False) -> (Tensor, Tensor, Tensor, Tensor)
-- func: _embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None) -> (Tensor, Tensor, Tensor, Tensor)
+- func: _embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False) -> (Tensor, Tensor, Tensor, Tensor)
dispatch:
CPU: _embedding_bag_cpu
CUDA: _embedding_bag_cuda
- func: _embedding_bag_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, Tensor maximum_indices, int num_weights, bool scale_grad_by_freq, int mode, bool sparse, Tensor? per_sample_weights) -> Tensor
@@ -1033,29 +1148,22 @@
dispatch:
CPU: empty_per_channel_affine_quantized_other_backends_stub
QuantizedCPU: empty_per_channel_affine_quantized_cpu
- func: resize_(Tensor(a!) self, int[] size, *, MemoryFormat? memory_format=None) -> Tensor(a!)
+ manual_kernel_registration: True
supports_named_tensor: True
variants: method
device_guard: False
- dispatch:
- CPU: resize_cpu_
- CUDA: resize_cuda_
- QuantizedCPU: quantized_resize_cpu_
- func: empty.out(int[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
device_guard: False
-- func: empty_like(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor
+- func: empty_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
device_guard: False
supports_named_tensor: True
-- func: empty_like.dtype(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- device_guard: False
- supports_named_tensor: True
-
- func: empty_strided(int[] size, int[] stride, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
dispatch:
CPU: empty_strided_cpu
CUDA: empty_strided_cuda
@@ -1190,10 +1298,44 @@
supports_named_tensor: True
dispatch:
CPU: floor_out
CUDA: floor_out
+- func: floor_divide(Tensor self, Tensor other) -> Tensor
+ variants: function, method
+ dispatch:
+ CPU: floor_divide
+ CUDA: floor_divide
+ SparseCPU: floor_divide_sparse
+ SparseCUDA: floor_divide_sparse
+ supports_named_tensor: True
+
+- func: floor_divide_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+ dispatch:
+ CPU: floor_divide_
+ CUDA: floor_divide_
+ SparseCPU: floor_divide_sparse_
+ SparseCUDA: floor_divide_sparse_
+ supports_named_tensor: True
+
+- func: floor_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ dispatch:
+ CPU: floor_divide_out
+ CUDA: floor_divide_out
+ SparseCPU: floor_divide_out_sparse_zerodim
+ SparseCUDA: floor_divide_out_sparse_zerodim
+ supports_named_tensor: True
+
+- func: floor_divide.Scalar(Tensor self, Scalar other) -> Tensor
+ variants: function, method
+ supports_named_tensor: True
+
+- func: floor_divide_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
+ variants: method
+ supports_named_tensor: True
+
- func: frac(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
@@ -1209,16 +1351,13 @@
- func: full(int[] size, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: full.out(int[] size, Scalar fill_value, *, Tensor(a!) out) -> Tensor(a!)
-- func: full_like(Tensor self, Scalar fill_value, *, MemoryFormat? memory_format=None) -> Tensor
+- func: full_like(Tensor self, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
supports_named_tensor: True
-- func: full_like.dtype(Tensor self, Scalar fill_value, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- supports_named_tensor: True
-
- func: from_file(str filename, bool? shared=None, int? size=0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
dispatch:
CPU: from_file
# NOTE [ grid_sampler Native Functions ]
@@ -1273,18 +1412,12 @@
use_c10_dispatcher: full
- func: ger(Tensor self, Tensor vec2) -> Tensor
use_c10_dispatcher: full
variants: function, method
- dispatch:
- CPU: legacy::cpu::_th_ger
- CUDA: legacy::cuda::_th_ger
- func: ger.out(Tensor self, Tensor vec2, *, Tensor(a!) out) -> Tensor(a!)
- dispatch:
- CPU: legacy::cpu::_th_ger_out
- CUDA: legacy::cuda::_th_ger_out
- func: group_norm(Tensor input, int num_groups, Tensor? weight=None, Tensor? bias=None, float eps=1e-05, bool cudnn_enabled=True) -> Tensor
# FFT
@@ -1322,10 +1455,13 @@
use_c10_dispatcher: unboxed_only
- func: index.Tensor(Tensor self, Tensor?[] indices) -> Tensor
variants: function, method
# NB: This function is special-cased in tools/autograd/gen_variable_type.py
+ # NB: The following functions are declared in aten/src/ATen/templates/TensorBody.h and defined in aten/src/ATen/TensorIndexing.cpp:
+ # - Tensor Tensor::index(ArrayRef<TensorIndex> indices)
+ # - Tensor Tensor::index(std::initializer_list<TensorIndex> indices)
- func: index_copy_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!)
variants: method
- func: index_copy(Tensor self, int dim, Tensor index, Tensor source) -> Tensor
@@ -1338,10 +1474,15 @@
- func: index_copy.dimname(Tensor self, Dimname dim, Tensor index, Tensor source) -> Tensor
variants: function, method
- func: index_put_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor(a!)
variants: function, method
+ # NB: The following functions are declared in aten/src/ATen/templates/TensorBody.h and defined in aten/src/ATen/TensorIndexing.cpp:
+ # - Tensor & Tensor::index_put_(ArrayRef<TensorIndex> indices, Tensor const & rhs)
+ # - Tensor & Tensor::index_put_(ArrayRef<TensorIndex> indices, Scalar v)
+ # - Tensor & Tensor::index_put_(std::initializer_list<TensorIndex> indices, Tensor const & rhs)
+ # - Tensor & Tensor::index_put_(std::initializer_list<TensorIndex> indices, Scalar v)
- func: index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor
variants: function, method
- func: _index_put_impl_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False, bool unsafe=False) -> Tensor(a!)
@@ -1370,10 +1511,15 @@
- func: isnan(Tensor self) -> Tensor
use_c10_dispatcher: full
variants: function
device_guard: False
supports_named_tensor: True
+ dispatch:
+ CPU: isnan
+ CUDA: isnan
+ SparseCPU: isnan_sparse
+ SparseCUDA: isnan_sparse
- func: is_distributed(Tensor self) -> bool
use_c10_dispatcher: full
variants: function, method
device_guard: False
@@ -1636,14 +1782,17 @@
- func: max_values.names(Tensor self, Dimname[1] dim, bool keepdim=False) -> Tensor
variants: function, method
# Return: (Tensor output, Tensor indices)
- func: max_pool1d_with_indices(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, int[1] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor)
+ supports_named_tensor: True
- func: max_pool1d(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, int[1] dilation=1, bool ceil_mode=False) -> Tensor
+ supports_named_tensor: True
- func: max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor
+ supports_named_tensor: True
- func: mkldnn_max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor
requires_tensor: True
dispatch:
MkldnnCPU: mkldnn_max_pool2d
@@ -1652,10 +1801,11 @@
requires_tensor: True
dispatch:
QuantizedCPU: quantized_max_pool2d
- func: max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor
+ supports_named_tensor: True
# The CPU and GPU dispatch variants are named weirdly here because otherwise there
# are namespacing issues in C++
- func: mean(Tensor self, *, ScalarType? dtype=None) -> Tensor
variants: function, method
@@ -1802,19 +1952,19 @@
- func: mm(Tensor self, Tensor mat2) -> Tensor
use_c10_dispatcher: full
variants: function, method
dispatch:
- CPU: legacy::cpu::_th_mm
+ CPU: mm_cpu
CUDA: legacy::cuda::_th_mm
SparseCPU: _sparse_mm
SparseCUDA: _sparse_mm
supports_named_tensor: True
- func: mm.out(Tensor self, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_mm_out
+ CPU: mm_cpu_out
CUDA: legacy::cuda::_th_mm_out
SparseCPU: _sparse_mm_out
SparseCUDA: _sparse_mm_out
supports_named_tensor: True
@@ -1875,17 +2025,17 @@
- func: mv(Tensor self, Tensor vec) -> Tensor
use_c10_dispatcher: full
variants: function, method
dispatch:
- CPU: legacy::cpu::_th_mv
+ CPU: mv_cpu
CUDA: legacy::cuda::_th_mv
supports_named_tensor: True
- func: mv.out(Tensor self, Tensor vec, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_mv_out
+ CPU: mv_cpu_out
CUDA: legacy::cuda::_th_mv_out
supports_named_tensor: True
- func: mvlgamma(Tensor self, int p) -> Tensor
use_c10_dispatcher: full
@@ -1906,16 +2056,25 @@
- func: narrow(Tensor(a) self, int dim, int start, int length) -> Tensor(a)
variants: function, method
device_guard: False
supports_named_tensor: True
+- func: narrow.Tensor(Tensor(a) self, int dim, Tensor start, int length) -> Tensor(a)
+ variants: function, method
+ device_guard: False
+ supports_named_tensor: True
+
- func: native_batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor)
dispatch:
CPU: batch_norm_cpu
CUDA: batch_norm_cuda
MkldnnCPU: mkldnn_batch_norm
+- func: native_batch_norm.out(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, *, Tensor(a!) out, Tensor(b!) save_mean, Tensor(c!) save_invstd) -> (Tensor(a!), Tensor(b!), Tensor(c!))
+ dispatch:
+ CUDA: batch_norm_cuda_out
+
- func: batch_norm_stats(Tensor input, float eps) -> (Tensor, Tensor)
dispatch:
CUDA: batch_norm_stats_cuda
- func: batch_norm_elemt(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor invstd, float eps) -> Tensor
@@ -1973,20 +2132,20 @@
- func: ones(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: ones.out(int[] size, *, Tensor(a!) out) -> Tensor(a!)
-- func: ones_like(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor
+- func: ones_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
supports_named_tensor: True
-- func: ones_like.dtype(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- supports_named_tensor: True
-
- func: pairwise_distance(Tensor x1, Tensor x2, float p=2, float eps=1e-06, bool keepdim=False) -> Tensor
use_c10_dispatcher: full
- func: cdist(Tensor x1, Tensor x2, float p=2, int? compute_mode=None) -> Tensor
+ supports_named_tensor: True
+
+- func: _cdist_forward(Tensor x1, Tensor x2, float p, int? compute_mode) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
- func: _cdist_backward(Tensor grad, Tensor x1, Tensor x2, float p, Tensor cdist) -> Tensor
use_c10_dispatcher: full
@@ -2051,16 +2210,13 @@
- func: rand.out(int[] size, *, Tensor(a!) out) -> Tensor(a!)
- func: rand.generator_out(int[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!)
-- func: rand_like(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor
+- func: rand_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
supports_named_tensor: True
-- func: rand_like.dtype(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- supports_named_tensor: True
-
- func: randint(int high, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randint.generator(int high, int[] size, *, Generator? generator, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randint.low(int low, int high, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
@@ -2073,18 +2229,14 @@
- func: randint.low_out(int low, int high, int[] size, *, Tensor(a!) out) -> Tensor(a!)
- func: randint.low_generator_out(int low, int high, int[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!)
-- func: randint_like(Tensor self, int high, *, MemoryFormat? memory_format=None) -> Tensor
+- func: randint_like(Tensor self, int high, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
-- func: randint_like.low(Tensor self, int low, int high, *, MemoryFormat? memory_format=None) -> Tensor
+- func: randint_like.low_dtype(Tensor self, int low, int high, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
-- func: randint_like.dtype(Tensor self, int high, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
-
-- func: randint_like.low_dtype(Tensor self, int low, int high, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
-
- func: randn(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randn.generator(int[] size, *, Generator? generator, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randn.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
@@ -2095,16 +2247,13 @@
- func: randn.out(int[] size, *, Tensor(a!) out) -> Tensor(a!)
- func: randn.generator_out(int[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!)
-- func: randn_like(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor
+- func: randn_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
supports_named_tensor: True
-- func: randn_like.dtype(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- supports_named_tensor: True
-
- func: randperm(int n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randperm.generator(int n, *, Generator? generator, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: randperm.out(int n, *, Tensor(a!) out) -> Tensor(a!)
@@ -2129,19 +2278,13 @@
variants: function, method
- func: reciprocal_(Tensor(a!) self) -> Tensor(a!)
supports_named_tensor: True
variants: function, method
- dispatch:
- CPU: _reciprocal__cpu
- CUDA: _reciprocal__cuda
- func: reciprocal.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
- dispatch:
- CPU: _reciprocal_out_cpu
- CUDA: _reciprocal_out_cuda
- func: neg(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
@@ -2256,20 +2399,14 @@
CUDA: gelu_backward_cuda
- func: hardshrink(Tensor self, Scalar lambd=0.5) -> Tensor
use_c10_dispatcher: full
variants: function, method
- dispatch:
- CPU: hardshrink_cpu
- CUDA: hardshrink_cuda
- func: hardshrink_backward(Tensor grad_out, Tensor self, Scalar lambd) -> Tensor
use_c10_dispatcher: full
variants: function, method
- dispatch:
- CPU: hardshrink_backward_cpu
- CUDA: hardshrink_backward_cuda
- func: rsqrt(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
@@ -2310,10 +2447,11 @@
supports_named_tensor: True
variants: function, method
dispatch:
CPU: sigmoid
CUDA: sigmoid
+ QuantizedCPU: quantized_sigmoid
MkldnnCPU: mkldnn_sigmoid
- func: sigmoid_(Tensor(a!) self) -> Tensor(a!)
supports_named_tensor: True
variants: function, method
@@ -2363,17 +2501,19 @@
# to false to make such changes explicitly illegal, in order to prevent users from
# changing metadata of the detached tensor and expecting the original tensor to also
# be updated.
- func: detach(Tensor self) -> Tensor
use_c10_dispatcher: full
+ manual_kernel_registration: True
supports_named_tensor: True
variants: function, method
# Like `detach()`, but modifies this `Variable` in-place. This method may
# only be called on non-view `Variable`s. You can use `is_view()` to check
# this. If this `Variable` is a view, throws an `std::runtime_error()`.
- func: detach_(Tensor(a!) self) -> Tensor(a!)
+ manual_kernel_registration: True
supports_named_tensor: True
variants: function, method
- func: size.int(Tensor self, int dim) -> int
use_c10_dispatcher: full
@@ -2522,10 +2662,19 @@
variants: function, method
- func: sqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
+- func: square(Tensor self) -> Tensor
+ use_c10_dispatcher: full
+ supports_named_tensor: True
+ variants: function, method
+
+- func: square_(Tensor(a!) self) -> Tensor(a!)
+ supports_named_tensor: True
+ variants: function, method
+
- func: std(Tensor self, bool unbiased=True) -> Tensor
use_c10_dispatcher: full
variants: function, method
supports_named_tensor: True
@@ -2603,10 +2752,14 @@
- func: tanh(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
+ dispatch:
+ CPU: tanh
+ CUDA: tanh
+ QuantizedCPU: quantized_tanh
- func: tanh_(Tensor(a!) self) -> Tensor(a!)
supports_named_tensor: True
variants: function, method
dispatch:
@@ -2625,21 +2778,33 @@
# TODO: namespace threshold in 'nn'
- func: threshold(Tensor self, Scalar threshold, Scalar value) -> Tensor
use_c10_dispatcher: full
variants: function
supports_named_tensor: True
+ dispatch:
+ CPU: threshold
+ CUDA: threshold_cuda
- func: threshold_(Tensor(a!) self, Scalar threshold, Scalar value) -> Tensor(a!)
variants: function
supports_named_tensor: True
+ dispatch:
+ CPU: threshold_
+ CUDA: threshold__cuda
- func: threshold.out(Tensor self, Scalar threshold, Scalar value, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
+ dispatch:
+ CPU: threshold_out
+ CUDA: threshold_out_cuda
- func: threshold_backward(Tensor grad_output, Tensor self, Scalar threshold) -> Tensor
use_c10_dispatcher: full
variants: function
+ dispatch:
+ CPU: threshold_backward
+ CUDA: threshold_backward_cuda
- func: transpose.int(Tensor(a) self, int dim0, int dim1) -> Tensor(a)
variants: function, method
device_guard: False
supports_named_tensor: True
@@ -2697,10 +2862,46 @@
- func: _trilinear(Tensor i1, Tensor i2, Tensor i3, int[] expand1, int[] expand2, int[] expand3, int[] sumdim, int unroll_dim=1) -> Tensor
- func: triplet_margin_loss(Tensor anchor, Tensor positive, Tensor negative, float margin=1.0, float p=2, float eps=1e-06, bool swap=False, int reduction=Mean) -> Tensor
use_c10_dispatcher: full
+- func: true_divide.Tensor(Tensor self, Tensor other) -> Tensor
+ use_c10_dispatcher: full
+ variants: function, method
+ dispatch:
+ CPU: true_divide
+ CUDA: true_divide
+ SparseCPU: true_divide_sparse
+ SparseCUDA: true_divide_sparse
+ supports_named_tensor: True
+
+- func: true_divide_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+ dispatch:
+ CPU: true_divide_
+ CUDA: true_divide_
+ SparseCPU: true_divide_sparse_
+ SparseCUDA: true_divide_sparse_
+ supports_named_tensor: True
+
+- func: true_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ dispatch:
+ CPU: true_divide_out
+ CUDA: true_divide_out
+ SparseCPU: true_divide_out_sparse_zerodim
+ SparseCUDA: true_divide_out_sparse_zerodim
+ supports_named_tensor: True
+
+- func: true_divide.Scalar(Tensor self, Scalar other) -> Tensor
+ use_c10_dispatcher: full
+ variants: function, method
+ supports_named_tensor: True
+
+- func: true_divide_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
+ variants: method
+ supports_named_tensor: True
+
- func: trunc(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: function, method
@@ -2813,13 +3014,10 @@
variants: function
- func: _s_where(Tensor condition, Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: function
- dispatch:
- CPU: _s_where_cpu
- CUDA: _s_where_cuda
- func: norm_except_dim(Tensor v, int pow=2, int dim=0) -> Tensor
variants: function
# VariableType::_weight_norm does not want to be given a gap in the autograd graph,
@@ -2846,16 +3044,13 @@
- func: zeros(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: zeros.out(int[] size, *, Tensor(a!) out) -> Tensor(a!)
-- func: zeros_like(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor
+- func: zeros_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
supports_named_tensor: True
-- func: zeros_like.dtype(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, MemoryFormat? memory_format=None) -> Tensor
- supports_named_tensor: True
-
- func: _standard_gamma_grad(Tensor self, Tensor output) -> Tensor
use_c10_dispatcher: full
variants: function
dispatch:
CPU: _standard_gamma_grad_cpu
@@ -2968,10 +3163,11 @@
MkldnnCPU: mkldnn_clone
QuantizedCPU: quantized_clone
supports_named_tensor: True
- func: resize_as_(Tensor(a!) self, Tensor the_template, *, MemoryFormat? memory_format=None) -> Tensor(a!)
+ manual_kernel_registration: True
supports_named_tensor: True
variants: function, method
- func: pow.Tensor_Scalar_out(Tensor self, Scalar exponent, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
@@ -3487,39 +3683,31 @@
- func: _make_per_channel_quantized_tensor(Tensor self, Tensor scale, Tensor zero_point, int axis) -> Tensor
dispatch:
CPU: make_per_channel_quantized_tensor_cpu
- func: qscheme(Tensor self) -> QScheme
+ use_c10_dispatcher: full
variants: method
dispatch:
QuantizedCPU: qscheme_quant
- func: fake_quantize_per_tensor_affine(Tensor self, float scale, int zero_point, int quant_min, int quant_max) -> Tensor
use_c10_dispatcher: full
variants: function
- dispatch:
- CPU: fake_quantize_per_tensor_affine_cpu
- CUDA: fake_quantize_per_tensor_affine_cuda
- func: fake_quantize_per_tensor_affine_backward(Tensor grad, Tensor self, float scale, int zero_point, int quant_min, int quant_max) -> Tensor
use_c10_dispatcher: full
variants: function
- dispatch:
- CPU: fake_quantize_per_tensor_affine_backward_cpu
- CUDA: fake_quantize_per_tensor_affine_backward_cuda
- func: fake_quantize_per_channel_affine(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> Tensor
+ use_c10_dispatcher: full
variants: function
- dispatch:
- CPU: fake_quantize_per_channel_affine_cpu
- CUDA: fake_quantize_per_channel_affine_cuda
- func: fake_quantize_per_channel_affine_backward(Tensor grad, Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> Tensor
+ use_c10_dispatcher: full
variants: function
- dispatch:
- CPU: fake_quantize_per_channel_affine_backward_cpu
- CUDA: fake_quantize_per_channel_affine_backward_cuda
+
# to(Device) must not exist because all constructors of Device also works for
# TensorOptions. Otherwise, an ambiguity error is thrown.
# See NOTE [ TensorOptions Constructors ].
- func: to.dtype_layout(Tensor self, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor
variants: method
@@ -3675,12 +3863,12 @@
- func: set_.source_Tensor(Tensor(a!) self, Tensor source) -> Tensor(a!)
variants: method
device_guard: False
dispatch:
- CPU: legacy::cpu::_th_set_
- CUDA: legacy::cuda::_th_set_
+ CPU: set_tensor_
+ CUDA: set_tensor_
- func: set_(Tensor(a!) self) -> Tensor(a!)
variants: method
dispatch:
CPU: set_cpu_
@@ -3750,11 +3938,11 @@
- func: index_add_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!)
variants: method
dispatch:
CPU: index_add_cpu_
- CUDA: legacy::cuda::_th_index_add_
+ CUDA: index_add_cuda_
- func: index_add(Tensor self, int dim, Tensor index, Tensor source) -> Tensor
use_c10_dispatcher: full
variants: function, method
@@ -3802,21 +3990,21 @@
supports_named_tensor: True
- func: scatter_.src(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_scatter_
+ CPU: scatter_cpu_
CUDA: legacy::cuda::_th_scatter_
- func: scatter.src(Tensor self, int dim, Tensor index, Tensor src) -> Tensor
use_c10_dispatcher: full
variants: function, method
- func: scatter_.value(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_scatter_
+ CPU: scatter_fill_cpu_
CUDA: legacy::cuda::_th_scatter_
- func: scatter.value(Tensor self, int dim, Tensor index, Scalar value) -> Tensor
use_c10_dispatcher: full
variants: function, method
@@ -3828,11 +4016,11 @@
variants: function, method
- func: scatter_add_(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_scatter_add_
+ CPU: scatter_add_cpu_
CUDA: legacy::cuda::_th_scatter_add_
- func: scatter_add(Tensor self, int dim, Tensor index, Tensor src) -> Tensor
use_c10_dispatcher: full
variants: function, method
@@ -3874,61 +4062,85 @@
variants: method
- func: ne_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
+- func: bitwise_and.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ variants: function
+ dispatch:
+ CPU: bitwise_and_out
+ CUDA: bitwise_and_out
+
+- func: bitwise_and.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)
+ variants: function
+ dispatch:
+ CPU: bitwise_and_out
+ CUDA: bitwise_and_out
+
+- func: bitwise_and.Scalar(Tensor self, Scalar other) -> Tensor
+ variants: method, function
+
+- func: bitwise_and.Tensor(Tensor self, Tensor other) -> Tensor
+ variants: method, function
+
+- func: bitwise_and_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
+ variants: method
+
+- func: bitwise_and_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+
- func: __and__.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_and
- CUDA: legacy::cuda::_th_and
- func: __and__.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_and
- CUDA: legacy::cuda::_th_and
- func: __iand__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_iand_
- CUDA: legacy::cuda::_th_iand_
- func: __iand__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
+
+- func: bitwise_or.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
+ variants: function
dispatch:
- CPU: legacy::cpu::_th_iand_
- CUDA: legacy::cuda::_th_iand_
+ CPU: bitwise_or_out
+ CUDA: bitwise_or_out
+- func: bitwise_or.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)
+ variants: function
+ dispatch:
+ CPU: bitwise_or_out
+ CUDA: bitwise_or_out
+
+- func: bitwise_or.Scalar(Tensor self, Scalar other) -> Tensor
+ variants: method, function
+
+- func: bitwise_or.Tensor(Tensor self, Tensor other) -> Tensor
+ variants: method, function
+
+- func: bitwise_or_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
+ variants: method
+
+- func: bitwise_or_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
+ variants: method
+
- func: __or__.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_or
- CUDA: legacy::cuda::_th_or
- func: __or__.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_or
- CUDA: legacy::cuda::_th_or
- func: __ior__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_ior_
- CUDA: legacy::cuda::_th_ior_
- func: __ior__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_ior_
- CUDA: legacy::cuda::_th_ior_
- func: bitwise_xor.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
variants: function
dispatch:
CPU: bitwise_xor_out
@@ -3968,57 +4180,57 @@
- func: __lshift__.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_lshift
- CUDA: legacy::cuda::_th_lshift
+ CPU: __lshift__
+ CUDA: __lshift__
- func: __lshift__.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_lshift
- CUDA: legacy::cuda::_th_lshift
+ CPU: __lshift__
+ CUDA: __lshift__
- func: __ilshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_ilshift_
- CUDA: legacy::cuda::_th_ilshift_
+ CPU: __ilshift__
+ CUDA: __ilshift__
- func: __ilshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_ilshift_
- CUDA: legacy::cuda::_th_ilshift_
+ CPU: __ilshift__
+ CUDA: __ilshift__
- func: __rshift__.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_rshift
- CUDA: legacy::cuda::_th_rshift
+ CPU: __rshift__
+ CUDA: __rshift__
- func: __rshift__.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_rshift
- CUDA: legacy::cuda::_th_rshift
+ CPU: __rshift__
+ CUDA: __rshift__
- func: __irshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_irshift_
- CUDA: legacy::cuda::_th_irshift_
+ CPU: __irshift__
+ CUDA: __irshift__
- func: __irshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_irshift_
- CUDA: legacy::cuda::_th_irshift_
+ CPU: __irshift__
+ CUDA: __irshift__
- func: lgamma_(Tensor(a!) self) -> Tensor(a!)
supports_named_tensor: True
variants: method
dispatch:
@@ -4082,30 +4294,30 @@
CUDA: lerp_cuda_tensor_
- func: fmod_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_fmod_
+ CPU: fmod_
CUDA: legacy::cuda::_th_fmod_
- func: fmod_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_fmod_
+ CPU: fmod_
CUDA: legacy::cuda::_th_fmod_
- func: remainder_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_remainder_
- CUDA: legacy::cuda::_th_remainder_
+ CPU: remainder_
+ CUDA: remainder_
- func: remainder_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)
variants: method
dispatch:
- CPU: legacy::cpu::_th_remainder_
- CUDA: legacy::cuda::_th_remainder_
+ CPU: remainder_
+ CUDA: remainder_
- func: addbmm_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!)
variants: method
dispatch:
CPU: legacy::cpu::_th_addbmm_
@@ -4125,71 +4337,43 @@
- func: addcdiv_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!)
variants: method
supports_named_tensor: True
-- func: random_.from(Tensor(a!) self, int from, int to, *, Generator? generator=None) -> Tensor(a!)
+- func: random_.from(Tensor(a!) self, int from, int? to, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_random_
- CUDA: clamped_random_cuda_
supports_named_tensor: True
- func: random_.to(Tensor(a!) self, int to, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_random_
- CUDA: capped_random_cuda_
supports_named_tensor: True
- func: random_(Tensor(a!) self, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_random_
- CUDA: random_cuda_
supports_named_tensor: True
- func: uniform_(Tensor(a!) self, float from=0, float to=1, *, Generator? generator=None) -> Tensor(a!)
variants: method
dispatch:
CPU: legacy::cpu::_th_uniform_
CUDA: uniform_cuda_
supports_named_tensor: True
-- func: normal_(Tensor(a!) self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor(a!)
- variants: method
- dispatch:
- CPU: legacy::cpu::_th_normal_
- CUDA: normal_cuda_
- supports_named_tensor: True
-
- func: cauchy_(Tensor(a!) self, float median=0, float sigma=1, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_cauchy_
- CUDA: cauchy_cuda_
supports_named_tensor: True
- func: log_normal_(Tensor(a!) self, float mean=1, float std=2, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_log_normal_
- CUDA: log_normal_cuda_
supports_named_tensor: True
- func: exponential_(Tensor(a!) self, float lambd=1, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_exponential_
- CUDA: exponential_cuda_
supports_named_tensor: True
- func: geometric_(Tensor(a!) self, float p, *, Generator? generator=None) -> Tensor(a!)
variants: method
- dispatch:
- CPU: legacy::cpu::_th_geometric_
- CUDA: geometric_cuda_
supports_named_tensor: True
# wrappers for TH functions
- func: diag.out(Tensor self, int diagonal=0, *, Tensor(a!) out) -> Tensor(a!)
@@ -4449,18 +4633,18 @@
CPU: legacy::cpu::_th_take
CUDA: legacy::cuda::_th_take
- func: index_select.out(Tensor self, int dim, Tensor index, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_index_select_out
+ CPU: index_select_out_cpu_
CUDA: legacy::cuda::_th_index_select_out
- func: index_select(Tensor self, int dim, Tensor index) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_index_select
+ CPU: index_select_cpu_
CUDA: legacy::cuda::_th_index_select
SparseCPU: index_select_sparse
SparseCUDA: index_select_sparse
- func: index_select.dimname_out(Tensor self, Dimname dim, Tensor index, *, Tensor(a!) out) -> Tensor(a!)
@@ -4792,13 +4976,10 @@
CUDA: sign_out
- func: dist(Tensor self, Tensor other, Scalar p=2) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_dist
- CUDA: legacy::cuda::_th_dist
- func: atan2.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
supports_named_tensor: True
- func: atan2(Tensor self, Tensor other) -> Tensor
@@ -4842,94 +5023,82 @@
CPU: legacy::cpu::_th_histc
CUDA: _histc_cuda
- func: fmod.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_fmod_out
+ CPU: fmod_out
CUDA: legacy::cuda::_th_fmod_out
- func: fmod.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_fmod
+ CPU: fmod
CUDA: legacy::cuda::_th_fmod
- func: fmod.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_fmod_out
+ CPU: fmod_out
CUDA: legacy::cuda::_th_fmod_out
- func: fmod.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_fmod
+ CPU: fmod
CUDA: legacy::cuda::_th_fmod
- func: remainder.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_remainder_out
- CUDA: legacy::cuda::_th_remainder_out
+ CPU: remainder_out
+ CUDA: remainder_out
- func: remainder.Scalar(Tensor self, Scalar other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_remainder
- CUDA: legacy::cuda::_th_remainder
+ CPU: remainder
+ CUDA: remainder
- func: remainder.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_remainder_out
- CUDA: legacy::cuda::_th_remainder_out
+ CPU: remainder_out
+ CUDA: remainder_out
- func: remainder.Tensor(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_remainder
- CUDA: legacy::cuda::_th_remainder
+ CPU: remainder
+ CUDA: remainder
- func: min.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
- dispatch:
- CPU: legacy::cpu::_th_min_out
- CUDA: legacy::cuda::_th_min_out
- func: min.other(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_min
- CUDA: legacy::cuda::_th_min
- func: min(Tensor self) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_min
+ CPU: min
CUDA: legacy::cuda::_th_min
QuantizedCPU: min_quant
supports_named_tensor: True
- func: max.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
- dispatch:
- CPU: legacy::cpu::_th_max_out
- CUDA: legacy::cuda::_th_max_out
- func: max.other(Tensor self, Tensor other) -> Tensor
use_c10_dispatcher: full
variants: method, function
- dispatch:
- CPU: legacy::cpu::_th_max
- CUDA: legacy::cuda::_th_max
- func: max(Tensor self) -> Tensor
use_c10_dispatcher: full
variants: method, function
dispatch:
- CPU: legacy::cpu::_th_max
+ CPU: max
CUDA: legacy::cuda::_th_max
QuantizedCPU: max_quant
supports_named_tensor: True
- func: median(Tensor self) -> Tensor
@@ -4983,10 +5152,15 @@
- func: any(Tensor self) -> Tensor
use_c10_dispatcher: full
supports_named_tensor: True
variants: method, function
+ dispatch:
+ CPU: any
+ CUDA: any
+ SparseCPU: any_sparse
+ SparseCUDA: any_sparse
- func: renorm.out(Tensor self, Scalar p, int dim, Scalar maxnorm, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
CPU: legacy::cpu::_th_renorm_out
CUDA: legacy::cuda::_th_renorm_out
@@ -5039,38 +5213,45 @@
supports_named_tensor: True
dispatch:
CPU: pow
CUDA: pow
+- func: normal_(Tensor(a!) self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor(a!)
+ variants: method
+ dispatch:
+ CPU: normal_cpu_
+ CUDA: normal_cuda_
+ supports_named_tensor: True
+
- func: normal.Tensor_float_out(Tensor mean, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_normal_out
+ CPU: normal_out_cpu
CUDA: normal_out_cuda
- func: normal.Tensor_float(Tensor mean, float std=1, *, Generator? generator=None) -> Tensor
dispatch:
- CPU: legacy::cpu::_th_normal
+ CPU: normal_cpu
CUDA: normal_cuda
- func: normal.float_Tensor_out(float mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_normal_out
+ CPU: normal_out_cpu
CUDA: normal_out_cuda
- func: normal.float_Tensor(float mean, Tensor std, *, Generator? generator=None) -> Tensor
dispatch:
- CPU: legacy::cpu::_th_normal
+ CPU: normal_cpu
CUDA: normal_cuda
- func: normal.Tensor_Tensor_out(Tensor mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_normal_out
+ CPU: normal_out_cpu
CUDA: normal_out_cuda
- func: normal.Tensor_Tensor(Tensor mean, Tensor std, *, Generator? generator=None) -> Tensor
dispatch:
- CPU: legacy::cpu::_th_normal
+ CPU: normal_cpu
CUDA: normal_cuda
- func: normal.float_float(float mean, float std, int[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
- func: normal.float_float_out(float mean, float std, int[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
@@ -5101,27 +5282,27 @@
CUDA: legacy::cuda::_th_index_copy_
- func: _cumsum(Tensor self, int dim) -> Tensor
use_c10_dispatcher: full
dispatch:
- CPU: legacy::cpu::_th_cumsum
+ CPU: _cumsum_cpu
CUDA: legacy::cuda::_th_cumsum
- func: _cumsum.out(Tensor self, int dim, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_cumsum_out
+ CPU: _cumsum_out_cpu
CUDA: legacy::cuda::_th_cumsum_out
- func: _cumprod(Tensor self, int dim) -> Tensor
use_c10_dispatcher: full
dispatch:
- CPU: legacy::cpu::_th_cumprod
+ CPU: _cumprod_cpu
CUDA: legacy::cuda::_th_cumprod
- func: _cumprod.out(Tensor self, int dim, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_cumprod_out
+ CPU: _cumprod_out_cpu
CUDA: legacy::cuda::_th_cumprod_out
- func: _var(Tensor self, bool unbiased=True) -> Tensor
use_c10_dispatcher: full
dispatch:
@@ -5134,19 +5315,31 @@
dispatch:
CPU: legacy::cpu::_th_std
CUDA: legacy::cuda::_th_std
supports_named_tensor: True
+- func: _amp_non_finite_check_and_unscale_(Tensor(a!) self, Tensor(b!) found_inf, Tensor inv_scale) -> ()
+ variants: function
+ dispatch:
+ CUDA: _amp_non_finite_check_and_unscale_cuda_
+
+- func: _amp_update_scale(Tensor(a!) growth_tracker, Tensor current_scale, Tensor found_inf, float scale_growth_factor, float scale_backoff_factor, int growth_interval) -> Tensor
+ variants: function
+ dispatch:
+ CUDA: _amp_update_scale_cuda
+
- func: _cat(Tensor[] tensors, int dim=0) -> Tensor
dispatch:
- CPU: legacy::cpu::_th_cat
- CUDA: legacy::cuda::_th_cat
+ CPU: _cat_cpu
+ CUDA: cat_cuda
+ QuantizedCPU: quantized_cat
- func: _cat.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!)
dispatch:
- CPU: legacy::cpu::_th_cat_out
- CUDA: legacy::cuda::_th_cat_out
+ CPU: _cat_out_cpu
+ CUDA: cat_out_cuda
+ QuantizedCPU: quantized_cat_out
- func: _mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor, Tensor)
dispatch:
CPU: legacy::cpu::_th_mode
CUDA: legacy::cuda::_th_mode
@@ -5176,34 +5369,10 @@
CPU: legacy::cpu::_th_min_out
CUDA: legacy::cuda::_th_min_out
## NN wrappers
-- func: binary_cross_entropy.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!)
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_binary_cross_entropy_forward_out
- CUDA: legacy::cuda::_thnn_binary_cross_entropy_forward_out
-
-- func: binary_cross_entropy(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_binary_cross_entropy_forward
- CUDA: legacy::cuda::_thnn_binary_cross_entropy_forward
-
-- func: binary_cross_entropy_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) grad_input) -> Tensor(a!)
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_binary_cross_entropy_backward_out
- CUDA: legacy::cuda::_thnn_binary_cross_entropy_backward_out
-
-- func: binary_cross_entropy_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_binary_cross_entropy_backward
- CUDA: legacy::cuda::_thnn_binary_cross_entropy_backward
-
- func: mse_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- func: mse_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor
use_c10_dispatcher: full
@@ -5375,155 +5544,151 @@
use_c10_dispatcher: full
python_module: nn
- func: soft_margin_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_soft_margin_loss_forward_out
- CUDA: legacy::cuda::_thnn_soft_margin_loss_forward_out
- func: soft_margin_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_soft_margin_loss_forward
- CUDA: legacy::cuda::_thnn_soft_margin_loss_forward
- func: soft_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_soft_margin_loss_backward_out
- CUDA: legacy::cuda::_thnn_soft_margin_loss_backward_out
- func: soft_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_soft_margin_loss_backward
- CUDA: legacy::cuda::_thnn_soft_margin_loss_backward
- func: elu.out(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_elu_forward_out
- CUDA: legacy::cuda::_thnn_elu_forward_out
+ CPU: elu_out
+ CUDA: elu_out
+ QuantizedCPU: quantized_elu_out
- func: elu(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_elu_forward
- CUDA: legacy::cuda::_thnn_elu_forward
+ CPU: elu
+ CUDA: elu
+ QuantizedCPU: quantized_elu
- func: elu_backward.grad_input(Tensor grad_output, Scalar alpha, Scalar scale, Scalar input_scale, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_elu_backward_out
- CUDA: legacy::cuda::_thnn_elu_backward_out
+ CPU: elu_backward_out
+ CUDA: elu_backward_out
- func: elu_backward(Tensor grad_output, Scalar alpha, Scalar scale, Scalar input_scale, Tensor output) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_elu_backward
- CUDA: legacy::cuda::_thnn_elu_backward
- func: elu_(Tensor(a!) self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_elu_forward_
- CUDA: legacy::cuda::_thnn_elu_forward_
+ CPU: elu_
+ CUDA: elu_
+ QuantizedCPU: quantized_elu_
- func: glu.out(Tensor self, int dim=-1, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_glu_forward_out
+ CPU: glu_out
CUDA: legacy::cuda::_thnn_glu_forward_out
- func: glu(Tensor self, int dim=-1) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_glu_forward
+ CPU: glu
CUDA: legacy::cuda::_thnn_glu_forward
- func: glu_backward.grad_input(Tensor grad_output, Tensor self, int dim, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_glu_backward_out
+ CPU: glu_backward_out
CUDA: legacy::cuda::_thnn_glu_backward_out
- func: glu_backward(Tensor grad_output, Tensor self, int dim) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_glu_backward
+ CPU: glu_backward
CUDA: legacy::cuda::_thnn_glu_backward
+- func: hardsigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
+ python_module: nn
+
+- func: hardsigmoid(Tensor self) -> Tensor
+ use_c10_dispatcher: full
+ python_module: nn
+
+- func: hardsigmoid_(Tensor(a!) self) -> Tensor(a!)
+ python_module: nn
+
+- func: hardsigmoid_backward(Tensor grad_output, Tensor self) -> Tensor
+ use_c10_dispatcher: full
+ python_module: nn
+
- func: hardtanh.out(Tensor self, Scalar min_val=-1, Scalar max_val=1, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_hardtanh_forward_out
- CUDA: legacy::cuda::_thnn_hardtanh_forward_out
+ CPU: hardtanh_out
+ CUDA: hardtanh_out
+ QuantizedCPU: quantized_hardtanh_out
- func: hardtanh(Tensor self, Scalar min_val=-1, Scalar max_val=1) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_hardtanh_forward
- CUDA: legacy::cuda::_thnn_hardtanh_forward
+ CPU: hardtanh
+ CUDA: hardtanh
+ QuantizedCPU: quantized_hardtanh
- func: hardtanh_backward.grad_input(Tensor grad_output, Tensor self, Scalar min_val, Scalar max_val, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_hardtanh_backward_out
- CUDA: legacy::cuda::_thnn_hardtanh_backward_out
+ CPU: hardtanh_backward_out
+ CUDA: hardtanh_backward_out
- func: hardtanh_backward(Tensor grad_output, Tensor self, Scalar min_val, Scalar max_val) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_hardtanh_backward
- CUDA: legacy::cuda::_thnn_hardtanh_backward
- func: hardtanh_(Tensor(a!) self, Scalar min_val=-1, Scalar max_val=1) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_hardtanh_forward_
- CUDA: legacy::cuda::_thnn_hardtanh_forward_
+ CPU: hardtanh_
+ CUDA: hardtanh_
+ QuantizedCPU: quantized_hardtanh_
- func: leaky_relu.out(Tensor self, Scalar negative_slope=0.01, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_leaky_relu_forward_out
- CUDA: legacy::cuda::_thnn_leaky_relu_forward_out
+ CPU: leaky_relu_out
+ CUDA: leaky_relu_out
+ QuantizedCPU: quantized_leaky_relu_out
- func: leaky_relu(Tensor self, Scalar negative_slope=0.01) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_leaky_relu_forward
- CUDA: legacy::cuda::_thnn_leaky_relu_forward
+ CPU: leaky_relu
+ CUDA: leaky_relu
+ QuantizedCPU: quantized_leaky_relu
-- func: leaky_relu_backward.grad_input(Tensor grad_output, Tensor self, Scalar negative_slope, *, Tensor(a!) grad_input) -> Tensor(a!)
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_leaky_relu_backward_out
- CUDA: legacy::cuda::_thnn_leaky_relu_backward_out
-
-- func: leaky_relu_backward(Tensor grad_output, Tensor self, Scalar negative_slope) -> Tensor
+- func: leaky_relu_backward(Tensor grad_output, Tensor self, Scalar negative_slope, bool self_is_result) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_leaky_relu_backward
- CUDA: legacy::cuda::_thnn_leaky_relu_backward
- func: leaky_relu_(Tensor(a!) self, Scalar negative_slope=0.01) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_leaky_relu_forward_
- CUDA: legacy::cuda::_thnn_leaky_relu_forward_
+ CPU: leaky_relu_
+ CUDA: leaky_relu_
+ QuantizedCPU: quantized_leaky_relu_
- func: log_sigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- func: log_sigmoid(Tensor self) -> Tensor
@@ -5531,114 +5696,87 @@
python_module: nn
- func: log_sigmoid_forward.output(Tensor self, *, Tensor(a!) output, Tensor(b!) buffer) -> (Tensor(a!), Tensor(b!))
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_log_sigmoid_forward_out
+ CPU: log_sigmoid_forward_out_cpu
CUDA: legacy::cuda::_thnn_log_sigmoid_forward_out
- func: log_sigmoid_forward(Tensor self) -> (Tensor output, Tensor buffer)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_log_sigmoid_forward
+ CPU: log_sigmoid_forward_cpu
CUDA: legacy::cuda::_thnn_log_sigmoid_forward
- func: log_sigmoid_backward.grad_input(Tensor grad_output, Tensor self, Tensor buffer, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_log_sigmoid_backward_out
+ CPU: log_sigmoid_backward_out_cpu
CUDA: legacy::cuda::_thnn_log_sigmoid_backward_out
- func: log_sigmoid_backward(Tensor grad_output, Tensor self, Tensor buffer) -> Tensor
use_c10_dispatcher: full
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_log_sigmoid_backward
+ CPU: log_sigmoid_backward_cpu
CUDA: legacy::cuda::_thnn_log_sigmoid_backward
- func: rrelu_with_noise.out(Tensor self, Tensor noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_rrelu_with_noise_forward_out
+ CPU: rrelu_with_noise_out_cpu
CUDA: legacy::cuda::_thnn_rrelu_with_noise_forward_out
- func: rrelu_with_noise(Tensor self, Tensor noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_rrelu_with_noise_forward
+ CPU: rrelu_with_noise_cpu
CUDA: legacy::cuda::_thnn_rrelu_with_noise_forward
-- func: rrelu_with_noise_backward.grad_input(Tensor grad_output, Tensor self, Tensor noise, Scalar lower, Scalar upper, bool training, *, Tensor(a!) grad_input) -> Tensor(a!)
- python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_rrelu_with_noise_backward_out
- CUDA: legacy::cuda::_thnn_rrelu_with_noise_backward_out
-
-- func: rrelu_with_noise_backward(Tensor grad_output, Tensor self, Tensor noise, Scalar lower, Scalar upper, bool training) -> Tensor
+- func: rrelu_with_noise_backward(Tensor grad_output, Tensor self, Tensor noise, Scalar lower, Scalar upper, bool training, bool self_is_result) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_rrelu_with_noise_backward
- CUDA: legacy::cuda::_thnn_rrelu_with_noise_backward
- func: rrelu_with_noise_(Tensor(a!) self, Tensor noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_rrelu_with_noise_forward_
+ CPU: rrelu_with_noise_cpu_
CUDA: legacy::cuda::_thnn_rrelu_with_noise_forward_
- func: softplus.out(Tensor self, Scalar beta=1, Scalar threshold=20, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softplus_forward_out
- CUDA: legacy::cuda::_thnn_softplus_forward_out
- func: softplus(Tensor self, Scalar beta=1, Scalar threshold=20) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softplus_forward
- CUDA: legacy::cuda::_thnn_softplus_forward
- func: softplus_backward.grad_input(Tensor grad_output, Tensor self, Scalar beta, Scalar threshold, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_softplus_backward_out
- CUDA: legacy::cuda::_thnn_softplus_backward_out
+ CPU: softplus_backward_out
+ CUDA: softplus_backward_out
- func: softplus_backward(Tensor grad_output, Tensor self, Scalar beta, Scalar threshold, Tensor output) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softplus_backward
- CUDA: legacy::cuda::_thnn_softplus_backward
- func: softshrink.out(Tensor self, Scalar lambd=0.5, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softshrink_forward_out
- CUDA: legacy::cuda::_thnn_softshrink_forward_out
- func: softshrink(Tensor self, Scalar lambd=0.5) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softshrink_forward
- CUDA: legacy::cuda::_thnn_softshrink_forward
- func: softshrink_backward.grad_input(Tensor grad_output, Tensor self, Scalar lambd, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_softshrink_backward_out
- CUDA: legacy::cuda::_thnn_softshrink_backward_out
+ CPU: softshrink_backward_out
+ CUDA: softshrink_backward_out
- func: softshrink_backward(Tensor grad_output, Tensor self, Scalar lambd) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_softshrink_backward
- CUDA: legacy::cuda::_thnn_softshrink_backward
- func: adaptive_avg_pool2d.out(Tensor self, int[2] output_size, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: adaptive_avg_pool2d_out_cpu
@@ -5781,10 +5919,11 @@
- func: avg_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor
python_module: nn
dispatch:
CPU: avg_pool3d_cpu
CUDA: avg_pool3d_cuda
+ QuantizedCPU: quantized_avg_pool3d
- func: avg_pool3d_backward.grad_input(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, bool ceil_mode, bool count_include_pad, int? divisor_override, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: avg_pool3d_backward_out_cpu
@@ -5859,10 +5998,11 @@
- func: max_pool2d_with_indices(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor)
python_module: nn
dispatch:
CPU: max_pool2d_with_indices_cpu
CUDA: max_pool2d_with_indices_cuda
+ supports_named_tensor: True
- func: max_pool2d_with_indices_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool ceil_mode, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: max_pool2d_with_indices_backward_out_cpu
@@ -5885,10 +6025,11 @@
- func: max_pool3d_with_indices(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor)
python_module: nn
dispatch:
CPU: max_pool3d_with_indices_cpu
CUDA: max_pool3d_with_indices_cuda
+ supports_named_tensor: True
- func: max_pool3d_with_indices_backward.grad_input(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool ceil_mode, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: max_pool3d_with_indices_backward_out_cpu
@@ -6066,178 +6207,176 @@
python_module: nn
dispatch:
CPU: replication_pad3d_backward_cpu
CUDA: replication_pad3d_backward_cuda
-- func: _test_optional_float(Tensor self, *, float? scale=None) -> Tensor
- variants: function
-
-- func: upsample_linear1d.out(Tensor self, int[1] output_size, bool align_corners, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_linear1d.out(Tensor self, int[1] output_size, bool align_corners, float? scales=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_linear1d_out_cpu
CUDA: upsample_linear1d_out_cuda
-- func: upsample_linear1d(Tensor self, int[1] output_size, bool align_corners) -> Tensor
+- func: upsample_linear1d(Tensor self, int[1] output_size, bool align_corners, float? scales=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_linear1d_cpu
CUDA: upsample_linear1d_cuda
-- func: upsample_linear1d_backward.grad_input(Tensor grad_output, int[1] output_size, int[3] input_size, bool align_corners, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_linear1d_backward.grad_input(Tensor grad_output, int[1] output_size, int[3] input_size, bool align_corners, float? scales=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_linear1d_backward_out_cpu
CUDA: upsample_linear1d_backward_out_cuda
-- func: upsample_linear1d_backward(Tensor grad_output, int[1] output_size, int[3] input_size, bool align_corners) -> Tensor
+- func: upsample_linear1d_backward(Tensor grad_output, int[1] output_size, int[3] input_size, bool align_corners, float? scales=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_linear1d_backward_cpu
CUDA: upsample_linear1d_backward_cuda
-- func: upsample_bilinear2d.out(Tensor self, int[2] output_size, bool align_corners, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_bilinear2d.out(Tensor self, int[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_bilinear2d_out_cpu
CUDA: upsample_bilinear2d_out_cuda
-- func: upsample_bilinear2d(Tensor self, int[2] output_size, bool align_corners) -> Tensor
+- func: upsample_bilinear2d(Tensor self, int[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_bilinear2d_cpu
CUDA: upsample_bilinear2d_cuda
QuantizedCPU: quantized_upsample_bilinear2d_cpu
-- func: upsample_bilinear2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_bilinear2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_bilinear2d_backward_out_cpu
CUDA: upsample_bilinear2d_backward_out_cuda
-- func: upsample_bilinear2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners) -> Tensor
+- func: upsample_bilinear2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_bilinear2d_backward_cpu
CUDA: upsample_bilinear2d_backward_cuda
-- func: upsample_bicubic2d.out(Tensor self, int[2] output_size, bool align_corners, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_bicubic2d.out(Tensor self, int[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_bicubic2d_out_cpu
CUDA: upsample_bicubic2d_out_cuda
-- func: upsample_bicubic2d(Tensor self, int[2] output_size, bool align_corners) -> Tensor
+- func: upsample_bicubic2d(Tensor self, int[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_bicubic2d_cpu
CUDA: upsample_bicubic2d_cuda
-- func: upsample_bicubic2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_bicubic2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_bicubic2d_backward_out_cpu
CUDA: upsample_bicubic2d_backward_out_cuda
-- func: upsample_bicubic2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners) -> Tensor
+- func: upsample_bicubic2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_bicubic2d_backward_cpu
CUDA: upsample_bicubic2d_backward_cuda
-- func: upsample_trilinear3d.out(Tensor self, int[3] output_size, bool align_corners, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_trilinear3d.out(Tensor self, int[3] output_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_trilinear3d_out_cpu
CUDA: upsample_trilinear3d_out_cuda
-- func: upsample_trilinear3d(Tensor self, int[3] output_size, bool align_corners) -> Tensor
+- func: upsample_trilinear3d(Tensor self, int[3] output_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_trilinear3d_cpu
CUDA: upsample_trilinear3d_cuda
-- func: upsample_trilinear3d_backward.grad_input(Tensor grad_output, int[3] output_size, int[5] input_size, bool align_corners, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_trilinear3d_backward.grad_input(Tensor grad_output, int[3] output_size, int[5] input_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_trilinear3d_backward_out_cpu
CUDA: upsample_trilinear3d_backward_out_cuda
-- func: upsample_trilinear3d_backward(Tensor grad_output, int[3] output_size, int[5] input_size, bool align_corners) -> Tensor
+- func: upsample_trilinear3d_backward(Tensor grad_output, int[3] output_size, int[5] input_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_trilinear3d_backward_cpu
CUDA: upsample_trilinear3d_backward_cuda
-- func: upsample_nearest1d.out(Tensor self, int[1] output_size, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_nearest1d.out(Tensor self, int[1] output_size, float? scales=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest1d_out_cpu
CUDA: upsample_nearest1d_out_cuda
-- func: upsample_nearest1d(Tensor self, int[1] output_size) -> Tensor
+- func: upsample_nearest1d(Tensor self, int[1] output_size, float? scales=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest1d_cpu
CUDA: upsample_nearest1d_cuda
-- func: upsample_nearest1d_backward.grad_input(Tensor grad_output, int[1] output_size, int[3] input_size, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_nearest1d_backward.grad_input(Tensor grad_output, int[1] output_size, int[3] input_size, float? scales=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest1d_backward_out_cpu
CUDA: upsample_nearest1d_backward_out_cuda
-- func: upsample_nearest1d_backward(Tensor grad_output, int[1] output_size, int[3] input_size) -> Tensor
+- func: upsample_nearest1d_backward(Tensor grad_output, int[1] output_size, int[3] input_size, float? scales=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest1d_backward_cpu
CUDA: upsample_nearest1d_backward_cuda
-- func: upsample_nearest2d.out(Tensor self, int[2] output_size, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_nearest2d.out(Tensor self, int[2] output_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest2d_out_cpu
CUDA: upsample_nearest2d_out_cuda
-- func: upsample_nearest2d(Tensor self, int[2] output_size) -> Tensor
+- func: upsample_nearest2d(Tensor self, int[2] output_size, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest2d_cpu
CUDA: upsample_nearest2d_cuda
QuantizedCPU: quantized_upsample_nearest2d_cpu
-- func: upsample_nearest2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_nearest2d_backward.grad_input(Tensor grad_output, int[2] output_size, int[4] input_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest2d_backward_out_cpu
CUDA: upsample_nearest2d_backward_out_cuda
-- func: upsample_nearest2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size) -> Tensor
+- func: upsample_nearest2d_backward(Tensor grad_output, int[2] output_size, int[4] input_size, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest2d_backward_cpu
CUDA: upsample_nearest2d_backward_cuda
-- func: upsample_nearest3d.out(Tensor self, int[3] output_size, *, Tensor(a!) out) -> Tensor(a!)
+- func: upsample_nearest3d.out(Tensor self, int[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest3d_out_cpu
CUDA: upsample_nearest3d_out_cuda
-- func: upsample_nearest3d(Tensor self, int[3] output_size) -> Tensor
+- func: upsample_nearest3d(Tensor self, int[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest3d_cpu
CUDA: upsample_nearest3d_cuda
+ QuantizedCPU: quantized_upsample_nearest3d_cpu
-- func: upsample_nearest3d_backward.grad_input(Tensor grad_output, int[3] output_size, int[5] input_size, *, Tensor(a!) grad_input) -> Tensor(a!)
+- func: upsample_nearest3d_backward.grad_input(Tensor grad_output, int[3] output_size, int[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
CPU: upsample_nearest3d_backward_out_cpu
CUDA: upsample_nearest3d_backward_out_cuda
-- func: upsample_nearest3d_backward(Tensor grad_output, int[3] output_size, int[5] input_size) -> Tensor
+- func: upsample_nearest3d_backward(Tensor grad_output, int[3] output_size, int[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor
python_module: nn
dispatch:
CPU: upsample_nearest3d_backward_cpu
CUDA: upsample_nearest3d_backward_cuda
@@ -6252,19 +6391,16 @@
python_module: nn
- func: tanh_backward.grad_input(Tensor grad_output, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!)
python_module: nn
dispatch:
- CPU: legacy::cpu::_thnn_tanh_backward_out
- CUDA: legacy::cuda::_thnn_tanh_backward_out
+ CPU: tanh_backward_out
+ CUDA: tanh_backward_out
- func: tanh_backward(Tensor grad_output, Tensor output) -> Tensor
use_c10_dispatcher: full
python_module: nn
- dispatch:
- CPU: legacy::cpu::_thnn_tanh_backward
- CUDA: legacy::cuda::_thnn_tanh_backward
# What's a thnn_conv_ versus a slow_conv_?
#
# Historically, we have inefficient implementations of convolutions
# coming from the THNN/THCUNN library. These convolutions typically
@@ -6483,9 +6619,15 @@
dispatch:
CPU: im2col_backward_cpu
CUDA: im2col_backward_cuda
- func: isfinite(Tensor self) -> Tensor
+ use_c10_dispatcher: full
+ variants: function
+ device_guard: False
+ supports_named_tensor: True
+
+- func: isinf(Tensor self) -> Tensor
use_c10_dispatcher: full
variants: function
device_guard: False
supports_named_tensor: True