lib/torch/native/native_functions.yaml in torch-rb-0.1.7 vs lib/torch/native/native_functions.yaml in torch-rb-0.1.8

- old
+ new

@@ -35,70 +35,97 @@ - func: _cast_Half(Tensor self, bool non_blocking=False) -> Tensor use_c10_dispatcher: full variants: function -- func: backward(Tensor self, Tensor? gradient=None, bool keep_graph=False, bool create_graph=False) -> void +# 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) -> () variants: method -- func: set_data(Tensor(a!) self, Tensor new_data) -> void +# 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 variants: method - func: data(Tensor self) -> Tensor - use_c10_dispatcher: unboxed_only variants: method +# True if this `Variable` is a leaf and thus does not have a `grad_fn`. - func: is_leaf(Tensor self) -> bool 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, +# inputs and outputs switch meaning). For example: +# +# y0, y1, y2 = f(x) +# assert y0.output_nr == 0 +# assert y1.output_nr == 1 +# assert y2.output_nr == 2 +# - func: output_nr(Tensor self) -> int variants: method supports_named_tensor: True - func: _version(Tensor self) -> int variants: method +- func: requires_grad_(Tensor(a!) self, bool _requires_grad=True) -> Tensor(a!) + 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) variants: method supports_named_tensor: True -- func: align_to(Tensor(a) self, DimnameList names) -> Tensor(a) +- func: align_to(Tensor(a) self, Dimname[] names) -> Tensor(a) variants: method supports_named_tensor: True +- func: align_to.ellipsis_idx(Tensor(a) self, Dimname[] order, int ellipsis_idx) -> Tensor(a) + variants: method + supports_named_tensor: True + - func: align_as(Tensor self, Tensor other) -> Tensor - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: align_tensors(Tensor[] tensors) -> Tensor[] - use_c10_dispatcher: unboxed_only supports_named_tensor: True -- func: refine_names(Tensor(a) self, DimnameList names) -> Tensor(a) +- func: refine_names(Tensor(a) self, Dimname[] names) -> Tensor(a) variants: method supports_named_tensor: True -- func: unflatten(Tensor self, Dimname dim, int[] sizes, DimnameList names) -> Tensor +- func: unflatten.Dimname(Tensor self, Dimname dim, int[] sizes, Dimname[] names) -> Tensor variants: method supports_named_tensor: True -- func: unflatten(Tensor self, int dim, int[] sizes, DimnameList names) -> Tensor +- func: unflatten.int(Tensor self, int dim, int[] sizes, Dimname[] names) -> Tensor variants: method supports_named_tensor: True + +- func: _use_cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank) -> bool + dispatch: + CUDA: _use_cudnn_ctc_loss + - func: _cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CUDA: _cudnn_ctc_loss - 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 - use_c10_dispatcher: unboxed_only 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) dispatch: @@ -115,11 +142,10 @@ - func: _debug_has_internal_overlap(Tensor self) -> int use_c10_dispatcher: full variants: function - func: _fused_dropout(Tensor self, float p, Generator? generator=None) -> (Tensor, Tensor) - use_c10_dispatcher: 'unboxed_only' variants: function dispatch: CUDA: fused_dropout_cuda supports_named_tensor: True @@ -130,19 +156,16 @@ CUDA: masked_scale_cuda - func: _sobol_engine_draw(Tensor quasi, int n, Tensor sobolstate, int dimension, int num_generated, ScalarType? dtype) -> (Tensor, Tensor) - func: _sobol_engine_ff_(Tensor(a!) self, int n, Tensor sobolstate, int dimension, int num_generated) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: _sobol_engine_scramble_(Tensor(a!) self, Tensor ltm, int dimension) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: _sobol_engine_initialize_state_(Tensor(a!) self, int dimension) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: _reshape_from_tensor(Tensor self, Tensor shape) -> Tensor use_c10_dispatcher: full @@ -152,80 +175,103 @@ - func: dropout(Tensor input, float p, bool train) -> Tensor use_c10_dispatcher: full supports_named_tensor: True - func: dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True - func: feature_dropout(Tensor input, float p, bool train) -> Tensor use_c10_dispatcher: full - func: feature_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: alpha_dropout(Tensor input, float p, bool train) -> Tensor use_c10_dispatcher: full - func: alpha_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: feature_alpha_dropout(Tensor input, float p, bool train) -> Tensor use_c10_dispatcher: full - func: feature_alpha_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: abs(Tensor self) -> Tensor use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: abs_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - dispatch: - CPU: _abs__cpu - CUDA: _abs__cuda - func: abs.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True + +- func: angle(Tensor self) -> Tensor + 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: _abs_out_cpu - CUDA: _abs_out_cuda + CPU: _angle_out_cpu +- func: real(Tensor self) -> Tensor + variants: function, method + named_guard: False + 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 + 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 + 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 - func: acos_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _acos__cpu - CUDA: _acos__cuda - func: acos.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _acos_out_cpu - CUDA: _acos_out_cuda - func: avg_pool1d(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, bool ceil_mode=False, bool count_include_pad=True) -> Tensor - use_c10_dispatcher: unboxed_only - func: adaptive_avg_pool1d(Tensor self, int[1] output_size) -> Tensor - use_c10_dispatcher: unboxed_only # Return: (Tensor output, Tensor indices) - func: adaptive_max_pool1d(Tensor self, int[1] output_size) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor use_c10_dispatcher: full variants: function, method dispatch: @@ -235,11 +281,10 @@ SparseCUDA: add_sparse MkldnnCPU: mkldnn_add supports_named_tensor: True - func: add_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: add_ CUDA: add_ SparseCPU: add_sparse_ @@ -261,11 +306,10 @@ use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: add_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: addmv(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) -> Tensor use_c10_dispatcher: full @@ -274,11 +318,10 @@ CPU: legacy::cpu::_th_addmv CUDA: legacy::cuda::_th_addmv supports_named_tensor: True - func: addmv_(Tensor(a!) self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function, method dispatch: CPU: legacy::cpu::_th_addmv_ CUDA: legacy::cuda::_th_addmv_ supports_named_tensor: True @@ -292,21 +335,18 @@ - func: addr(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor use_c10_dispatcher: full variants: function, method - func: addr_(Tensor(a!) self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: addr.out(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) - func: affine_grid_generator(Tensor theta, int[] size, bool align_corners) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: affine_grid_generator_backward(Tensor grad, int[] size, bool align_corners) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: all.dim(Tensor self, int dim, bool keepdim=False) -> Tensor use_c10_dispatcher: full variants: function, method @@ -361,50 +401,40 @@ - func: argmin(Tensor self, int? dim=None, bool keepdim=False) -> Tensor use_c10_dispatcher: full variants: function, method - func: as_strided(Tensor(a) self, int[] size, int[] stride, int? storage_offset=None) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method dispatch: CPU: as_strided_tensorimpl CUDA: as_strided_tensorimpl QuantizedCPU: as_strided_qtensorimpl device_guard: False supports_named_tensor: True - func: as_strided_(Tensor(a!) self, int[] size, int[] stride, int? storage_offset=None) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False - func: asin(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: asin_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _asin__cpu - CUDA: _asin__cuda - func: asin.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _asin_out_cpu - CUDA: _asin_out_cuda - func: atan(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: atan_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _atan__cpu CUDA: _atan__cuda @@ -421,18 +451,16 @@ dispatch: CPU: baddbmm_cpu CUDA: baddbmm_cuda - func: baddbmm_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: baddbmm__cpu CUDA: baddbmm__cuda - func: _baddbmm_mkl_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function - func: baddbmm.out(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) variants: function dispatch: @@ -443,45 +471,41 @@ - 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: _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, int) +- 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, Tensor, Tensor) +- 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. - func: bernoulli(Tensor self, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: function, method supports_named_tensor: True - func: bernoulli.out(Tensor self, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) variants: function supports_named_tensor: True - func: bernoulli_.Tensor(Tensor(a!) self, Tensor p, *, Generator? generator=None) -> Tensor(a!) - use_c10_dispatcher: 'unboxed_only' variants: method dispatch: CPU: bernoulli_tensor_cpu_ CUDA: bernoulli_tensor_cuda_ supports_named_tensor: True - func: bernoulli_.float(Tensor(a!) self, float p=0.5, *, Generator? generator=None) -> Tensor(a!) - use_c10_dispatcher: 'unboxed_only' variants: method dispatch: CPU: bernoulli_scalar_cpu_ CUDA: bernoulli_scalar_cuda_ supports_named_tensor: True # This out-of-place version isn't used explicitly, but needed by jit. # There is no default valid on `p` here because it would introduce ambiguity # with `bernoulli(Tensor self, *, Generator? generator=None)` declaration. - func: bernoulli.p(Tensor self, float p, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: function, method - func: bilinear(Tensor input1, Tensor input2, Tensor weight, Tensor? bias) -> Tensor - func: binary_cross_entropy_with_logits(Tensor self, Tensor target, Tensor? weight=None, Tensor? pos_weight=None, int reduction=Mean) -> Tensor @@ -500,43 +524,38 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: bitwise_not_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method - func: bitwise_not.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: bitwise_not_out CUDA: bitwise_not_out - func: logical_not(Tensor self) -> Tensor - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: logical_not_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method - func: logical_not.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: logical_not_out CUDA: logical_not_out - func: logical_xor(Tensor self, Tensor other) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: logical_xor_(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: logical_xor.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) dispatch: @@ -562,15 +581,13 @@ CPU: bmm_out_cpu CUDA: bmm_out_cuda supports_named_tensor: True - func: broadcast_tensors(Tensor[] tensors) -> Tensor[] - use_c10_dispatcher: unboxed_only device_guard: False - func: cat(Tensor[] tensors, int dim=0) -> Tensor - use_c10_dispatcher: unboxed_only supports_named_tensor: True - func: cat.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -584,37 +601,33 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: ceil_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: ceil.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: ceil_out CUDA: ceil_out - func: chain_matmul(Tensor[] matrices) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: chunk(Tensor(a) self, int chunks, int dim=0) -> Tensor(a)[] - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: clamp(Tensor self, Scalar? min=None, Scalar? max=None) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: clamp_(Tensor(a!) self, Scalar? min=None, Scalar? max=None) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _clamp__cpu CUDA: _clamp__cuda @@ -629,11 +642,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: clamp_max_(Tensor(a!) self, Scalar max) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _clamp_max__cpu CUDA: _clamp_max__cuda @@ -648,11 +660,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: clamp_min_(Tensor(a!) self, Scalar min) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _clamp_min__cpu CUDA: _clamp_min__cuda @@ -666,11 +677,10 @@ - func: cudnn_is_acceptable(Tensor self) -> bool use_c10_dispatcher: full device_guard: False - func: constant_pad_nd(Tensor self, int[] pad, Scalar value=0) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: contiguous(Tensor self, *, MemoryFormat memory_format=contiguous_format) -> Tensor variants: method supports_named_tensor: True @@ -695,21 +705,19 @@ - func: conv_tbc(Tensor self, Tensor weight, Tensor bias, int pad=0) -> Tensor use_c10_dispatcher: full - func: conv_tbc_backward(Tensor self, Tensor input, Tensor weight, Tensor bias, int pad) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only # NB: we inherit the goofy argument order from PyTorch torch.nn.functional - func: conv_transpose1d(Tensor input, Tensor weight, Tensor? bias=None, int[1] stride=1, int[1] padding=0, int[1] output_padding=0, int groups=1, int[1] dilation=1) -> Tensor - 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!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False supports_named_tensor: True - func: _copy_from(Tensor self, Tensor dst, bool non_blocking=False) -> Tensor @@ -720,11 +728,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: cos_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _cos__cpu CUDA: _cos__cuda @@ -739,11 +746,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: cosh_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _cosh__cpu CUDA: _cosh__cuda @@ -766,77 +772,70 @@ - func: cudnn_affine_grid_generator_backward(Tensor grad, int N, int C, int H, int W) -> Tensor grad_theta use_c10_dispatcher: full dispatch: CUDA: cudnn_affine_grid_generator_backward -- func: cudnn_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor) +- func: cudnn_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor, Tensor) dispatch: CUDA: cudnn_batch_norm # 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, Tensor, Tensor) +- 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 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 - use_c10_dispatcher: unboxed_only 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) - use_c10_dispatcher: unboxed_only 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 - use_c10_dispatcher: unboxed_only 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 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) - use_c10_dispatcher: unboxed_only 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 - use_c10_dispatcher: unboxed_only 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 - use_c10_dispatcher: unboxed_only dispatch: CUDA: cudnn_convolution_transpose_backward_weight # NB: input is special cased in a way I don't quite understand - func: cudnn_grid_sampler(Tensor self, Tensor grid) -> Tensor output use_c10_dispatcher: full dispatch: CUDA: cudnn_grid_sampler_forward - func: cudnn_grid_sampler_backward(Tensor self, Tensor grid, Tensor grad_output) -> (Tensor grad_self, Tensor grad_grid) - use_c10_dispatcher: unboxed_only dispatch: CUDA: cudnn_grid_sampler_backward - func: cumsum(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor supports_named_tensor: True @@ -865,24 +864,21 @@ - func: cumprod.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 - use_c10_dispatcher: unboxed_only # 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 - func: _ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank=0, bool zero_infinity=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: ctc_loss_cpu CUDA: ctc_loss_gpu - func: _ctc_loss_backward(Tensor grad, Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, Tensor neg_log_likelihood, Tensor log_alpha, int blank, bool zero_infinity=False) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CPU: ctc_loss_backward_cpu CUDA: ctc_loss_backward_gpu - func: det(Tensor self) -> Tensor @@ -896,15 +892,13 @@ - func: diagflat(Tensor self, int offset=0) -> Tensor use_c10_dispatcher: full variants: function, method - func: diagonal(Tensor(a) self, int offset=0, int dim1=0, int dim2=1) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method - func: fill_diagonal_(Tensor(a!) self, Scalar fill_value, bool wrap=False) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: div.Tensor(Tensor self, Tensor other) -> Tensor use_c10_dispatcher: full variants: function, method @@ -914,11 +908,10 @@ SparseCPU: div_sparse SparseCUDA: div_sparse supports_named_tensor: True - func: div_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: div_ CUDA: div_ SparseCPU: div_sparse_ @@ -938,11 +931,10 @@ use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: div_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: dot(Tensor self, Tensor tensor) -> Tensor use_c10_dispatcher: full @@ -954,11 +946,10 @@ - func: dot.out(Tensor self, Tensor tensor, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - func: einsum(str equation, Tensor[] tensors) -> Tensor - use_c10_dispatcher: unboxed_only - func: embedding(Tensor weight, Tensor indices, int padding_idx=-1, bool scale_grad_by_freq=False, bool sparse=False) -> Tensor use_c10_dispatcher: full - func: embedding_backward(Tensor grad, Tensor indices, int num_weights, int padding_idx, bool scale_grad_by_freq, bool sparse) -> Tensor @@ -969,11 +960,10 @@ dispatch: CPU: embedding_dense_backward_cpu CUDA: embedding_dense_backward_cuda - func: embedding_renorm_(Tensor(a!) self, Tensor indices, float max_norm, float norm_type) -> Tensor(a!) - use_c10_dispatcher: unboxed_only dispatch: CPU: embedding_renorm_cpu_ CUDA: embedding_renorm_cuda_ - func: embedding_sparse_backward(Tensor grad, Tensor indices, int num_weights, int padding_idx, bool scale_grad_by_freq) -> Tensor @@ -1025,10 +1015,13 @@ variants: method - func: new_full(Tensor self, int[] size, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor variants: method +- func: new_zeros(Tensor self, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + # other overrides are to provide a more helpful error message that dtype is required - func: _empty_affine_quantized(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, float scale=1, int zero_point=0, MemoryFormat? memory_format=contiguous_format) -> Tensor dispatch: CPU: empty_affine_quantized_other_backends_stub QuantizedCPU: empty_affine_quantized_cpu @@ -1039,12 +1032,11 @@ category_override: factory dispatch: CPU: empty_per_channel_affine_quantized_other_backends_stub QuantizedCPU: empty_per_channel_affine_quantized_cpu -- func: resize_(Tensor(a!) self, int[] size) -> Tensor(a!) - use_c10_dispatcher: unboxed_only +- func: resize_(Tensor(a!) self, int[] size, *, MemoryFormat? memory_format=None) -> Tensor(a!) supports_named_tensor: True variants: method device_guard: False dispatch: CPU: resize_cpu_ @@ -1052,16 +1044,15 @@ 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) -> Tensor - use_c10_dispatcher: full +- func: empty_like(Tensor self, *, 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=contiguous_format) -> Tensor +- 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: @@ -1072,11 +1063,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: erf_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _erf__cpu CUDA: _erf__cuda @@ -1091,11 +1081,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: erfc_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _erfc__cpu CUDA: _erfc__cuda @@ -1110,11 +1099,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: exp_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _exp__cpu CUDA: _exp__cuda @@ -1129,22 +1117,20 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: expm1_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: expm1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: expm1_out CUDA: expm1_out - func: expand(Tensor(a) self, int[] size, *, bool implicit=False) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. device_guard: False supports_named_tensor: True - func: expand_as(Tensor self, Tensor other) -> Tensor @@ -1177,31 +1163,28 @@ - func: flatten.using_names(Tensor self, Dimname start_dim, Dimname end_dim, Dimname out_dim) -> Tensor variants: function, method supports_named_tensor: True -- func: flatten.DimnameList(Tensor self, DimnameList dims, Dimname out_dim) -> Tensor +- func: flatten.DimnameList(Tensor self, Dimname[] dims, Dimname out_dim) -> Tensor variants: function, method supports_named_tensor: True - func: fill_.Scalar(Tensor(a!) self, Scalar value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: fill_.Tensor(Tensor(a!) self, Tensor value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: floor(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: floor_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: floor.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -1213,34 +1196,28 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: frac_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _frac__cpu - CUDA: _frac__cuda - func: frac.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _frac_out_cpu - CUDA: _frac_out_cuda - func: full.names(int[] size, Scalar fill_value, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor device_guard: False - 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) -> Tensor - use_c10_dispatcher: full +- func: full_like(Tensor self, Scalar fill_value, *, 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) -> Tensor +- 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 @@ -1263,11 +1240,10 @@ dispatch: CPU: grid_sampler_2d_cpu CUDA: grid_sampler_2d_cuda - func: grid_sampler_2d_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: grid_sampler_2d_backward_cpu CUDA: grid_sampler_2d_backward_cuda - func: grid_sampler_3d(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor @@ -1275,11 +1251,10 @@ dispatch: CPU: grid_sampler_3d_cpu CUDA: grid_sampler_3d_cuda - func: grid_sampler_3d_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: grid_sampler_3d_backward_cpu CUDA: grid_sampler_3d_backward_cuda - func: hann_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor @@ -1324,15 +1299,13 @@ - func: rfft(Tensor self, int signal_ndim, bool normalized=False, bool onesided=True) -> Tensor use_c10_dispatcher: full variants: function, method - func: irfft(Tensor self, int signal_ndim, bool normalized=False, bool onesided=True, int[] signal_sizes=[]) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method - func: _fft_with_size(Tensor self, int signal_ndim, bool complex_input, bool complex_output, bool inverse, int[] checked_signal_sizes, bool normalized, bool onesided, int[] output_sizes) -> Tensor - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _fft_mkl CUDA: _fft_cufft @@ -1340,20 +1313,21 @@ use_c10_dispatcher: full - func: _cufft_get_plan_cache_max_size(int device_index) -> int use_c10_dispatcher: full -- func: _cufft_set_plan_cache_max_size(int device_index, int max_size) -> void +- func: _cufft_set_plan_cache_max_size(int device_index, int max_size) -> () + use_c10_dispatcher: unboxed_only -- func: _cufft_clear_plan_cache(int device_index) -> void +- func: _cufft_clear_plan_cache(int device_index) -> () + 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 - func: index_copy_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: index_copy(Tensor self, int dim, Tensor index, Tensor source) -> Tensor use_c10_dispatcher: full variants: function, method @@ -1442,11 +1416,10 @@ dispatch: CPU: kl_div_backward_cpu CUDA: kl_div_backward_cuda - func: kthvalue(Tensor self, int k, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: kthvalue.values(Tensor self, int k, int dim=-1, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True @@ -1464,41 +1437,36 @@ - func: layer_norm(Tensor input, int[] normalized_shape, Tensor? weight=None, Tensor? bias=None, float eps=1e-05, bool cudnn_enable=True) -> Tensor - func: native_layer_norm(Tensor input, Tensor? weight, Tensor? bias, int M, int N, float eps) -> (Tensor, Tensor, Tensor) dispatch: CPU: layer_norm_cpu + CUDA: layer_norm_cuda - func: native_layer_norm_backward(Tensor grad_out, Tensor input, Tensor mean, Tensor rstd, Tensor? weight, int M, int N, bool[3] output_mask) -> (Tensor, Tensor, Tensor) dispatch: CPU: layer_norm_backward_cpu + CUDA: layer_norm_backward_cuda -- func: native_layer_norm_double_backward(Tensor? ggI, Tensor? ggW, Tensor? ggb, Tensor gO, Tensor input, Tensor mean, Tensor rstd, Tensor? weight, int M, int N, bool[3] output_mask) -> (Tensor, Tensor, Tensor) - dispatch: - CPU: layer_norm_double_backward_cpu - - func: linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor python_module: nn - func: mkldnn_linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor python_module: nn dispatch: MkldnnCPU: mkldnn_linear - func: fbgemm_linear_int8_weight_fp32_activation(Tensor input, Tensor weight, Tensor packed, Tensor col_offsets, Scalar weight_scale, Scalar weight_zero_point, Tensor bias) -> Tensor - use_c10_dispatcher: unboxed_only - func: fbgemm_linear_int8_weight(Tensor input, Tensor weight, Tensor packed, Tensor col_offsets, Scalar weight_scale, Scalar weight_zero_point, Tensor bias) -> Tensor use_c10_dispatcher: full - func: fbgemm_linear_quantize_weight(Tensor input) -> (Tensor, Tensor, float, int) - use_c10_dispatcher: unboxed_only - func: fbgemm_pack_gemm_matrix_fp16(Tensor input) -> Tensor use_c10_dispatcher: full - func: fbgemm_linear_fp16_weight_fp32_activation(Tensor input, Tensor packed_weight, Tensor bias) -> Tensor - use_c10_dispatcher: unboxed_only - func: fbgemm_linear_fp16_weight(Tensor input, Tensor packed_weight, Tensor bias) -> Tensor use_c10_dispatcher: full - func: fbgemm_pack_quantized_matrix(Tensor input) -> Tensor @@ -1518,11 +1486,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: log_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: log.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -1534,64 +1501,55 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: log10_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _log10__cpu - CUDA: _log10__cuda - func: log10.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: - CPU: _log10_out_cpu - CUDA: _log10_out_cuda + CPU: log10_out + CUDA: log10_out - func: log1p(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: log1p_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: - CPU: _log1p__cpu - CUDA: _log1p__cuda + CPU: log1p_ + CUDA: log1p_ SparseCPU: log1p_sparse_ SparseCUDA: log1p_sparse_ - func: log1p.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: - CPU: _log1p_out_cpu - CUDA: _log1p_out_cuda + CPU: log1p_out + CUDA: log1p_out SparseCPU: log1p_out_sparse SparseCUDA: log1p_out_sparse - func: log2(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: log2_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _log2__cpu - CUDA: _log2__cuda - func: log2.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: - CPU: _log2_out_cpu - CUDA: _log2_out_cuda + CPU: log2_out + CUDA: log2_out - func: logdet(Tensor self) -> Tensor use_c10_dispatcher: full variants: function, method @@ -1601,15 +1559,15 @@ dispatch: CPU: logspace_cpu_out CUDA: logspace_cuda_out # log_softmax allows positional dtype, unlike most operators, because kwonly is BC-breaking when loading jit models. -- func: log_softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor +- func: log_softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor variants: function, method supports_named_tensor: True -- func: log_softmax(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor +- func: log_softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor variants: function, method supports_named_tensor: True - func: _log_softmax(Tensor self, int dim, bool half_to_float) -> Tensor use_c10_dispatcher: full @@ -1622,11 +1580,10 @@ dispatch: CPU: log_softmax_backward_cpu CUDA: log_softmax_backward_cuda - func: logsumexp(Tensor self, int[1] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: logsumexp.out(Tensor self, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -1658,19 +1615,17 @@ - func: matrix_power(Tensor self, int n) -> Tensor use_c10_dispatcher: full variants: function, method - func: max.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: max.dim_max(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) max, Tensor(b!) max_values) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True - func: max_values(Tensor self, int[1] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method - func: max.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) variants: function, method supports_named_tensor: True @@ -1681,32 +1636,26 @@ - 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) - use_c10_dispatcher: unboxed_only - 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 - use_c10_dispatcher: unboxed_only - 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 - use_c10_dispatcher: unboxed_only - 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 - use_c10_dispatcher: unboxed_only requires_tensor: True dispatch: MkldnnCPU: mkldnn_max_pool2d - func: quantized_max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor - use_c10_dispatcher: unboxed_only 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 - use_c10_dispatcher: unboxed_only # 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 @@ -1732,22 +1681,15 @@ QuantizedCPU: quantized_mean_out_cpu - func: mean.names_dim(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor variants: function, method supports_named_tensor: True - dispatch: - CPU: mean_cpu_gpu - CUDA: mean_cpu_gpu - func: mean.names_out(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: mean_out_cpu_gpu - CUDA: mean_out_cpu_gpu - func: median.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: median.dim_values(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True @@ -1758,19 +1700,17 @@ - func: median.names_dim_values(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True - func: min.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: min.dim_min(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) min, Tensor(b!) min_indices) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True - func: min_values(Tensor self, int[1] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method - func: min.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) variants: function, method supports_named_tensor: True @@ -1782,17 +1722,14 @@ variants: function, method - func: mkldnn_convolution(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] stride, int[] dilation, int groups) -> Tensor - func: mkldnn_convolution_backward_input(int[] self_size, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool bias_defined) -> Tensor - use_c10_dispatcher: unboxed_only - func: mkldnn_convolution_backward_weights(int[] weight_size, Tensor grad_output, Tensor self, int[] padding, int[] stride, int[] dilation, int groups, bool bias_defined) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: mkldnn_convolution_backward(Tensor self, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: miopen_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor) dispatch: CUDA: miopen_batch_norm @@ -1803,66 +1740,57 @@ - func: miopen_convolution(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor dispatch: CUDA: miopen_convolution - func: miopen_convolution_backward_input(int[] self_size, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_backward_input - func: miopen_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) - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_backward - func: miopen_convolution_backward_bias(Tensor grad_output) -> Tensor use_c10_dispatcher: full dispatch: CUDA: miopen_convolution_backward_bias - func: miopen_convolution_backward_weight(int[] weight_size, Tensor grad_output, Tensor self, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_backward_weight - func: miopen_convolution_transpose(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] output_padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor dispatch: CUDA: miopen_convolution_transpose # NB: output_padding not strictly needed here, but it's helpful for the float # backwards - func: miopen_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) - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_transpose_backward - func: miopen_convolution_transpose_backward_input(Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_transpose_backward_input - func: miopen_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 - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_convolution_transpose_backward_weight - func: miopen_depthwise_convolution(Tensor self, Tensor weight, Tensor? bias, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor dispatch: CUDA: miopen_depthwise_convolution - func: miopen_depthwise_convolution_backward_input(int[] self_size, Tensor grad_output, Tensor weight, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_depthwise_convolution_backward_input - func: miopen_depthwise_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) - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_depthwise_convolution_backward - func: miopen_depthwise_convolution_backward_weight(int[] weight_size, Tensor grad_output, Tensor self, int[] padding, int[] stride, int[] dilation, int groups, bool benchmark, bool deterministic) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CUDA: miopen_depthwise_convolution_backward_weight - func: miopen_rnn(Tensor input, Tensor[] weight, int weight_stride0, 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) dispatch: @@ -1892,11 +1820,10 @@ - func: _sparse_mm(Tensor sparse, Tensor dense) -> Tensor use_c10_dispatcher: full - func: mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: mode.values(Tensor self, int dim=-1, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) supports_named_tensor: True @@ -1918,11 +1845,10 @@ SparseCUDA: mul_sparse MkldnnCPU: mkldnn_mul supports_named_tensor: True - func: mul_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: mul_ CUDA: mul_ SparseCPU: mul_sparse_ @@ -1943,11 +1869,10 @@ - func: mul.Scalar(Tensor self, Scalar other) -> Tensor use_c10_dispatcher: full variants: function, method - func: mul_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: mv(Tensor self, Tensor vec) -> Tensor use_c10_dispatcher: full variants: function, method @@ -1965,11 +1890,10 @@ - func: mvlgamma(Tensor self, int p) -> Tensor use_c10_dispatcher: full variants: function, method - func: mvlgamma_(Tensor(a!) self, int p) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: narrow_copy(Tensor self, int dim, int start, int length) -> Tensor use_c10_dispatcher: full variants: method @@ -1978,11 +1902,10 @@ CUDA: narrow_copy_dense SparseCPU: narrow_copy_sparse SparseCUDA: narrow_copy_sparse - func: narrow(Tensor(a) self, int dim, int start, int length) -> Tensor(a) - use_c10_dispatcher: unboxed_only 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) @@ -1990,18 +1913,21 @@ CPU: batch_norm_cpu CUDA: batch_norm_cuda MkldnnCPU: mkldnn_batch_norm - func: batch_norm_stats(Tensor input, float eps) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CUDA: batch_norm_stats_cuda - func: batch_norm_elemt(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor invstd, float eps) -> Tensor dispatch: CUDA: batch_norm_elemt_cuda +- func: batch_norm_elemt.out(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor invstd, float eps, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CUDA: batch_norm_elemt_cuda_out + # for backward compatibility - func: batch_norm_gather_stats(Tensor input, Tensor mean, Tensor invstd, Tensor? running_mean, Tensor? running_var, float momentum, float eps, int count) -> (Tensor, Tensor) dispatch: CUDA: batch_norm_gather_stats_cuda @@ -2028,42 +1954,41 @@ CUDA: batch_norm_update_stats_cuda - func: _nnpack_available() -> bool use_c10_dispatcher: full -- func: _nnpack_spatial_convolution(Tensor input, Tensor weight, Tensor? bias, int[2] padding) -> Tensor +- func: _nnpack_spatial_convolution(Tensor input, Tensor weight, Tensor? bias, int[2] padding, int[2] stride=1) -> Tensor variants: function - func: _nnpack_spatial_convolution_backward(Tensor input, Tensor grad_output, Tensor weight, int[2] padding, bool[3] output_mask) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function - func: _nnpack_spatial_convolution_backward_input(Tensor input, Tensor grad_output, Tensor weight, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: _nnpack_spatial_convolution_backward_weight(Tensor input, int[] weightsize, Tensor grad_output, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: ones.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor device_guard: False - 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) -> Tensor - use_c10_dispatcher: full +- func: ones_like(Tensor self, *, 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) -> Tensor +- 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) -> Tensor +- func: cdist(Tensor x1, Tensor x2, float p=2, int? compute_mode=None) -> 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 - func: pdist(Tensor self, float p=2) -> Tensor @@ -2078,22 +2003,20 @@ - func: cosine_similarity(Tensor x1, Tensor x2, int dim=1, float eps=1e-08) -> Tensor use_c10_dispatcher: full variants: function - func: permute(Tensor(a) self, int[] dims) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. # Only exposed from C++ -- in Python, # we expose it as an attribute `T`, not a function. # # I'd like to name this "T" in C++ too, but # calling a native function "T" causes undefined # behavior on Windows, for reasons I don't understand # (maybe related to capital letter collation somehow...) - func: numpy_T(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method - func: pixel_shuffle(Tensor self, int upscale_factor) -> Tensor use_c10_dispatcher: full @@ -2128,14 +2051,15 @@ - 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) -> Tensor - use_c10_dispatcher: full +- func: rand_like(Tensor self, *, 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) -> Tensor +- 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 @@ -2149,19 +2073,17 @@ - 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) -> Tensor - use_c10_dispatcher: full +- func: randint_like(Tensor self, int high, *, MemoryFormat? memory_format=None) -> Tensor -- func: randint_like.low(Tensor self, int low, int high) -> Tensor - use_c10_dispatcher: full +- func: randint_like.low(Tensor self, int low, int high, *, MemoryFormat? memory_format=None) -> Tensor -- func: randint_like.dtype(Tensor self, int high, *, ScalarType dtype, Layout layout, Device device, bool pin_memory=False) -> 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) -> 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 @@ -2173,14 +2095,15 @@ - 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) -> Tensor - use_c10_dispatcher: full +- func: randn_like(Tensor self, *, 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) -> Tensor +- 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 @@ -2204,11 +2127,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: reciprocal_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _reciprocal__cpu CUDA: _reciprocal__cuda @@ -2223,22 +2145,20 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: neg_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: neg.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: neg_out CUDA: neg_out - func: repeat(Tensor self, int[] repeats) -> Tensor - use_c10_dispatcher: unboxed_only variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. - func: repeat_interleave.Tensor(Tensor repeats) -> Tensor use_c10_dispatcher: full variants: function @@ -2253,17 +2173,15 @@ - func: repeat_interleave.self_int(Tensor self, int repeats, int? dim=None) -> Tensor use_c10_dispatcher: full variants: function, method - func: reshape(Tensor self, int[] shape) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: _mkldnn_reshape(Tensor self, int[] shape) -> Tensor - use_c10_dispatcher: unboxed_only device_guard: False requires_tensor: True dispatch: MkldnnCPU: mkldnn_reshape @@ -2276,25 +2194,22 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: round_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: round.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: round_out CUDA: round_out - func: rrelu(Tensor self, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' - func: rrelu_(Tensor(a!) self, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor(a!) - use_c10_dispatcher: 'unboxed_only' - func: relu(Tensor self) -> Tensor use_c10_dispatcher: full variants: function, method dispatch: @@ -2303,11 +2218,10 @@ MkldnnCPU: mkldnn_relu QuantizedCPU: quantized_relu supports_named_tensor: True - func: relu_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: relu_ CUDA: relu_ @@ -2320,11 +2234,10 @@ dispatch: CPU: prelu_cpu CUDA: prelu_cuda - func: prelu_backward(Tensor grad_output, Tensor self, Tensor weight) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function, method dispatch: CPU: prelu_backward_cpu CUDA: prelu_backward_cuda @@ -2360,11 +2273,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: rsqrt_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: rsqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -2376,26 +2288,23 @@ variants: function, method device_guard: False supports_named_tensor: True - func: select.int(Tensor(a) self, int dim, int index) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: selu(Tensor self) -> Tensor use_c10_dispatcher: full - func: selu_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: celu(Tensor self, Scalar alpha=1.0) -> Tensor use_c10_dispatcher: full - func: celu_(Tensor(a!) self, Scalar alpha=1.0) -> Tensor(a!) - use_c10_dispatcher: unboxed_only - func: sigmoid(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True @@ -2404,69 +2313,67 @@ CPU: sigmoid CUDA: sigmoid MkldnnCPU: mkldnn_sigmoid - func: sigmoid_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: - CPU: _sigmoid__cpu - CUDA: _sigmoid__cuda + CPU: sigmoid_ + CUDA: sigmoid_ MkldnnCPU: mkldnn_sigmoid_ - func: sigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _sigmoid_out_cpu - CUDA: _sigmoid_out_cuda - func: sin(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: sin_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _sin__cpu - CUDA: _sin__cuda - func: sin.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: - CPU: _sin_out_cpu - CUDA: _sin_out_cuda + CPU: sin_out + CUDA: sin_out - func: sinh(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: sinh_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _sinh__cpu - CUDA: _sinh__cuda - func: sinh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _sinh_out_cpu - CUDA: _sinh_out_cuda +# Returns a copy of this `Variable` that is detached from its autograd graph. +# This method is OK to call if the `Variable` is a view. +# +# NOTE: Previously, if we change the tensor metadata (e.g. sizes / strides / +# storage / storage_offset) of a tensor created from `detach()`, those metadata +# in the original tensor will also be updated. However, the new behavior is that +# those metadata changes to the detached tensor will not update the original tensor +# anymore, and in the `detach()` function we need to set `allow_tensor_metadata_change_` +# 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 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!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: size.int(Tensor self, int dim) -> int use_c10_dispatcher: full @@ -2478,29 +2385,27 @@ variants: function, method device_guard: False supports_named_tensor: True - func: slice.Tensor(Tensor(a) self, int dim=0, int start=0, int end=9223372036854775807, int step=1) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: slogdet(Tensor self) -> (Tensor sign, Tensor logabsdet) - use_c10_dispatcher: unboxed_only variants: function, method - func: smm(Tensor self, Tensor mat2) -> Tensor use_c10_dispatcher: full variants: function, method # softmax allows positional dtype, unlike most operators, because kwonly is BC-breaking when loading jit models. -- func: softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor +- func: softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor variants: function, method supports_named_tensor: True -- func: softmax(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor +- func: softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor variants: function, method supports_named_tensor: True - func: _softmax(Tensor self, int dim, bool half_to_float) -> Tensor use_c10_dispatcher: full @@ -2514,45 +2419,39 @@ dispatch: CPU: softmax_backward_cpu CUDA: softmax_backward_cuda - func: split.Tensor(Tensor(a) self, int split_size, int dim=0) -> Tensor(a)[] - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: split_with_sizes(Tensor self, int[] split_sizes, int dim=0) -> Tensor[] - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: squeeze(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method device_guard: False - func: squeeze.dim(Tensor(a) self, int dim) -> Tensor(a) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method device_guard: False - func: squeeze.dimname(Tensor(a) self, Dimname dim) -> Tensor(a) supports_named_tensor: True variants: function, method device_guard: False - func: squeeze_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False - func: squeeze_.dim(Tensor(a!) self, int dim) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False - func: squeeze_.dimname(Tensor(a!) self, Dimname dim) -> Tensor(a!) variants: method @@ -2568,11 +2467,10 @@ CUDA: _sspaddmm_out_only_sparse_cuda SparseCPU: _sspaddmm_out_cpu SparseCUDA: _sspaddmm_out_cuda - func: stack(Tensor[] tensors, int dim=0) -> Tensor - use_c10_dispatcher: unboxed_only - func: stack.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) # The signature is designed to be consistent with librosa except that it is # missing the `pad_mode` and `center` arguments, which are taken care of at @@ -2609,50 +2507,39 @@ - func: sum.DimnameList_out(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - func: sum_to_size(Tensor self, int[] size) -> Tensor - use_c10_dispatcher: unboxed_only variants: method device_guard: False - func: sqrt(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: sqrt_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - dispatch: - CPU: _sqrt__cpu - CUDA: _sqrt__cuda - func: sqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - dispatch: - CPU: _sqrt_out_cpu - CUDA: _sqrt_out_cuda - func: std(Tensor self, bool unbiased=True) -> Tensor use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: std.dim(Tensor self, int[1] dim, bool unbiased=True, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: std_mean(Tensor self, bool unbiased=True) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function supports_named_tensor: True - func: std_mean.dim(Tensor self, int[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function supports_named_tensor: True - func: std_mean.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) variants: function @@ -2686,27 +2573,24 @@ - func: prod.Dimname_out(Tensor self, Dimname dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - func: t(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only device_guard: False variants: function, method supports_named_tensor: True - func: t_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only device_guard: False variants: method - func: tan(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: tan_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _tan__cpu CUDA: _tan__cuda @@ -2721,11 +2605,10 @@ use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: tanh_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method dispatch: CPU: _tanh__cpu CUDA: _tanh__cuda @@ -2735,21 +2618,19 @@ dispatch: CPU: _tanh_out_cpu CUDA: _tanh_out_cuda - func: tensordot(Tensor self, Tensor other, int[] dims_self, int[] dims_other) -> Tensor - use_c10_dispatcher: unboxed_only variants: function # TODO: namespace threshold in 'nn' - func: threshold(Tensor self, Scalar threshold, Scalar value) -> Tensor use_c10_dispatcher: full variants: function supports_named_tensor: True - func: threshold_(Tensor(a!) self, Scalar threshold, Scalar value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function supports_named_tensor: True - func: threshold.out(Tensor self, Scalar threshold, Scalar value, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -2757,11 +2638,10 @@ - func: threshold_backward(Tensor grad_output, Tensor self, Scalar threshold) -> Tensor use_c10_dispatcher: full variants: function - func: transpose.int(Tensor(a) self, int dim0, int dim1) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False supports_named_tensor: True - func: transpose.Dimname(Tensor(a) self, Dimname dim0, Dimname dim1) -> Tensor(a) @@ -2775,16 +2655,14 @@ requires_tensor: True dispatch: MkldnnCPU: mkldnn_transpose - func: transpose_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False - func: _mkldnn_transpose_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only device_guard: False requires_tensor: True dispatch: MkldnnCPU: mkldnn_transpose_ @@ -2792,48 +2670,43 @@ use_c10_dispatcher: full python_module: nn variants: function - func: flip(Tensor self, int[] dims) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method dispatch: CPU: flip_cpu CUDA: flip_cuda - func: roll(Tensor self, int[1] shifts, int[1] dims=[]) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method dispatch: CPU: roll_cpu CUDA: roll_cuda # default int[] value [0,1] should not add space after comma, since native_parse.py uses ', ' to split args - func: rot90(Tensor self, int k=1, int[] dims=[0,1]) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method - func: trapz.x(Tensor y, Tensor x, *, int dim=-1) -> Tensor use_c10_dispatcher: full - func: trapz.dx(Tensor y, *, float dx=1, int dim=-1) -> Tensor use_c10_dispatcher: full - func: _trilinear(Tensor i1, Tensor i2, Tensor i3, int[] expand1, int[] expand2, int[] expand3, int[] sumdim, int unroll_dim=1) -> Tensor - use_c10_dispatcher: unboxed_only - 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: trunc(Tensor self) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method - func: trunc_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: function, method - func: trunc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -2848,68 +2721,59 @@ - func: _has_compatible_shallow_copy_type(Tensor self, Tensor from) -> bool use_c10_dispatcher: full variants: function - func: _unique(Tensor self, bool sorted=True, bool return_inverse=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _unique_cpu CUDA: _unique_cuda - func: unique_dim(Tensor self, int dim, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: unique_dim_cpu CUDA: unique_dim_cuda - func: unique_consecutive(Tensor self, bool return_inverse=False, bool return_counts=False, int? dim=None) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: unique_consecutive_cpu CUDA: unique_consecutive_cuda - func: unique_dim_consecutive(Tensor self, int dim, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: unique_dim_consecutive_cpu CUDA: unique_dim_consecutive_cuda # _unique and _unique_dim are fragile and modifying them easily cause internal break # the below operator is a temporary hack for adding return_counts support # Please don't rely on these two operators, they will be removed soon - func: _unique2(Tensor self, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _unique2_cpu CUDA: _unique2_cuda - func: _unsafe_view(Tensor self, int[] size) -> Tensor - use_c10_dispatcher: unboxed_only - func: unsqueeze(Tensor(a) self, int dim) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: function, method device_guard: False - func: unsqueeze_(Tensor(a!) self, int dim) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False - func: var(Tensor self, bool unbiased=True) -> Tensor use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: var.dim(Tensor self, int[1] dim, bool unbiased=True, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: var.out(Tensor self, int[1] dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -2920,16 +2784,14 @@ - func: var.names_out(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True - func: var_mean(Tensor self, bool unbiased=True) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function supports_named_tensor: True - func: var_mean.dim(Tensor self, int[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function supports_named_tensor: True - func: var_mean.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) variants: function @@ -2946,67 +2808,62 @@ - func: where.self(Tensor condition, Tensor self, Tensor other) -> Tensor use_c10_dispatcher: full variants: function, method - func: where(Tensor condition) -> Tensor[] - use_c10_dispatcher: unboxed_only 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 - use_c10_dispatcher: unboxed_only variants: function # VariableType::_weight_norm does not want to be given a gap in the autograd graph, # so we don't define "dispatch" variants for it. - func: _weight_norm(Tensor v, Tensor g, int dim=0) -> Tensor use_c10_dispatcher: full variants: function - func: _weight_norm_cuda_interface(Tensor v, Tensor g, int dim=0) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CUDA: weight_norm_cuda - func: _weight_norm_cuda_interface_backward(Tensor grad_w, Tensor saved_v, Tensor saved_g, Tensor saved_norms, int dim) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CUDA: weight_norm_cuda_backward - func: _weight_norm_differentiable_backward(Tensor grad_w, Tensor saved_v, Tensor saved_g, Tensor saved_norms, int dim) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function - func: zeros.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor device_guard: False - 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) -> Tensor - use_c10_dispatcher: full +- func: zeros_like(Tensor self, *, 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) -> Tensor +- 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 CUDA: _standard_gamma_grad_cuda - func: _standard_gamma(Tensor self, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: function dispatch: CPU: _s_gamma_cpu CUDA: _s_gamma_cuda @@ -3015,18 +2872,16 @@ dispatch: CPU: _dirichlet_grad_cpu CUDA: _dirichlet_grad_cuda - func: _sample_dirichlet(Tensor self, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: function dispatch: CPU: _s_dirichlet_cpu CUDA: _s_dirichlet_cuda - func: poisson(Tensor self, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' dispatch: CPU: _s_poisson_cpu CUDA: _s_poisson_cuda # When more variants get ported to native, this dispatch will get more @@ -3043,16 +2898,14 @@ use_c10_dispatcher: full - func: _sparse_sum.dtype(Tensor self, *, ScalarType dtype) -> Tensor - func: _sparse_sum.dim(Tensor self, int[1] dim) -> Tensor - use_c10_dispatcher: unboxed_only - func: _sparse_sum.dim_dtype(Tensor self, int[1] dim, *, ScalarType dtype) -> Tensor - func: _sparse_sum_backward(Tensor grad, Tensor self, int[] dim) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: SparseCPU: _sparse_sum_backward_cpu SparseCUDA: _sparse_sum_backward_cuda - func: norm.ScalarOpt_dtype(Tensor self, Scalar? p, *, ScalarType dtype) -> Tensor @@ -3064,11 +2917,10 @@ - func: norm.ScalarOpt_dim_dtype(Tensor self, Scalar? p, int[1] dim, bool keepdim, *, ScalarType dtype) -> Tensor variants: function, method - func: norm.ScalarOpt_dim(Tensor self, Scalar? p, int[1] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method - func: norm.dtype_out(Tensor self, Scalar? p, int[1] dim, bool keepdim, *, ScalarType dtype, Tensor(a!) out) -> Tensor(a!) - func: norm.out(Tensor self, Scalar? p, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) @@ -3086,11 +2938,10 @@ - func: frobenius_norm(Tensor self) -> Tensor use_c10_dispatcher: full variants: function - func: frobenius_norm.dim(Tensor self, int[1] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: frobenius_norm.out(Tensor self, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) variants: function @@ -3100,30 +2951,27 @@ - func: nuclear_norm.out(Tensor self, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) variants: function - func: nuclear_norm.dim(Tensor self, int[2] dim, bool keepdim=False) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: nuclear_norm.dim_out(Tensor self, int[2] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) variants: function -- func: clone(Tensor self) -> Tensor - use_c10_dispatcher: full +- func: clone(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor variants: function, method dispatch: CPU: clone CUDA: clone SparseCPU: clone_sparse SparseCUDA: clone_sparse MkldnnCPU: mkldnn_clone QuantizedCPU: quantized_clone supports_named_tensor: True -- func: resize_as_(Tensor(a!) self, Tensor the_template) -> Tensor(a!) - use_c10_dispatcher: unboxed_only +- func: resize_as_(Tensor(a!) self, Tensor the_template, *, MemoryFormat? memory_format=None) -> Tensor(a!) 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 @@ -3142,16 +2990,15 @@ CUDA: pow SparseCPU: pow_sparse_scalar SparseCUDA: pow_sparse_scalar - func: zero_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method, function dispatch: - CPU: legacy::cpu::_th_zero_ - CUDA: legacy::cuda::_th_zero_ + CPU: zero_ + CUDA: zero_ SparseCPU: zero_sparse_ SparseCUDA: zero_sparse_ MkldnnCPU: mkldnn_zero_ - func: sub.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) @@ -3171,11 +3018,10 @@ SparseCPU: sub_sparse SparseCUDA: sub_sparse supports_named_tensor: True - func: sub_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: sub_ CUDA: sub_ SparseCPU: sub_sparse_ @@ -3187,11 +3033,10 @@ use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: sub_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: rsub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor use_c10_dispatcher: full @@ -3227,11 +3072,10 @@ SparseCPU: addmm_sparse_dense_cpu SparseCUDA: addmm_sparse_dense_cuda supports_named_tensor: True - func: addmm_(Tensor(a!) self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_addmm_ CUDA: legacy::cuda::_th_addmm_ # Warning! For whatever reason, the inplace sparse addmm is NON @@ -3378,19 +3222,17 @@ SparseCPU: new_with_dims_and_tensor_sparse SparseCUDA: new_with_dims_and_tensor_sparse requires_tensor: True - func: sparse_resize_(Tensor(a!) self, int[] size, int sparse_dim, int dense_dim) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: sparse_resize_ SparseCUDA: sparse_resize_ requires_tensor: True - func: sparse_resize_and_clear_(Tensor(a!) self, int[] size, int sparse_dim, int dense_dim) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: sparse_resize_and_clear_ SparseCUDA: sparse_resize_and_clear_ requires_tensor: True @@ -3486,20 +3328,18 @@ device_guard: False supports_named_tensor: True - func: _indices(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: _indices_sparse SparseCUDA: _indices_sparse requires_tensor: True device_guard: False - func: _values(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: _values_sparse SparseCUDA: _values_sparse requires_tensor: True @@ -3507,29 +3347,26 @@ # This method doesn't do any check but only directly sets the flag. So it can be # a bit unsafe. Similar to _indices and _values, this is useful for implementing # custom sparse operations in Python/C++ extension. - func: _coalesced_(Tensor(a!) self, bool coalesced) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: _coalesced_sparse_ SparseCUDA: _coalesced_sparse_ requires_tensor: True device_guard: False - func: indices(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: indices_sparse SparseCUDA: indices_sparse requires_tensor: True device_guard: False - func: values(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method dispatch: SparseCPU: values_sparse SparseCUDA: values_sparse requires_tensor: True @@ -3548,25 +3385,17 @@ SparseCPU: hspmm_sparse_cpu SparseCUDA: hspmm_sparse_cuda requires_tensor: True - func: copy_sparse_to_sparse_(Tensor(a!) self, Tensor src, bool non_blocking=False) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: function dispatch: SparseCPU: copy_sparse_ SparseCUDA: copy_sparse_ requires_tensor: True -- func: numel(Tensor self) -> int - use_c10_dispatcher: full - variants: function, method - device_guard: False - supports_named_tensor: True - - func: unbind.int(Tensor(a) self, int dim=0) -> Tensor(a)[] - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: unbind.Dimname(Tensor(a) self, Dimname dim) -> Tensor(a)[] variants: function, method @@ -3591,11 +3420,10 @@ variants: method dispatch: CPU: dense_to_mkldnn - func: mkldnn_reorder_conv2d_weight(Tensor self, int[2] padding=0, int[2] stride=1, int[2] dilation=1, int groups=1) -> Tensor - use_c10_dispatcher: unboxed_only variants: function python_module: nn dispatch: MkldnnCPU: mkldnn_reorder_conv2d_weight @@ -3629,17 +3457,15 @@ variants: function, method dispatch: QuantizedCPU: q_zero_point_quant - func: q_per_channel_scales(Tensor self) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method dispatch: QuantizedCPU: q_per_channel_scales_quant - func: q_per_channel_zero_points(Tensor self) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method dispatch: QuantizedCPU: q_per_channel_zero_points_quant - func: q_per_channel_axis(Tensor self) -> int @@ -3657,11 +3483,10 @@ use_c10_dispatcher: full dispatch: CPU: make_per_tensor_quantized_tensor_cpu - func: _make_per_channel_quantized_tensor(Tensor self, Tensor scale, Tensor zero_point, int axis) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CPU: make_per_channel_quantized_tensor_cpu - func: qscheme(Tensor self) -> QScheme variants: method @@ -3694,35 +3519,32 @@ 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) -> Tensor +- 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 device_guard: False supports_named_tensor: True -- func: to.device(Tensor self, Device device, ScalarType dtype, bool non_blocking=False, bool copy=False) -> Tensor +- func: to.device(Tensor self, Device device, ScalarType dtype, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor variants: method device_guard: False supports_named_tensor: True -- func: to.dtype(Tensor self, ScalarType dtype, bool non_blocking=False, bool copy=False) -> Tensor +- func: to.dtype(Tensor self, ScalarType dtype, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor variants: method device_guard: False supports_named_tensor: True -- func: to.other(Tensor self, Tensor other, bool non_blocking=False, bool copy=False) -> Tensor - use_c10_dispatcher: full +- func: to.other(Tensor self, Tensor other, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor variants: method device_guard: False - func: meshgrid(Tensor[] tensors) -> Tensor[] - use_c10_dispatcher: unboxed_only - func: cartesian_prod(Tensor[] tensors) -> Tensor - use_c10_dispatcher: unboxed_only variants: function - func: combinations(Tensor self, int r=2, bool with_replacement=False) -> Tensor use_c10_dispatcher: full variants: function @@ -3772,40 +3594,31 @@ - func: _thnn_fused_gru_cell(Tensor input_gates, Tensor hidden_gates, Tensor hx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor) dispatch: CUDA: _thnn_fused_gru_cell_cuda - func: _thnn_fused_gru_cell_backward(Tensor grad_hy, Tensor workspace, bool has_bias) -> (Tensor, Tensor, Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CUDA: _thnn_fused_gru_cell_backward_cuda - func: _thnn_differentiable_gru_cell_backward(Tensor grad_hy, Tensor input_gates, Tensor hidden_gates, Tensor hx, Tensor? input_bias, Tensor? hidden_bias) -> (Tensor, Tensor, Tensor, Tensor, Tensor) # RNN cells and layers - func: lstm.input(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: lstm.data(Tensor data, Tensor batch_sizes, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: gru.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: gru.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: rnn_tanh.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: rnn_tanh.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: rnn_relu.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: rnn_relu.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: lstm_cell(Tensor input, Tensor[] hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> (Tensor, Tensor) - func: gru_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> Tensor @@ -3814,21 +3627,20 @@ - func: rnn_relu_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> Tensor # Quantized RNN layers - func: quantized_lstm(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, ScalarType? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor) +- func: quantized_lstm.data(Tensor data, Tensor batch_sizes, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, *, ScalarType? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor) + # Quantized GRU layers - func: quantized_gru.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: quantized_gru.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only # Quantized RNN cells - func: quantized_lstm_cell(Tensor input, Tensor[] hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: quantized_gru_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor use_c10_dispatcher: full - func: quantized_rnn_relu_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor @@ -3837,49 +3649,44 @@ - func: quantized_rnn_tanh_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor use_c10_dispatcher: full # PackedSequence utilities - func: _pack_padded_sequence(Tensor input, Tensor lengths, bool batch_first) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only - func: _pack_padded_sequence_backward(Tensor grad, int[] input_size, Tensor batch_sizes, bool batch_first) -> Tensor - use_c10_dispatcher: unboxed_only - func: _pad_packed_sequence(Tensor data, Tensor batch_sizes, bool batch_first, Scalar padding_value, int total_length) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only # wrappers for legacy TH methods - func: set_.source_Storage(Tensor(a!) self, Storage source) -> Tensor(a!) variants: method device_guard: False dispatch: - CPU: legacy::cpu::_th_set_ - CUDA: legacy::cuda::_th_set_ + CPU: set_ + CUDA: set_ - func: set_.source_Storage_storage_offset(Tensor(a!) self, Storage source, int storage_offset, int[] size, int[] stride=[]) -> Tensor(a!) variants: method device_guard: False dispatch: CPU: legacy::cpu::_th_set_ CUDA: legacy::cuda::_th_set_ QuantizedCPU: set_storage - func: set_.source_Tensor(Tensor(a!) self, Tensor source) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method device_guard: False dispatch: CPU: legacy::cpu::_th_set_ CUDA: legacy::cuda::_th_set_ - func: set_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: - CPU: legacy::cpu::_th_set_ - CUDA: legacy::cuda::_th_set_ + CPU: set_cpu_ + CUDA: set_cuda_ - func: set_quantizer_(Tensor(a!) self, ConstQuantizerPtr quantizer) -> Tensor(a!) variants: method dispatch: QuantizedCPU: set_quantizer_ @@ -3887,15 +3694,14 @@ - func: is_set_to(Tensor self, Tensor tensor) -> bool use_c10_dispatcher: full variants: method device_guard: False dispatch: - CPU: legacy::cpu::_th_is_set_to - CUDA: legacy::cuda::_th_is_set_to + CPU: is_set_to + CUDA: is_set_to - func: masked_fill_.Scalar(Tensor(a!) self, Tensor mask, Scalar value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: masked_fill__cpu CUDA: masked_fill__cuda supports_named_tensor: True @@ -3904,11 +3710,10 @@ use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: masked_fill_.Tensor(Tensor(a!) self, Tensor mask, Tensor value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: masked_fill__cpu CUDA: masked_fill__cuda supports_named_tensor: True @@ -3917,106 +3722,98 @@ use_c10_dispatcher: full variants: function, method supports_named_tensor: True - func: masked_scatter_(Tensor(a!) self, Tensor mask, Tensor source) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: masked_scatter__cpu CUDA: masked_scatter__cuda - func: masked_scatter(Tensor self, Tensor mask, Tensor source) -> Tensor use_c10_dispatcher: full variants: function, method - func: view(Tensor(a) self, int[] size) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method device_guard: False dispatch: CPU: view CUDA: view MkldnnCPU: mkldnn_view QuantizedCPU: view - func: put_(Tensor(a!) self, Tensor index, Tensor source, bool accumulate=False) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_put_ CUDA: legacy::cuda::_th_put_ - func: index_add_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: - CPU: legacy::cpu::_th_index_add_ + CPU: index_add_cpu_ CUDA: legacy::cuda::_th_index_add_ - func: index_add(Tensor self, int dim, Tensor index, Tensor source) -> Tensor use_c10_dispatcher: full variants: function, method - func: index_add.dimname(Tensor self, Dimname dim, Tensor index, Tensor source) -> Tensor variants: function, method -- func: index_fill_.Scalar(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only +- func: index_fill_.int_Scalar(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!) variants: method supports_named_tensor: True dispatch: CPU: legacy::cpu::_th_index_fill_ CUDA: legacy::cuda::_th_index_fill_ -- func: index_fill.Scalar(Tensor self, int dim, Tensor index, Scalar value) -> Tensor +- func: index_fill.int_Scalar(Tensor self, int dim, Tensor index, Scalar value) -> Tensor use_c10_dispatcher: full supports_named_tensor: True variants: function, method -- func: index_fill_.Tensor(Tensor(a!) self, int dim, Tensor index, Tensor value) -> Tensor(a!) - use_c10_dispatcher: unboxed_only +- func: index_fill_.int_Tensor(Tensor(a!) self, int dim, Tensor index, Tensor value) -> Tensor(a!) variants: method dispatch: - CPU: legacy::cpu::_th_index_fill_ - CUDA: legacy::cuda::_th_index_fill_ + CPU: index_fill_ + CUDA: index_fill_ supports_named_tensor: True -- func: index_fill.Tensor(Tensor self, int dim, Tensor index, Tensor value) -> Tensor +- func: index_fill.int_Tensor(Tensor self, int dim, Tensor index, Tensor value) -> Tensor use_c10_dispatcher: full variants: function, method supports_named_tensor: True -- func: index_fill_.dimname_Scalar(Tensor(a!) self, Dimname dim, Tensor index, Scalar value) -> Tensor(a!) +- func: index_fill_.Dimname_Scalar(Tensor(a!) self, Dimname dim, Tensor index, Scalar value) -> Tensor(a!) variants: method supports_named_tensor: True -- func: index_fill_.dimname_Scalar(Tensor(a!) self, Dimname dim, Tensor index, Tensor value) -> Tensor(a!) +- func: index_fill_.Dimname_Tensor(Tensor(a!) self, Dimname dim, Tensor index, Tensor value) -> Tensor(a!) variants: method supports_named_tensor: True -- func: index_fill.dimname_Scalar(Tensor self, Dimname dim, Tensor index, Scalar value) -> Tensor +- func: index_fill.Dimname_Scalar(Tensor self, Dimname dim, Tensor index, Scalar value) -> Tensor variants: function, method supports_named_tensor: True -- func: index_fill.dimname_Tensor(Tensor self, Dimname dim, Tensor index, Tensor value) -> Tensor +- func: index_fill.Dimname_Tensor(Tensor self, Dimname dim, Tensor index, Tensor value) -> Tensor variants: function, method supports_named_tensor: True - func: scatter_.src(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_scatter_ 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!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_scatter_ CUDA: legacy::cuda::_th_scatter_ @@ -4029,11 +3826,10 @@ - func: scatter.dimname_value(Tensor self, Dimname dim, Tensor index, Scalar value) -> Tensor variants: function, method - func: scatter_add_(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_scatter_add_ CUDA: legacy::cuda::_th_scatter_add_ @@ -4043,55 +3839,43 @@ - func: scatter_add.dimname(Tensor self, Dimname dim, Tensor index, Tensor src) -> Tensor variants: function, method - func: lt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: lt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: gt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: gt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: le_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: le_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: ge_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: ge_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: eq_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: eq_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: ne_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: ne_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - func: __and__.Scalar(Tensor self, Scalar other) -> Tensor use_c10_dispatcher: full variants: method, function @@ -4105,18 +3889,16 @@ dispatch: CPU: legacy::cpu::_th_and CUDA: legacy::cuda::_th_and - func: __iand__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_iand_ CUDA: legacy::cuda::_th_iand_ - func: __iand__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_iand_ CUDA: legacy::cuda::_th_iand_ @@ -4133,50 +3915,58 @@ dispatch: CPU: legacy::cpu::_th_or CUDA: legacy::cuda::_th_or - func: __ior__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_ior_ CUDA: legacy::cuda::_th_ior_ - func: __ior__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only 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 + CUDA: bitwise_xor_out + +- func: bitwise_xor.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CPU: bitwise_xor_out + CUDA: bitwise_xor_out + +- func: bitwise_xor.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: bitwise_xor.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: bitwise_xor_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: bitwise_xor_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + - func: __xor__.Scalar(Tensor self, Scalar other) -> Tensor use_c10_dispatcher: full variants: method, function - dispatch: - CPU: legacy::cpu::_th_xor - CUDA: legacy::cuda::_th_xor - func: __xor__.Tensor(Tensor self, Tensor other) -> Tensor use_c10_dispatcher: full variants: method, function - dispatch: - CPU: legacy::cpu::_th_xor - CUDA: legacy::cuda::_th_xor - func: __ixor__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - dispatch: - CPU: legacy::cpu::_th_ixor_ - CUDA: legacy::cuda::_th_ixor_ - func: __ixor__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method - dispatch: - CPU: legacy::cpu::_th_ixor_ - CUDA: legacy::cuda::_th_ixor_ - func: __lshift__.Scalar(Tensor self, Scalar other) -> Tensor use_c10_dispatcher: full variants: method, function dispatch: @@ -4189,18 +3979,16 @@ dispatch: CPU: legacy::cpu::_th_lshift CUDA: legacy::cuda::_th_lshift - func: __ilshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_ilshift_ CUDA: legacy::cuda::_th_ilshift_ - func: __ilshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_ilshift_ CUDA: legacy::cuda::_th_ilshift_ @@ -4217,127 +4005,109 @@ dispatch: CPU: legacy::cpu::_th_rshift CUDA: legacy::cuda::_th_rshift - func: __irshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_irshift_ CUDA: legacy::cuda::_th_irshift_ - func: __irshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_irshift_ CUDA: legacy::cuda::_th_irshift_ - func: lgamma_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method dispatch: CPU: _lgamma__cpu CUDA: _lgamma__cuda - func: atan2_(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method - func: tril_(Tensor(a!) self, int diagonal=0) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: tril_cpu_ CUDA: tril_cuda_ - func: triu_(Tensor(a!) self, int diagonal=0) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: triu_cpu_ CUDA: triu_cuda_ - func: digamma_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method - func: polygamma_(Tensor(a!) self, int n) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method - func: renorm_(Tensor(a!) self, Scalar p, int dim, Scalar maxnorm) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_renorm_ CUDA: legacy::cuda::_th_renorm_ - func: pow_.Scalar(Tensor(a!) self, Scalar exponent) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method dispatch: CPU: pow_ CUDA: pow_ - func: pow_.Tensor(Tensor(a!) self, Tensor exponent) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method dispatch: CPU: pow_ CUDA: pow_ - func: lerp_.Scalar(Tensor(a!) self, Tensor end, Scalar weight) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: lerp_cpu_scalar_ CUDA: lerp_cuda_scalar_ - func: lerp_.Tensor(Tensor(a!) self, Tensor end, Tensor weight) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: lerp_cpu_tensor_ CUDA: lerp_cuda_tensor_ - func: fmod_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_fmod_ CUDA: legacy::cuda::_th_fmod_ - func: fmod_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_fmod_ CUDA: legacy::cuda::_th_fmod_ - func: remainder_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_remainder_ CUDA: legacy::cuda::_th_remainder_ - func: remainder_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_remainder_ CUDA: legacy::cuda::_th_remainder_ - func: addbmm_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method dispatch: CPU: legacy::cpu::_th_addbmm_ CUDA: legacy::cuda::_th_addbmm_ @@ -4352,79 +4122,70 @@ dispatch: CPU: legacy::cpu::_th_addbmm CUDA: legacy::cuda::_th_addbmm - func: addcdiv_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method + supports_named_tensor: True - func: random_.from(Tensor(a!) self, int from, int to, *, Generator? generator=None) -> Tensor(a!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' 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!) - use_c10_dispatcher: 'unboxed_only' variants: method dispatch: CPU: legacy::cpu::_th_geometric_ CUDA: geometric_cuda_ supports_named_tensor: True @@ -4732,11 +4493,10 @@ dispatch: CPU: legacy::cpu::_th_nonzero CUDA: legacy::cuda::_th_nonzero - func: nonzero_numpy(Tensor self) -> Tensor[] - use_c10_dispatcher: unboxed_only variants: method, function - func: gather.out(Tensor self, int dim, Tensor index, *, bool sparse_grad=False, Tensor(a!) out) -> Tensor(a!) dispatch: CPU: gather_out_cpu @@ -4756,58 +4516,57 @@ - func: _gather_sparse_backward(Tensor self, int dim, Tensor index, Tensor grad) -> Tensor use_c10_dispatcher: full - func: addcmul.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!) + supports_named_tensor: True - func: addcmul(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor use_c10_dispatcher: full variants: method, function + supports_named_tensor: True - func: addcmul_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method + supports_named_tensor: True - func: addcdiv.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!) + supports_named_tensor: True - func: addcdiv(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor use_c10_dispatcher: full variants: method, function + supports_named_tensor: True - func: lstsq.X(Tensor self, Tensor A, *, Tensor(a!) X, Tensor(b!) qr) -> (Tensor(a!) solution, Tensor(b!) QR) dispatch: CPU: legacy::cpu::_th_gels_out CUDA: legacy::cuda::_th_gels_out - func: lstsq(Tensor self, Tensor A) -> (Tensor solution, Tensor QR) - use_c10_dispatcher: unboxed_only variants: method, function dispatch: CPU: legacy::cpu::_th_gels CUDA: legacy::cuda::_th_gels - func: triangular_solve.X(Tensor self, Tensor A, bool upper=True, bool transpose=False, bool unitriangular=False, *, Tensor(a!) X, Tensor(b!) M) -> (Tensor(a!) solution, Tensor(b!) cloned_coefficient) - func: triangular_solve(Tensor self, Tensor A, bool upper=True, bool transpose=False, bool unitriangular=False) -> (Tensor solution, Tensor cloned_coefficient) - use_c10_dispatcher: unboxed_only variants: method, function - func: _triangular_solve_helper(Tensor self, Tensor A, bool upper, bool transpose, bool unitriangular) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _triangular_solve_helper_cpu CUDA: _triangular_solve_helper_cuda - func: symeig.e(Tensor self, bool eigenvectors=False, bool upper=True, *, Tensor(a!) e, Tensor(b!) V) -> (Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) - func: symeig(Tensor self, bool eigenvectors=False, bool upper=True) -> (Tensor eigenvalues, Tensor eigenvectors) - use_c10_dispatcher: unboxed_only variants: method, function - func: _symeig_helper(Tensor self, bool eigenvectors, bool upper) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _symeig_helper_cpu CUDA: _symeig_helper_cuda @@ -4815,24 +4574,21 @@ dispatch: CPU: legacy::cpu::_th_eig_out CUDA: legacy::cuda::_th_eig_out - func: eig(Tensor self, bool eigenvectors=False) -> (Tensor eigenvalues, Tensor eigenvectors) - use_c10_dispatcher: unboxed_only variants: method, function dispatch: CPU: legacy::cpu::_th_eig CUDA: legacy::cuda::_th_eig - func: svd.U(Tensor self, bool some=True, bool compute_uv=True, *, Tensor(a!) U, Tensor(b!) S, Tensor(c!) V) -> (Tensor(a!) U, Tensor(b!) S, Tensor(c!) V) - func: svd(Tensor self, bool some=True, bool compute_uv=True) -> (Tensor U, Tensor S, Tensor V) - use_c10_dispatcher: unboxed_only variants: method, function - func: _svd_helper(Tensor self, bool some, bool compute_uv) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _svd_helper_cpu CUDA: _svd_helper_cuda @@ -4861,17 +4617,15 @@ dispatch: CPU: _cholesky_solve_helper_cpu CUDA: _cholesky_solve_helper_cuda - func: solve(Tensor self, Tensor A) -> (Tensor solution, Tensor LU) - use_c10_dispatcher: unboxed_only variants: function, method - func: solve.solution(Tensor self, Tensor A, *, Tensor(a!) solution, Tensor(b!) lu) -> (Tensor(a!) solution, Tensor(b!) LU) - func: _solve_helper(Tensor self, Tensor A) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _solve_helper_cpu CUDA: _solve_helper_cuda @@ -4888,15 +4642,13 @@ CUDA: legacy::cuda::_th_potri - func: qr.Q(Tensor self, bool some=True, *, Tensor(a!) Q, Tensor(b!) R) -> (Tensor(a!) Q, Tensor(b!) R) - func: qr(Tensor self, bool some=True) -> (Tensor Q, Tensor R) - use_c10_dispatcher: unboxed_only variants: method, function - func: _qr_helper(Tensor self, bool some) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _qr_helper_cpu CUDA: _qr_helper_cuda @@ -4904,11 +4656,10 @@ dispatch: CPU: legacy::cpu::_th_geqrf_out CUDA: legacy::cuda::_th_geqrf_out - func: geqrf(Tensor self) -> (Tensor a, Tensor tau) - use_c10_dispatcher: unboxed_only variants: method, function dispatch: CPU: legacy::cpu::_th_geqrf CUDA: legacy::cuda::_th_geqrf @@ -4931,11 +4682,10 @@ variants: method, function dispatch: CPU: legacy::cpu::_th_ormqr - func: _lu_with_info(Tensor self, bool pivot=True, bool check_errors=True) -> (Tensor, Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: _lu_with_info_cpu CUDA: _lu_with_info_cuda @@ -4957,25 +4707,22 @@ dispatch: CPU: multinomial_out CUDA: multinomial_out - func: multinomial(Tensor self, int num_samples, bool replacement=False, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: method, function dispatch: CPU: multinomial CUDA: multinomial - func: _multinomial_alias_setup(Tensor probs) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only variants: function dispatch: CPU: legacy::cpu::_th_multinomial_alias_setup CUDA: legacy::cuda::_th_multinomial_alias_setup - func: _multinomial_alias_draw(Tensor J, Tensor q, int num_samples, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' variants: function dispatch: CPU: legacy::cpu::_th_multinomial_alias_draw CUDA: legacy::cuda::_th_multinomial_alias_draw @@ -5016,11 +4763,10 @@ dispatch: CPU: erfinv CUDA: erfinv - func: erfinv_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only supports_named_tensor: True variants: method dispatch: CPU: _erfinv__cpu CUDA: _erfinv__cuda @@ -5030,16 +4776,14 @@ dispatch: CPU: _erfinv_out_cpu CUDA: _erfinv_out_cuda - func: sign(Tensor self) -> Tensor - use_c10_dispatcher: unboxed_only variants: function, method supports_named_tensor: True - func: sign_(Tensor(a!) self) -> Tensor(a!) - use_c10_dispatcher: unboxed_only variants: method supports_named_tensor: True - func: sign.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True @@ -5200,11 +4944,10 @@ dispatch: CPU: legacy::cpu::_th_sort_out CUDA: legacy::cuda::_th_sort_out - func: sort(Tensor self, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only variants: method, function dispatch: CPU: legacy::cpu::_th_sort CUDA: legacy::cuda::_th_sort QuantizedCPU: sort_quant @@ -5225,11 +4968,10 @@ dispatch: CPU: topk_out_cpu CUDA: legacy::cuda::_th_topk_out - func: topk(Tensor self, int k, int dim=-1, bool largest=True, bool sorted=True) -> (Tensor values, Tensor indices) - use_c10_dispatcher: unboxed_only variants: method, function dispatch: CPU: topk CUDA: topk QuantizedCPU: quantized_topk_cpu @@ -5255,23 +4997,24 @@ dispatch: CPU: legacy::cpu::_th_renorm CUDA: legacy::cuda::_th_renorm - func: unfold(Tensor(a) self, int dimension, int size, int step) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method + device_guard: False dispatch: - CPU: legacy::cpu::_th_unfold - CUDA: legacy::cuda::_th_unfold + CPU: unfold + CUDA: unfold - func: equal(Tensor self, Tensor other) -> bool use_c10_dispatcher: full variants: method, function dispatch: CPU: legacy::cpu::_th_equal CUDA: legacy::cuda::_th_equal QuantizedCPU: quantized_equal + supports_named_tensor: True - func: pow.Tensor_Tensor_out(Tensor self, Tensor exponent, *, Tensor(a!) out) -> Tensor(a!) supports_named_tensor: True dispatch: CPU: pow_out @@ -5302,65 +5045,59 @@ dispatch: CPU: legacy::cpu::_th_normal_out CUDA: normal_out_cuda - func: normal.Tensor_float(Tensor mean, float std=1, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' dispatch: CPU: legacy::cpu::_th_normal 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 CUDA: normal_out_cuda - func: normal.float_Tensor(float mean, Tensor std, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' dispatch: CPU: legacy::cpu::_th_normal 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 CUDA: normal_out_cuda - func: normal.Tensor_Tensor(Tensor mean, Tensor std, *, Generator? generator=None) -> Tensor - use_c10_dispatcher: 'unboxed_only' dispatch: CPU: legacy::cpu::_th_normal 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!) - func: alias(Tensor(a) self) -> Tensor(a) - use_c10_dispatcher: unboxed_only variants: method, function supports_named_tensor: True - func: _addr(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor use_c10_dispatcher: full dispatch: CPU: legacy::cpu::_th_addr CUDA: legacy::cuda::_th_addr - func: _addr_(Tensor(a!) self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_addr_ CUDA: legacy::cuda::_th_addr_ - func: _addr.out(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) dispatch: CPU: legacy::cpu::_th_addr_out CUDA: legacy::cuda::_th_addr_out - func: _index_copy_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!) - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_index_copy_ CUDA: legacy::cuda::_th_index_copy_ - func: _cumsum(Tensor self, int dim) -> Tensor @@ -5398,44 +5135,40 @@ CPU: legacy::cpu::_th_std CUDA: legacy::cuda::_th_std supports_named_tensor: True - func: _cat(Tensor[] tensors, int dim=0) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_cat CUDA: legacy::cuda::_th_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 - func: _mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_mode CUDA: legacy::cuda::_th_mode - func: _mode.values(Tensor self, int dim=-1, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) dispatch: CPU: legacy::cpu::_th_mode_out CUDA: legacy::cuda::_th_mode_out - func: _max(Tensor self, int dim, bool keepdim=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_max CUDA: legacy::cuda::_th_max - func: _max.max(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) max, Tensor(b!) max_indices) -> (Tensor(a!), Tensor(b!)) dispatch: CPU: legacy::cpu::_th_max_out CUDA: legacy::cuda::_th_max_out - func: _min(Tensor self, int dim, bool keepdim=False) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only dispatch: CPU: legacy::cpu::_th_min CUDA: legacy::cuda::_th_min - func: _min.min(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) min, Tensor(b!) min_indices) -> (Tensor(a!), Tensor(b!)) @@ -5469,82 +5202,67 @@ 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 - dispatch: - CPU: legacy::cpu::_thnn_mse_loss_forward_out - CUDA: legacy::cuda::_thnn_mse_loss_forward_out - func: mse_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_mse_loss_forward - CUDA: legacy::cuda::_thnn_mse_loss_forward - func: mse_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_mse_loss_backward_out - CUDA: legacy::cuda::_thnn_mse_loss_backward_out + CPU: mse_loss_backward_out + CUDA: mse_loss_backward_out - func: mse_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor use_c10_dispatcher: full python_module: nn dispatch: - CPU: legacy::cpu::_thnn_mse_loss_backward - CUDA: legacy::cuda::_thnn_mse_loss_backward + CPU: mse_loss_backward + CUDA: mse_loss_backward - func: l1_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_l1_loss_forward_out - CUDA: legacy::cuda::_thnn_l1_loss_forward_out - func: l1_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_l1_loss_forward - CUDA: legacy::cuda::_thnn_l1_loss_forward - func: l1_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_l1_loss_backward_out - CUDA: legacy::cuda::_thnn_l1_loss_backward_out + CPU: l1_loss_backward_out + CUDA: l1_loss_backward_out - func: l1_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_l1_loss_backward - CUDA: legacy::cuda::_thnn_l1_loss_backward - func: multi_margin_loss.out(Tensor self, Tensor target, Scalar p=1, Scalar margin=1, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multi_margin_loss_forward_out + CPU: multi_margin_loss_cpu_out CUDA: legacy::cuda::_thnn_multi_margin_loss_forward_out - func: multi_margin_loss(Tensor self, Tensor target, Scalar p=1, Scalar margin=1, Tensor? weight=None, int reduction=Mean) -> Tensor python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multi_margin_loss_forward + CPU: multi_margin_loss_cpu CUDA: legacy::cuda::_thnn_multi_margin_loss_forward - func: multi_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Scalar p, Scalar margin, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) grad_input) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multi_margin_loss_backward_out + CPU: multi_margin_loss_cpu_backward_out CUDA: legacy::cuda::_thnn_multi_margin_loss_backward_out - func: multi_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, Scalar p, Scalar margin, Tensor? weight=None, int reduction=Mean) -> Tensor python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multi_margin_loss_backward + CPU: multi_margin_loss_cpu_backward CUDA: legacy::cuda::_thnn_multi_margin_loss_backward - func: multilabel_margin_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) python_module: nn @@ -5553,31 +5271,30 @@ python_module: nn - func: multilabel_margin_loss_forward.output(Tensor self, Tensor target, int reduction, *, Tensor(a!) output, Tensor(b!) is_target) -> (Tensor(a!), Tensor(b!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multilabel_margin_loss_forward_out + CPU: multilabel_margin_loss_forward_out_cpu CUDA: legacy::cuda::_thnn_multilabel_margin_loss_forward_out - func: multilabel_margin_loss_forward(Tensor self, Tensor target, int reduction) -> (Tensor output, Tensor is_target) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multilabel_margin_loss_forward + CPU: multilabel_margin_loss_forward_cpu CUDA: legacy::cuda::_thnn_multilabel_margin_loss_forward - func: multilabel_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, Tensor is_target, *, Tensor(a!) grad_input) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multilabel_margin_loss_backward_out + CPU: multilabel_margin_loss_backward_cpu_out CUDA: legacy::cuda::_thnn_multilabel_margin_loss_backward_out - func: multilabel_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, Tensor is_target) -> Tensor use_c10_dispatcher: full python_module: nn dispatch: - CPU: legacy::cpu::_thnn_multilabel_margin_loss_backward + CPU: multilabel_margin_loss_backward_cpu CUDA: legacy::cuda::_thnn_multilabel_margin_loss_backward - func: nll_loss.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, int ignore_index=-100, *, Tensor(a!) out) -> Tensor(a!) python_module: nn @@ -5585,29 +5302,29 @@ python_module: nn - func: nll_loss_forward.output(Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, *, Tensor(a!) output, Tensor(b!) total_weight) -> (Tensor(a!), Tensor(b!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss_forward_out + CPU: nll_loss_forward_out_cpu CUDA: legacy::cuda::_thnn_nll_loss_forward_out - func: nll_loss_forward(Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index) -> (Tensor output, Tensor total_weight) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss_forward + CPU: nll_loss_forward_cpu CUDA: legacy::cuda::_thnn_nll_loss_forward - func: nll_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, Tensor total_weight, *, Tensor(a!) grad_input) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss_backward_out + CPU: nll_loss_backward_out_cpu CUDA: legacy::cuda::_thnn_nll_loss_backward_out - func: nll_loss_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, Tensor total_weight) -> Tensor python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss_backward + CPU: nll_loss_backward_cpu CUDA: legacy::cuda::_thnn_nll_loss_backward - func: nll_loss2d.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, int ignore_index=-100, *, Tensor(a!) out) -> Tensor(a!) python_module: nn @@ -5615,56 +5332,50 @@ python_module: nn - func: nll_loss2d_forward.output(Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, *, Tensor(a!) output, Tensor(b!) total_weight) -> (Tensor(a!), Tensor(b!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss2d_forward_out + CPU: nll_loss2d_forward_out_cpu CUDA: legacy::cuda::_thnn_nll_loss2d_forward_out - func: nll_loss2d_forward(Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index) -> (Tensor output, Tensor total_weight) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss2d_forward + CPU: nll_loss2d_forward_cpu CUDA: legacy::cuda::_thnn_nll_loss2d_forward - func: nll_loss2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, Tensor total_weight, *, Tensor(a!) grad_input) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss2d_backward_out + CPU: nll_loss2d_backward_out_cpu CUDA: legacy::cuda::_thnn_nll_loss2d_backward_out - func: nll_loss2d_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, int ignore_index, Tensor total_weight) -> Tensor python_module: nn dispatch: - CPU: legacy::cpu::_thnn_nll_loss2d_backward + CPU: nll_loss2d_backward_cpu CUDA: legacy::cuda::_thnn_nll_loss2d_backward - func: smooth_l1_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_smooth_l1_loss_forward_out - CUDA: legacy::cuda::_thnn_smooth_l1_loss_forward_out + CPU: smooth_l1_loss_out + CUDA: smooth_l1_loss_out - func: smooth_l1_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_smooth_l1_loss_forward - CUDA: legacy::cuda::_thnn_smooth_l1_loss_forward - func: smooth_l1_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_smooth_l1_loss_backward_out - CUDA: legacy::cuda::_thnn_smooth_l1_loss_backward_out + CPU: smooth_l1_loss_backward_out + CUDA: smooth_l1_loss_backward_out - func: smooth_l1_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_smooth_l1_loss_backward - CUDA: legacy::cuda::_thnn_smooth_l1_loss_backward - 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 @@ -5715,11 +5426,10 @@ 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!) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: legacy::cpu::_thnn_elu_forward_ CUDA: legacy::cuda::_thnn_elu_forward_ @@ -5774,11 +5484,10 @@ 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!) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: legacy::cpu::_thnn_hardtanh_forward_ CUDA: legacy::cuda::_thnn_hardtanh_forward_ @@ -5807,11 +5516,10 @@ 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!) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: legacy::cpu::_thnn_leaky_relu_forward_ CUDA: legacy::cuda::_thnn_leaky_relu_forward_ @@ -5827,11 +5535,10 @@ dispatch: CPU: legacy::cpu::_thnn_log_sigmoid_forward_out CUDA: legacy::cuda::_thnn_log_sigmoid_forward_out - func: log_sigmoid_forward(Tensor self) -> (Tensor output, Tensor buffer) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: legacy::cpu::_thnn_log_sigmoid_forward CUDA: legacy::cuda::_thnn_log_sigmoid_forward @@ -5853,11 +5560,10 @@ dispatch: CPU: legacy::cpu::_thnn_rrelu_with_noise_forward_out 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 - use_c10_dispatcher: 'unboxed_only' python_module: nn dispatch: CPU: legacy::cpu::_thnn_rrelu_with_noise_forward CUDA: legacy::cuda::_thnn_rrelu_with_noise_forward @@ -5873,11 +5579,10 @@ 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!) - use_c10_dispatcher: 'unboxed_only' python_module: nn dispatch: CPU: legacy::cpu::_thnn_rrelu_with_noise_forward_ CUDA: legacy::cuda::_thnn_rrelu_with_noise_forward_ @@ -5939,21 +5644,18 @@ CPU: adaptive_avg_pool2d_out_cpu CUDA: adaptive_avg_pool2d_out_cuda MkldnnCPU: mkldnn_adaptive_avg_pool2d_out - func: adaptive_avg_pool2d(Tensor self, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn - func: mkldnn_adaptive_avg_pool2d(Tensor self, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: MkldnnCPU: mkldnn_adaptive_avg_pool2d requires_tensor: True - func: _adaptive_avg_pool2d(Tensor self, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only dispatch: CPU: adaptive_avg_pool2d_cpu CUDA: adaptive_avg_pool2d_cuda QuantizedCPU: quantized_adaptive_avg_pool2d @@ -5969,11 +5671,10 @@ dispatch: CPU: adaptive_avg_pool3d_out_cpu CUDA: adaptive_avg_pool3d_out_cuda - func: adaptive_avg_pool3d(Tensor self, int[3] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: adaptive_avg_pool3d_cpu CUDA: adaptive_avg_pool3d_cuda @@ -5997,11 +5698,10 @@ CPU: adaptive_max_pool2d_out_cpu CUDA: adaptive_max_pool2d_out_cuda # Return: (Tensor output, Tensor indices) - func: adaptive_max_pool2d(Tensor self, int[2] output_size) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: adaptive_max_pool2d_cpu CUDA: adaptive_max_pool2d_cuda @@ -6025,11 +5725,10 @@ CPU: adaptive_max_pool3d_out_cpu CUDA: adaptive_max_pool3d_out_cuda # Return: (Tensor output, Tensor indices) - func: adaptive_max_pool3d(Tensor self, int[3] output_size) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: adaptive_max_pool3d_cpu CUDA: adaptive_max_pool3d_cuda @@ -6052,11 +5751,10 @@ CPU: avg_pool2d_out_cpu CUDA: avg_pool2d_out_cuda MkldnnCPU: mkldnn_avg_pool2d_out - func: avg_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: avg_pool2d_cpu CUDA: avg_pool2d_cuda MkldnnCPU: mkldnn_avg_pool2d @@ -6067,11 +5765,10 @@ dispatch: CPU: avg_pool2d_backward_out_cpu CUDA: avg_pool2d_backward_out_cuda - func: avg_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: avg_pool2d_backward_cpu CUDA: avg_pool2d_backward_cuda @@ -6080,11 +5777,10 @@ dispatch: CPU: avg_pool3d_out_cpu CUDA: avg_pool3d_out_cuda - 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: avg_pool3d_cpu CUDA: avg_pool3d_cuda @@ -6093,11 +5789,10 @@ dispatch: CPU: avg_pool3d_backward_out_cpu CUDA: avg_pool3d_backward_out_cuda - func: avg_pool3d_backward(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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: avg_pool3d_backward_cpu CUDA: avg_pool3d_backward_cuda @@ -6108,11 +5803,10 @@ CPU: fractional_max_pool2d_out_cpu CUDA: fractional_max_pool2d_out_cuda # Return: (Tensor output, Tensor indices) - func: fractional_max_pool2d(Tensor self, int[2] kernel_size, int[2] output_size, Tensor random_samples) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: fractional_max_pool2d_cpu CUDA: fractional_max_pool2d_cuda @@ -6121,11 +5815,10 @@ dispatch: CPU: fractional_max_pool2d_backward_out_cpu CUDA: fractional_max_pool2d_backward_out_cuda - func: fractional_max_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] output_size, Tensor indices) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: fractional_max_pool2d_backward_cpu CUDA: fractional_max_pool2d_backward_cuda @@ -6136,11 +5829,10 @@ CPU: fractional_max_pool3d_out_cpu CUDA: fractional_max_pool3d_out_cuda # Return: (Tensor output, Tensor indices) - func: fractional_max_pool3d(Tensor self, int[3] kernel_size, int[3] output_size, Tensor random_samples) -> (Tensor, Tensor) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: fractional_max_pool3d_cpu CUDA: fractional_max_pool3d_cuda @@ -6149,11 +5841,10 @@ dispatch: CPU: fractional_max_pool3d_backward_out_cpu CUDA: fractional_max_pool3d_backward_out_cuda - func: fractional_max_pool3d_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] output_size, Tensor indices) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: fractional_max_pool3d_backward_cpu CUDA: fractional_max_pool3d_backward_cuda @@ -6164,11 +5855,10 @@ CPU: max_pool2d_with_indices_out_cpu CUDA: max_pool2d_with_indices_out_cuda # Return: (Tensor output, Tensor indices) - 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) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_pool2d_with_indices_cpu CUDA: max_pool2d_with_indices_cuda @@ -6177,11 +5867,10 @@ dispatch: CPU: max_pool2d_with_indices_backward_out_cpu CUDA: max_pool2d_with_indices_backward_out_cuda - func: max_pool2d_with_indices_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool ceil_mode, Tensor indices) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_pool2d_with_indices_backward_cpu CUDA: max_pool2d_with_indices_backward_cuda @@ -6192,11 +5881,10 @@ CPU: max_pool3d_with_indices_out_cpu CUDA: max_pool3d_with_indices_out_cuda # Return: (Tensor output, Tensor indices) - 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) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_pool3d_with_indices_cpu CUDA: max_pool3d_with_indices_cuda @@ -6205,11 +5893,10 @@ dispatch: CPU: max_pool3d_with_indices_backward_out_cpu CUDA: max_pool3d_with_indices_backward_out_cuda - func: max_pool3d_with_indices_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool ceil_mode, Tensor indices) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_pool3d_with_indices_backward_cpu CUDA: max_pool3d_with_indices_backward_cuda @@ -6218,11 +5905,10 @@ dispatch: CPU: max_unpooling2d_forward_out_cpu CUDA: max_unpooling2d_forward_out_cuda - func: max_unpool2d(Tensor self, Tensor indices, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_unpooling2d_forward_cpu CUDA: max_unpooling2d_forward_cuda @@ -6231,11 +5917,10 @@ dispatch: CPU: max_unpooling2d_backward_out_cpu CUDA: max_unpooling2d_backward_out_cuda - func: max_unpool2d_backward(Tensor grad_output, Tensor self, Tensor indices, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_unpooling2d_backward_cpu CUDA: max_unpooling2d_backward_cuda @@ -6244,11 +5929,10 @@ dispatch: CPU: max_unpooling3d_forward_out_cpu CUDA: max_unpooling3d_forward_out_cuda - func: max_unpool3d(Tensor self, Tensor indices, int[3] output_size, int[3] stride, int[3] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_unpooling3d_forward_cpu CUDA: max_unpooling3d_forward_cuda @@ -6257,11 +5941,10 @@ dispatch: CPU: max_unpooling3d_backward_out_cpu CUDA: max_unpooling3d_backward_out_cuda - func: max_unpool3d_backward(Tensor grad_output, Tensor self, Tensor indices, int[3] output_size, int[3] stride, int[3] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: max_unpooling3d_backward_cpu CUDA: max_unpooling3d_backward_cuda @@ -6270,11 +5953,10 @@ dispatch: CPU: reflection_pad1d_out_cpu CUDA: reflection_pad1d_out_cuda - func: reflection_pad1d(Tensor self, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: reflection_pad1d_cpu CUDA: reflection_pad1d_cuda @@ -6283,11 +5965,10 @@ dispatch: CPU: reflection_pad1d_backward_out_cpu CUDA: reflection_pad1d_backward_out_cuda - func: reflection_pad1d_backward(Tensor grad_output, Tensor self, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: reflection_pad1d_backward_cpu CUDA: reflection_pad1d_backward_cuda @@ -6296,11 +5977,10 @@ dispatch: CPU: reflection_pad2d_out_cpu CUDA: reflection_pad2d_out_cuda - func: reflection_pad2d(Tensor self, int[4] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: reflection_pad2d_cpu CUDA: reflection_pad2d_cuda @@ -6309,11 +5989,10 @@ dispatch: CPU: reflection_pad2d_backward_out_cpu CUDA: reflection_pad2d_backward_out_cuda - func: reflection_pad2d_backward(Tensor grad_output, Tensor self, int[4] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: reflection_pad2d_backward_cpu CUDA: reflection_pad2d_backward_cuda @@ -6322,11 +6001,10 @@ dispatch: CPU: replication_pad1d_out_cpu CUDA: replication_pad1d_out_cuda - func: replication_pad1d(Tensor self, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: replication_pad1d_cpu CUDA: replication_pad1d_cuda @@ -6335,11 +6013,10 @@ dispatch: CPU: replication_pad1d_backward_out_cpu CUDA: replication_pad1d_backward_out_cuda - func: replication_pad1d_backward(Tensor grad_output, Tensor self, int[2] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: replication_pad1d_backward_cpu CUDA: replication_pad1d_backward_cuda @@ -6348,11 +6025,10 @@ dispatch: CPU: replication_pad2d_out_cpu CUDA: replication_pad2d_out_cuda - func: replication_pad2d(Tensor self, int[4] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: replication_pad2d_cpu CUDA: replication_pad2d_cuda @@ -6361,11 +6037,10 @@ dispatch: CPU: replication_pad2d_backward_out_cpu CUDA: replication_pad2d_backward_out_cuda - func: replication_pad2d_backward(Tensor grad_output, Tensor self, int[4] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: replication_pad2d_backward_cpu CUDA: replication_pad2d_backward_cuda @@ -6374,11 +6049,10 @@ dispatch: CPU: replication_pad3d_out_cpu CUDA: replication_pad3d_out_cuda - func: replication_pad3d(Tensor self, int[6] padding) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: replication_pad3d_cpu CUDA: replication_pad3d_cuda @@ -6387,24 +6061,25 @@ dispatch: CPU: replication_pad3d_backward_out_cpu CUDA: replication_pad3d_backward_out_cuda - func: replication_pad3d_backward(Tensor grad_output, Tensor self, int[6] padding) -> Tensor - use_c10_dispatcher: unboxed_only 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!) 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_linear1d_cpu CUDA: upsample_linear1d_cuda @@ -6413,11 +6088,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_linear1d_backward_cpu CUDA: upsample_linear1d_backward_cuda @@ -6426,11 +6100,10 @@ dispatch: CPU: upsample_bilinear2d_out_cpu CUDA: upsample_bilinear2d_out_cuda - func: upsample_bilinear2d(Tensor self, int[2] output_size, bool align_corners) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_bilinear2d_cpu CUDA: upsample_bilinear2d_cuda QuantizedCPU: quantized_upsample_bilinear2d_cpu @@ -6440,11 +6113,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_bilinear2d_backward_cpu CUDA: upsample_bilinear2d_backward_cuda @@ -6453,11 +6125,10 @@ dispatch: CPU: upsample_bicubic2d_out_cpu CUDA: upsample_bicubic2d_out_cuda - func: upsample_bicubic2d(Tensor self, int[2] output_size, bool align_corners) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_bicubic2d_cpu CUDA: upsample_bicubic2d_cuda @@ -6466,11 +6137,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_bicubic2d_backward_cpu CUDA: upsample_bicubic2d_backward_cuda @@ -6479,11 +6149,10 @@ dispatch: CPU: upsample_trilinear3d_out_cpu CUDA: upsample_trilinear3d_out_cuda - func: upsample_trilinear3d(Tensor self, int[3] output_size, bool align_corners) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_trilinear3d_cpu CUDA: upsample_trilinear3d_cuda @@ -6492,11 +6161,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_trilinear3d_backward_cpu CUDA: upsample_trilinear3d_backward_cuda @@ -6505,11 +6173,10 @@ dispatch: CPU: upsample_nearest1d_out_cpu CUDA: upsample_nearest1d_out_cuda - func: upsample_nearest1d(Tensor self, int[1] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest1d_cpu CUDA: upsample_nearest1d_cuda @@ -6518,11 +6185,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest1d_backward_cpu CUDA: upsample_nearest1d_backward_cuda @@ -6531,11 +6197,10 @@ dispatch: CPU: upsample_nearest2d_out_cpu CUDA: upsample_nearest2d_out_cuda - func: upsample_nearest2d(Tensor self, int[2] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest2d_cpu CUDA: upsample_nearest2d_cuda QuantizedCPU: quantized_upsample_nearest2d_cpu @@ -6545,11 +6210,10 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest2d_backward_cpu CUDA: upsample_nearest2d_backward_cuda @@ -6558,11 +6222,10 @@ dispatch: CPU: upsample_nearest3d_out_cpu CUDA: upsample_nearest3d_out_cuda - func: upsample_nearest3d(Tensor self, int[3] output_size) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest3d_cpu CUDA: upsample_nearest3d_cuda @@ -6571,28 +6234,24 @@ 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 - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: upsample_nearest3d_backward_cpu CUDA: upsample_nearest3d_backward_cuda - func: sigmoid_backward.grad_input(Tensor grad_output, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_sigmoid_backward_out - CUDA: legacy::cuda::_thnn_sigmoid_backward_out + CPU: sigmoid_backward_out + CUDA: sigmoid_backward_out - func: sigmoid_backward(Tensor grad_output, Tensor output) -> Tensor use_c10_dispatcher: full python_module: nn - dispatch: - CPU: legacy::cpu::_thnn_sigmoid_backward - CUDA: legacy::cuda::_thnn_sigmoid_backward - 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 @@ -6633,18 +6292,17 @@ python_module: nn dispatch: CPU: slow_conv_transpose2d_cpu CUDA: slow_conv_transpose2d_cuda -- func: slow_conv_transpose2d_backward.grad_output(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] output_padding, int[2] dilation, Tensor columns, Tensor ones, *, Tensor?(a!) grad_input, Tensor?(b!) grad_weight, Tensor?(c!) grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) +- func: slow_conv_transpose2d_backward.grad_output(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] output_padding, int[2] dilation, Tensor columns, Tensor ones, *, Tensor(a!)? grad_input, Tensor(b!)? grad_weight, Tensor(c!)? grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: CPU: slow_conv_transpose2d_backward_out_cpu CUDA: slow_conv_transpose2d_backward_out_cuda - func: slow_conv_transpose2d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] output_padding, int[2] dilation, Tensor columns, Tensor ones, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: slow_conv_transpose2d_backward_cpu CUDA: slow_conv_transpose2d_backward_cuda @@ -6658,18 +6316,17 @@ python_module: nn dispatch: CPU: slow_conv_transpose3d_cpu CUDA: slow_conv_transpose3d_cuda -- func: slow_conv_transpose3d_backward.grad_output(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, int[3] output_padding, int[3] dilation, Tensor finput, Tensor fgrad_input, *, Tensor?(a!) grad_input, Tensor?(b!) grad_weight, Tensor?(c!) grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) +- func: slow_conv_transpose3d_backward.grad_output(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, int[3] output_padding, int[3] dilation, Tensor finput, Tensor fgrad_input, *, Tensor(a!)? grad_input, Tensor(b!)? grad_weight, Tensor(c!)? grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: CPU: slow_conv_transpose3d_backward_out_cpu CUDA: slow_conv_transpose3d_backward_out_cuda - func: slow_conv_transpose3d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, int[3] output_padding, int[3] dilation, Tensor finput, Tensor fgrad_input, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: slow_conv_transpose3d_backward_cpu CUDA: slow_conv_transpose3d_backward_cuda @@ -6680,30 +6337,29 @@ python_module: nn - func: thnn_conv2d_forward.output(Tensor self, Tensor weight, int[2] kernel_size, Tensor? bias, int[2] stride, int[2] padding, *, Tensor(a!) output, Tensor(b!) finput, Tensor(c!) fgrad_input) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv2d_forward_out + CPU: slow_conv2d_forward_out_cpu CUDA: legacy::cuda::_thnn_conv2d_forward_out - func: thnn_conv2d_forward(Tensor self, Tensor weight, int[2] kernel_size, Tensor? bias, int[2] stride, int[2] padding) -> (Tensor output, Tensor finput, Tensor fgrad_input) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv2d_forward + CPU: slow_conv2d_forward_cpu CUDA: legacy::cuda::_thnn_conv2d_forward -- func: thnn_conv2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, Tensor finput, Tensor fgrad_input, *, Tensor?(a!) grad_input, Tensor?(b!) grad_weight, Tensor?(c!) grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) +- func: thnn_conv2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, Tensor finput, Tensor fgrad_input, *, Tensor(a!)? grad_input, Tensor(b!)? grad_weight, Tensor(c!)? grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv2d_backward_out + CPU: slow_conv2d_backward_out_cpu CUDA: legacy::cuda::_thnn_conv2d_backward_out - func: thnn_conv2d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, Tensor finput, Tensor fgrad_input, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv2d_backward + CPU: slow_conv2d_backward_cpu CUDA: legacy::cuda::_thnn_conv2d_backward - func: thnn_conv_depthwise2d.out(Tensor self, Tensor weight, int[2] kernel_size, Tensor? bias=None, int[2] stride=1, int[2] padding=0, int[2] dilation=1, *, Tensor(a!) out) -> Tensor(a!) python_module: nn @@ -6718,56 +6374,53 @@ - func: thnn_conv_depthwise2d_forward(Tensor self, Tensor weight, int[2] kernel_size, Tensor? bias, int[2] stride, int[2] padding, int[2] dilation) -> Tensor python_module: nn dispatch: CUDA: legacy::cuda::_thnn_conv_depthwise2d_forward -- func: thnn_conv_depthwise2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, *, Tensor?(a!) grad_input, Tensor?(b!) grad_weight) -> (Tensor(a!), Tensor(b!)) +- func: thnn_conv_depthwise2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, *, Tensor(a!)? grad_input, Tensor(b!)? grad_weight) -> (Tensor(a!), Tensor(b!)) python_module: nn dispatch: CUDA: legacy::cuda::_thnn_conv_depthwise2d_backward_out - func: thnn_conv_depthwise2d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool[2] output_mask) -> (Tensor grad_input, Tensor grad_weight) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CUDA: legacy::cuda::_thnn_conv_depthwise2d_backward -- func: thnn_conv3d.out(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias=None, int[3] stride=1, int[3] padding=0, *, Tensor(a!) out) -> Tensor(a!) +- func: slow_conv3d.out(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias=None, int[3] stride=1, int[3] padding=0, *, Tensor(a!) out) -> Tensor(a!) python_module: nn -- func: thnn_conv3d(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias=None, int[3] stride=1, int[3] padding=0) -> Tensor +- func: slow_conv3d(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias=None, int[3] stride=1, int[3] padding=0) -> Tensor python_module: nn -- func: thnn_conv3d_forward.output(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias, int[3] stride, int[3] padding, *, Tensor(a!) output, Tensor(b!) finput, Tensor(c!) fgrad_input) -> (Tensor(a!), Tensor(b!), Tensor(c!)) +- func: slow_conv3d_forward.output(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias, int[3] stride, int[3] padding, *, Tensor(a!) output, Tensor(b!) finput, Tensor(c!) fgrad_input) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv3d_forward_out + CPU: slow_conv3d_forward_out_cpu -- func: thnn_conv3d_forward(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias, int[3] stride, int[3] padding) -> (Tensor output, Tensor finput, Tensor fgrad_input) +- func: slow_conv3d_forward(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias, int[3] stride, int[3] padding) -> (Tensor output, Tensor finput, Tensor fgrad_input) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv3d_forward + CPU: slow_conv3d_forward_cpu -- func: thnn_conv3d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, Tensor finput, Tensor fgrad_input, *, Tensor?(a!) grad_input, Tensor?(b!) grad_weight, Tensor?(c!) grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) +- func: slow_conv3d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, Tensor finput, Tensor fgrad_input, *, Tensor(a!)? grad_input, Tensor(b!)? grad_weight, Tensor(c!)? grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv3d_backward_out + CPU: slow_conv3d_backward_out_cpu -- func: thnn_conv3d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, Tensor finput, Tensor fgrad_input, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only +- func: slow_conv3d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, Tensor finput, Tensor fgrad_input, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) python_module: nn dispatch: - CPU: legacy::cpu::_thnn_conv3d_backward + CPU: slow_conv3d_backward_cpu - func: slow_conv_dilated2d(Tensor self, Tensor weight, int[2] kernel_size, Tensor? bias=None, int[2] stride=1, int[2] padding=0, int[2] dilation=1) -> Tensor python_module: nn dispatch: CPU: slow_conv_dilated2d_cpu CUDA: slow_conv_dilated2d_cuda - func: slow_conv_dilated2d_backward(Tensor grad_output, Tensor self, Tensor weight, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: slow_conv_dilated2d_backward_cpu CUDA: slow_conv_dilated2d_backward_cuda @@ -6776,11 +6429,10 @@ dispatch: CPU: slow_conv_dilated3d_cpu CUDA: slow_conv_dilated3d_cuda - func: slow_conv_dilated3d_backward(Tensor grad_output, Tensor self, Tensor weight, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: slow_conv_dilated3d_backward_cpu CUDA: slow_conv_dilated3d_backward_cuda @@ -6789,11 +6441,10 @@ dispatch: CPU: col2im_out_cpu CUDA: col2im_out_cuda - func: col2im(Tensor self, int[2] output_size, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: col2im_cpu CUDA: col2im_cuda @@ -6802,11 +6453,10 @@ dispatch: CPU: col2im_backward_out_cpu CUDA: col2im_backward_out_cuda - func: col2im_backward(Tensor grad_output, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: col2im_backward_cpu CUDA: col2im_backward_cuda @@ -6815,11 +6465,10 @@ dispatch: CPU: im2col_out_cpu CUDA: im2col_out_cuda - func: im2col(Tensor self, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn dispatch: CPU: im2col_cpu CUDA: im2col_cuda @@ -6828,10 +6477,15 @@ dispatch: CPU: im2col_backward_out_cpu CUDA: im2col_backward_out_cuda - func: im2col_backward(Tensor grad_output, int[2] input_size, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor - use_c10_dispatcher: unboxed_only python_module: nn 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