// required for old g++ to compile PRId64 macros, see
// https://github.com/pytorch/pytorch/issues/3571
// for context
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

// an external backend might generate file within its code tree
// and check all the source files within the tree with clang-format.
// so, disable it since the backend might have a different config.
// clang-format off

// NOTE: This condition is true for all PyTorch internal libraries, it
//       just excludes external projects such as torch_xla which
//       re-use some of the PyTorch codegen machinery.
#if defined(CAFFE2_BUILD_MAIN_LIB)        || \
    defined(TORCH_CUDA_BUILD_MAIN_LIB)    || \
    defined(TORCH_HIP_BUILD_MAIN_LIB)     || \
    defined(TORCH_XPU_BUILD_MAIN_LIB)     || \
    defined(TORCH_CUDA_CU_BUILD_MAIN_LIB) || \
    defined(TORCH_CUDA_CPP_BUILD_MAIN_LIB)
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#endif

// @generated by torchgen/gen.py from RegisterDispatchKey.cpp

#include <c10/core/TensorImpl.h>
#include <c10/core/Allocator.h>
#include <ATen/DeviceGuard.h>
#include <ATen/NamedTensorUtils.h>
#include <ATen/Utils.h>
#include <ATen/WrapDimUtils.h>
#include <ATen/Dispatch.h>
#include <c10/util/ExclusivelyOwned.h>
#include <c10/util/Half.h>
#include <c10/core/UndefinedTensorImpl.h>
#include <optional>
#include <ATen/Tensor.h>
#include <ATen/native/Resize.h>

#include <cstddef>
#include <functional>
#include <memory>
#include <utility>

#include <ATen/Config.h>
#include <ATen/core/op_registration/adaption.h>
#include <torch/library.h>


#include <ATen/ops/as_strided_native.h>
#include <ATen/ops/empty.h>
#include <ATen/ops/empty_strided.h>
#include <ATen/ops/_copy_from_and_resize.h>
#include <ATen/ops/_copy_from.h>
#include <c10/macros/Macros.h>
#include <ATen/ops/_fused_sdp_choice_native.h>
#include <ATen/ops/_native_multi_head_attention_native.h>
#include <ATen/ops/_nested_from_padded_and_nested_example_native.h>
#include <ATen/ops/_nested_select_backward_native.h>
#include <ATen/ops/_nested_sum_backward_native.h>
#include <ATen/ops/_nested_tensor_size_native.h>
#include <ATen/ops/_nested_tensor_softmax_with_shape_native.h>
#include <ATen/ops/_nested_tensor_storage_offsets_native.h>
#include <ATen/ops/_nested_tensor_strides_native.h>
#include <ATen/ops/_pin_memory_native.h>
#include <ATen/ops/_safe_softmax_native.h>
#include <ATen/ops/_softmax_backward_data_native.h>
#include <ATen/ops/_softmax_native.h>
#include <ATen/ops/_test_autograd_multiple_dispatch_native.h>
#include <ATen/ops/_to_copy_native.h>
#include <ATen/ops/_transform_bias_rescale_qkv_native.h>
#include <ATen/ops/_transformer_encoder_layer_fwd_native.h>
#include <ATen/ops/abs_native.h>
#include <ATen/ops/add_native.h>
#include <ATen/ops/alias_native.h>
#include <ATen/ops/all_native.h>
#include <ATen/ops/bmm_native.h>
#include <ATen/ops/cat_native.h>
#include <ATen/ops/chunk_native.h>
#include <ATen/ops/clone_native.h>
#include <ATen/ops/copy_native.h>
#include <ATen/ops/cos_native.h>
#include <ATen/ops/detach_native.h>
#include <ATen/ops/div_native.h>
#include <ATen/ops/embedding_native.h>
#include <ATen/ops/empty_like_native.h>
#include <ATen/ops/eq_native.h>
#include <ATen/ops/fill_native.h>
#include <ATen/ops/ge_native.h>
#include <ATen/ops/gelu_backward_native.h>
#include <ATen/ops/gelu_native.h>
#include <ATen/ops/gt_native.h>
#include <ATen/ops/is_pinned_native.h>
#include <ATen/ops/is_same_size_native.h>
#include <ATen/ops/isinf_native.h>
#include <ATen/ops/isnan_native.h>
#include <ATen/ops/isneginf_native.h>
#include <ATen/ops/isposinf_native.h>
#include <ATen/ops/linear_backward_native.h>
#include <ATen/ops/linear_native.h>
#include <ATen/ops/logical_not_native.h>
#include <ATen/ops/masked_fill_native.h>
#include <ATen/ops/matmul_backward_native.h>
#include <ATen/ops/matmul_native.h>
#include <ATen/ops/mul_native.h>
#include <ATen/ops/narrow_native.h>
#include <ATen/ops/native_dropout_backward_native.h>
#include <ATen/ops/native_dropout_native.h>
#include <ATen/ops/native_layer_norm_backward_native.h>
#include <ATen/ops/native_layer_norm_native.h>
#include <ATen/ops/neg_native.h>
#include <ATen/ops/normal_native.h>
#include <ATen/ops/ones_like_native.h>
#include <ATen/ops/relu_native.h>
#include <ATen/ops/select_native.h>
#include <ATen/ops/sgn_native.h>
#include <ATen/ops/silu_backward_native.h>
#include <ATen/ops/silu_native.h>
#include <ATen/ops/sin_native.h>
#include <ATen/ops/split_with_sizes_native.h>
#include <ATen/ops/sqrt_native.h>
#include <ATen/ops/squeeze_native.h>
#include <ATen/ops/sub_native.h>
#include <ATen/ops/sum_native.h>
#include <ATen/ops/tanh_native.h>
#include <ATen/ops/threshold_backward_native.h>
#include <ATen/ops/to_padded_tensor_native.h>
#include <ATen/ops/transpose_native.h>
#include <ATen/ops/unbind_native.h>
#include <ATen/ops/unsqueeze_native.h>
#include <ATen/ops/value_selecting_reduction_backward_native.h>
#include <ATen/ops/values_native.h>
#include <ATen/ops/view_native.h>
#include <ATen/ops/where_native.h>
#include <ATen/ops/zero_native.h>

namespace at {
namespace {
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wunused-function")

void resize_out(const Tensor &out, IntArrayRef sizes, IntArrayRef strides, const TensorOptions &options) {
  TORCH_CHECK(options.dtype() == out.dtype(),
      "Expected out tensor to have dtype ", options.dtype(), ", but got ", out.dtype(), " instead");
  TORCH_CHECK(options.device() == out.device(),
      "Expected out tensor to have device ", options.device(), ", but got ", out.device(), " instead");
  const bool resized = at::native::resize_output(out, sizes);
  // Only restride if a resize occurred; otherwise we ignore the (advisory)
  // strides from the meta function and directly use the output tensor's
  // preexisting strides
  if (resized) {
    if (!strides.empty()) {
      TORCH_INTERNAL_ASSERT(!options.memory_format_opt().has_value());
      // TODO: avoid the redispatch here
      out.as_strided_(sizes, strides);
    } else if (options.memory_format_opt().has_value()) {
      out.unsafeGetTensorImpl()->empty_tensor_restride(*options.memory_format_opt());
    }
  }
}

void check_inplace(const Tensor &self, IntArrayRef sizes, const TensorOptions &options) {
  // These checks are needed on those operators that:
  //   1) don't use 'TensorIterator' (e.g. 'addmm' and 'baddbmm')
  //   2) have particular typing rules (e.g. 'cumsum' and 'cumprod')
  // For other operators (e.g. 'add'), 'TensorIterator' already checks
  // these things separately.
  TORCH_CHECK(options.dtype() == self.dtype(),
      "Bad in-place call: ",
      "input tensor dtype ", self.dtype(), " and output tensor dtype ", options.dtype(), " should match");
  TORCH_CHECK(options.device() == self.device(),
      "Bad in-place call: ",
      "input tensor device ", self.device(), " and output tensor device ", options.device(), " should match");
  TORCH_CHECK(sizes == self.sizes(),
      "Bad in-place call: ",
      "input tensor size ", self.sizes(), " and output tensor size ", sizes, " should match");
}
C10_DIAGNOSTIC_POP()
} // namespace
} // namespace at

// See template file RegisterDispatchDefinitions.ini
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor> wrapper_NestedTensorCPU__native_dropout(const at::Tensor & input, double p, ::std::optional<bool> train) {
    // No device check
  // DeviceGuard omitted
  return at::native::native_dropout_nested(input, p, train);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("native_dropout",
TORCH_FN(wrapper_NestedTensorCPU__native_dropout));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor> native_dropout(const at::Tensor & input, double p, ::std::optional<bool> train) {
return wrapper_NestedTensorCPU__native_dropout(input, p, train);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__native_dropout_backward(const at::Tensor & grad_output, const at::Tensor & mask, double scale) {
    // No device check
  // DeviceGuard omitted
  return at::native::native_dropout_backward(grad_output, mask, scale);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("native_dropout_backward",
TORCH_FN(wrapper_NestedTensorCPU__native_dropout_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor native_dropout_backward(const at::Tensor & grad_output, const at::Tensor & mask, double scale) {
return wrapper_NestedTensorCPU__native_dropout_backward(grad_output, mask, scale);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__abs(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_abs(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__abs_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_abs_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("abs",
TORCH_FN(wrapper_NestedTensorCPU__abs));
m.impl("abs_",
TORCH_FN(wrapper_NestedTensorCPU__abs_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor abs(const at::Tensor & self) {
return wrapper_NestedTensorCPU__abs(self);
}
at::Tensor & abs_(at::Tensor & self) {
return wrapper_NestedTensorCPU__abs_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__sgn(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sgn(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__sgn_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sgn_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("sgn",
TORCH_FN(wrapper_NestedTensorCPU__sgn));
m.impl("sgn_",
TORCH_FN(wrapper_NestedTensorCPU__sgn_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor sgn(const at::Tensor & self) {
return wrapper_NestedTensorCPU__sgn(self);
}
at::Tensor & sgn_(at::Tensor & self) {
return wrapper_NestedTensorCPU__sgn_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Tensor_add(const at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_add_Tensor(self, other, alpha);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU_Tensor_add_(at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_add__Tensor(self, other, alpha);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("add.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_add));
m.impl("add_.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_add_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor add(const at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
return wrapper_NestedTensorCPU_Tensor_add(self, other, alpha);
}
at::Tensor & add_(at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
return wrapper_NestedTensorCPU_Tensor_add_(self, other, alpha);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_dim_all(const at::Tensor & self, int64_t dim, bool keepdim) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_all(self, dim, keepdim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("all.dim",
TORCH_FN(wrapper_NestedTensorCPU_dim_all));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor all(const at::Tensor & self, int64_t dim, bool keepdim) {
return wrapper_NestedTensorCPU_dim_all(self, dim, keepdim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__logical_not(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_logical_not(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__logical_not_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_logical_not_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("logical_not",
TORCH_FN(wrapper_NestedTensorCPU__logical_not));
m.impl("logical_not_",
TORCH_FN(wrapper_NestedTensorCPU__logical_not_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor logical_not(const at::Tensor & self) {
return wrapper_NestedTensorCPU__logical_not(self);
}
at::Tensor & logical_not_(at::Tensor & self) {
return wrapper_NestedTensorCPU__logical_not_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__bmm(const at::Tensor & self, const at::Tensor & mat2) {
    // No device check
  // DeviceGuard omitted
  return at::native::bmm_nested(self, mat2);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("bmm",
TORCH_FN(wrapper_NestedTensorCPU__bmm));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor bmm(const at::Tensor & self, const at::Tensor & mat2) {
return wrapper_NestedTensorCPU__bmm(self, mat2);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__cat(const at::ITensorListRef & tensors, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::cat_nested(tensors, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("cat",
TORCH_FN(wrapper_NestedTensorCPU__cat));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor cat(const at::ITensorListRef & tensors, int64_t dim) {
return wrapper_NestedTensorCPU__cat(tensors, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::vector<at::Tensor> wrapper_NestedTensorCPU__chunk(const at::Tensor & self, int64_t chunks, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::chunk_nested_tensor(self, chunks, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("chunk",
TORCH_FN(wrapper_NestedTensorCPU__chunk));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::vector<at::Tensor> chunk(const at::Tensor & self, int64_t chunks, int64_t dim) {
return wrapper_NestedTensorCPU__chunk(self, chunks, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor & wrapper_NestedTensorCPU__copy_(at::Tensor & self, const at::Tensor & src, bool non_blocking) {
    // No device check
  // DeviceGuard omitted
  return at::native::copy_nested_(self, src, non_blocking);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("copy_",
TORCH_FN(wrapper_NestedTensorCPU__copy_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor & copy_(at::Tensor & self, const at::Tensor & src, bool non_blocking) {
return wrapper_NestedTensorCPU__copy_(self, src, non_blocking);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__cos(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_cos(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("cos",
TORCH_FN(wrapper_NestedTensorCPU__cos));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor cos(const at::Tensor & self) {
return wrapper_NestedTensorCPU__cos(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Tensor_div(const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_div_Tensor(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("div.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_div));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor div(const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_Tensor_div(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_div(const at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_div_Scalar(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("div.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_div));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor div(const at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_div(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__embedding(const at::Tensor & weight, const at::Tensor & indices, c10::SymInt padding_idx, bool scale_grad_by_freq, bool sparse) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_embedding(weight, indices, padding_idx.guard_int(__FILE__, __LINE__), scale_grad_by_freq, sparse);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("embedding",
TORCH_FN(wrapper_NestedTensorCPU__embedding));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor embedding(const at::Tensor & weight, const at::Tensor & indices, int64_t padding_idx, bool scale_grad_by_freq, bool sparse) {
return wrapper_NestedTensorCPU__embedding(weight, indices, padding_idx, scale_grad_by_freq, sparse);
}
at::Tensor embedding_symint(const at::Tensor & weight, const at::Tensor & indices, c10::SymInt padding_idx, bool scale_grad_by_freq, bool sparse) {
return wrapper_NestedTensorCPU__embedding(weight, indices, padding_idx, scale_grad_by_freq, sparse);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__empty_like(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
    // No device check
  // DeviceGuard omitted
  return at::native::empty_like_nested(self, dtype, layout, device, pin_memory, memory_format);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("empty_like",
TORCH_FN(wrapper_NestedTensorCPU__empty_like));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor empty_like(const at::Tensor & self, at::TensorOptions options, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU__empty_like(self, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
}
at::Tensor empty_like(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU__empty_like(self, dtype, layout, device, pin_memory, memory_format);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor & wrapper_NestedTensorCPU_Scalar_fill_(at::Tensor & self, const at::Scalar & value) {
    // No device check
  // DeviceGuard omitted
  return at::native::fill_nested_(self, value);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("fill_.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_fill_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor & fill_(at::Tensor & self, const at::Scalar & value) {
return wrapper_NestedTensorCPU_Scalar_fill_(self, value);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor & wrapper_NestedTensorCPU_Tensor_fill_(at::Tensor & self, const at::Tensor & value) {
    // No device check
  // DeviceGuard omitted
  return at::native::fill_nested_(self, value);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("fill_.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_fill_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor & fill_(at::Tensor & self, const at::Tensor & value) {
return wrapper_NestedTensorCPU_Tensor_fill_(self, value);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__isnan(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_isnan(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("isnan",
TORCH_FN(wrapper_NestedTensorCPU__isnan));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor isnan(const at::Tensor & self) {
return wrapper_NestedTensorCPU__isnan(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
bool wrapper_NestedTensorCPU__is_same_size(const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::nested_is_same_size(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("is_same_size",
TORCH_FN(wrapper_NestedTensorCPU__is_same_size));
}
} // anonymous namespace
namespace nestedtensorcpu {
bool is_same_size(const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU__is_same_size(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> wrapper_NestedTensorCPU__native_layer_norm(const at::Tensor & input, c10::SymIntArrayRef normalized_shape, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, double eps) {
    // No device check
  // DeviceGuard omitted
  return at::native::nested_layer_norm(input, C10_AS_INTARRAYREF_SLOW(normalized_shape), weight, bias, eps);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("native_layer_norm",
TORCH_FN(wrapper_NestedTensorCPU__native_layer_norm));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> native_layer_norm(const at::Tensor & input, at::IntArrayRef normalized_shape, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, double eps) {
return wrapper_NestedTensorCPU__native_layer_norm(input, c10::fromIntArrayRefSlow(normalized_shape), weight, bias, eps);
}
::std::tuple<at::Tensor,at::Tensor,at::Tensor> native_layer_norm_symint(const at::Tensor & input, c10::SymIntArrayRef normalized_shape, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, double eps) {
return wrapper_NestedTensorCPU__native_layer_norm(input, normalized_shape, weight, bias, eps);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> wrapper_NestedTensorCPU__native_layer_norm_backward(const at::Tensor & grad_out, const at::Tensor & input, c10::SymIntArrayRef normalized_shape, const at::Tensor & mean, const at::Tensor & rstd, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, ::std::array<bool,3> output_mask) {
    // No device check
  // DeviceGuard omitted
  return at::native::layer_norm_backward_nested(grad_out, input, C10_AS_INTARRAYREF_SLOW(normalized_shape), mean, rstd, weight, bias, output_mask);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("native_layer_norm_backward",
TORCH_FN(wrapper_NestedTensorCPU__native_layer_norm_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> native_layer_norm_backward(const at::Tensor & grad_out, const at::Tensor & input, at::IntArrayRef normalized_shape, const at::Tensor & mean, const at::Tensor & rstd, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, ::std::array<bool,3> output_mask) {
return wrapper_NestedTensorCPU__native_layer_norm_backward(grad_out, input, c10::fromIntArrayRefSlow(normalized_shape), mean, rstd, weight, bias, output_mask);
}
::std::tuple<at::Tensor,at::Tensor,at::Tensor> native_layer_norm_backward_symint(const at::Tensor & grad_out, const at::Tensor & input, c10::SymIntArrayRef normalized_shape, const at::Tensor & mean, const at::Tensor & rstd, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & bias, ::std::array<bool,3> output_mask) {
return wrapper_NestedTensorCPU__native_layer_norm_backward(grad_out, input, normalized_shape, mean, rstd, weight, bias, output_mask);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__linear(const at::Tensor & input, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias) {
    // No device check
  // DeviceGuard omitted
  return at::native::nested_linear(input, weight, bias);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("linear",
TORCH_FN(wrapper_NestedTensorCPU__linear));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor linear(const at::Tensor & input, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias) {
return wrapper_NestedTensorCPU__linear(input, weight, bias);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> wrapper_NestedTensorCPU__linear_backward(const at::Tensor & self, const at::Tensor & grad_output, const at::Tensor & weight, ::std::array<bool,3> output_mask) {
    // No device check
  // DeviceGuard omitted
  return at::native::nested_linear_backward(self, grad_output, weight, output_mask);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("linear_backward",
TORCH_FN(wrapper_NestedTensorCPU__linear_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> linear_backward(const at::Tensor & self, const at::Tensor & grad_output, const at::Tensor & weight, ::std::array<bool,3> output_mask) {
return wrapper_NestedTensorCPU__linear_backward(self, grad_output, weight, output_mask);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__matmul(const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::matmul_nested(self, other);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU_out_matmul_out(const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
    // No device check
  // DeviceGuard omitted
  return at::native::matmul_out_nested(self, other, out);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("matmul",
TORCH_FN(wrapper_NestedTensorCPU__matmul));
m.impl("matmul.out",
TORCH_FN(wrapper_NestedTensorCPU_out_matmul_out));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor matmul(const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU__matmul(self, other);
}
at::Tensor & matmul_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_out_matmul_out(self, other, out);
}
at::Tensor & matmul_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
return wrapper_NestedTensorCPU_out_matmul_out(self, other, out);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor> wrapper_NestedTensorCPU__matmul_backward(const at::Tensor & grad, const at::Tensor & self, const at::Tensor & other, ::std::array<bool,2> mask) {
    // No device check
  // DeviceGuard omitted
  return at::native::matmul_backward_nested(grad, self, other, mask);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("matmul_backward",
TORCH_FN(wrapper_NestedTensorCPU__matmul_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor> matmul_backward(const at::Tensor & grad, const at::Tensor & self, const at::Tensor & other, ::std::array<bool,2> mask) {
return wrapper_NestedTensorCPU__matmul_backward(grad, self, other, mask);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__value_selecting_reduction_backward(const at::Tensor & grad, int64_t dim, const at::Tensor & indices, c10::SymIntArrayRef sizes, bool keepdim) {
    // No device check
  // DeviceGuard omitted
  return at::native::value_selecting_reduction_backward_nested_symint(grad, dim, indices, sizes, keepdim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("value_selecting_reduction_backward",
TORCH_FN(wrapper_NestedTensorCPU__value_selecting_reduction_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor value_selecting_reduction_backward(const at::Tensor & grad, int64_t dim, const at::Tensor & indices, at::IntArrayRef sizes, bool keepdim) {
return wrapper_NestedTensorCPU__value_selecting_reduction_backward(grad, dim, indices, c10::fromIntArrayRefSlow(sizes), keepdim);
}
at::Tensor value_selecting_reduction_backward_symint(const at::Tensor & grad, int64_t dim, const at::Tensor & indices, c10::SymIntArrayRef sizes, bool keepdim) {
return wrapper_NestedTensorCPU__value_selecting_reduction_backward(grad, dim, indices, sizes, keepdim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Tensor_mul(const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_mul_Tensor(self, other);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU_Tensor_mul_(at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_mul__Tensor(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("mul.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_mul));
m.impl("mul_.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_mul_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor mul(const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_Tensor_mul(self, other);
}
at::Tensor & mul_(at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_Tensor_mul_(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_mul(const at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_mul_Scalar(self, other);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU_Scalar_mul_(at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_mul__Scalar(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("mul.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_mul));
m.impl("mul_.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_mul_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor mul(const at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_mul(self, other);
}
at::Tensor & mul_(at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_mul_(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__narrow(const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length) {
    // No device check
  // DeviceGuard omitted
  return at::native::narrow_nested_symint(self, dim, start, length);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("narrow",
TORCH_FN(wrapper_NestedTensorCPU__narrow));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor narrow(const at::Tensor & self, int64_t dim, int64_t start, int64_t length) {
return wrapper_NestedTensorCPU__narrow(self, dim, start, length);
}
at::Tensor narrow_symint(const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length) {
return wrapper_NestedTensorCPU__narrow(self, dim, start, length);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__ones_like(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
    // No device check
  // DeviceGuard omitted
  return at::native::ones_like(self, dtype, layout, device, pin_memory, memory_format);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("ones_like",
TORCH_FN(wrapper_NestedTensorCPU__ones_like));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor ones_like(const at::Tensor & self, at::TensorOptions options, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU__ones_like(self, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
}
at::Tensor ones_like(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU__ones_like(self, dtype, layout, device, pin_memory, memory_format);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
bool wrapper_NestedTensorCPU__is_pinned(const at::Tensor & self, ::std::optional<at::Device> device) {
    // No device check
  // DeviceGuard omitted
  return at::native::is_pinned(self, device);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("is_pinned",
TORCH_FN(wrapper_NestedTensorCPU__is_pinned));
}
} // anonymous namespace
namespace nestedtensorcpu {
bool is_pinned(const at::Tensor & self, ::std::optional<at::Device> device) {
return wrapper_NestedTensorCPU__is_pinned(self, device);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___pin_memory(const at::Tensor & self, ::std::optional<at::Device> device) {
    // No device check
  // DeviceGuard omitted
  return at::native::_pin_memory_nested(self, device);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_pin_memory",
TORCH_FN(wrapper_NestedTensorCPU___pin_memory));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _pin_memory(const at::Tensor & self, ::std::optional<at::Device> device) {
return wrapper_NestedTensorCPU___pin_memory(self, device);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__neg(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_neg(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__neg_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_neg_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("neg",
TORCH_FN(wrapper_NestedTensorCPU__neg));
m.impl("neg_",
TORCH_FN(wrapper_NestedTensorCPU__neg_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor neg(const at::Tensor & self) {
return wrapper_NestedTensorCPU__neg(self);
}
at::Tensor & neg_(at::Tensor & self) {
return wrapper_NestedTensorCPU__neg_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__relu(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_relu(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__relu_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_relu_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("relu",
TORCH_FN(wrapper_NestedTensorCPU__relu));
m.impl("relu_",
TORCH_FN(wrapper_NestedTensorCPU__relu_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor relu(const at::Tensor & self) {
return wrapper_NestedTensorCPU__relu(self);
}
at::Tensor & relu_(at::Tensor & self) {
return wrapper_NestedTensorCPU__relu_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__gelu(const at::Tensor & self, c10::string_view approximate) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_gelu(self, approximate);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__gelu_(at::Tensor & self, c10::string_view approximate) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_gelu_(self, approximate);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("gelu",
TORCH_FN(wrapper_NestedTensorCPU__gelu));
m.impl("gelu_",
TORCH_FN(wrapper_NestedTensorCPU__gelu_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor gelu(const at::Tensor & self, c10::string_view approximate) {
return wrapper_NestedTensorCPU__gelu(self, approximate);
}
at::Tensor & gelu_(at::Tensor & self, c10::string_view approximate) {
return wrapper_NestedTensorCPU__gelu_(self, approximate);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__gelu_backward(const at::Tensor & grad_output, const at::Tensor & self, c10::string_view approximate) {
    // No device check
  // DeviceGuard omitted
  return at::native::gelu_backwards_nested(grad_output, self, approximate);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("gelu_backward",
TORCH_FN(wrapper_NestedTensorCPU__gelu_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor gelu_backward(const at::Tensor & grad_output, const at::Tensor & self, c10::string_view approximate) {
return wrapper_NestedTensorCPU__gelu_backward(grad_output, self, approximate);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_int_select(const at::Tensor & self, int64_t dim, c10::SymInt index) {
    // No device check
  // DeviceGuard omitted
  return at::native::select_nested(self, dim, index.guard_int(__FILE__, __LINE__));
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("select.int",
TORCH_FN(wrapper_NestedTensorCPU_int_select));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor select(const at::Tensor & self, int64_t dim, int64_t index) {
return wrapper_NestedTensorCPU_int_select(self, dim, index);
}
at::Tensor select_symint(const at::Tensor & self, int64_t dim, c10::SymInt index) {
return wrapper_NestedTensorCPU_int_select(self, dim, index);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_select_backward(const at::Tensor & grad_output, const at::Tensor & self, int64_t dim, c10::SymInt index) {
    // No device check
  // DeviceGuard omitted
  return at::native::_nested_select_backward_symint(grad_output, self, dim, index);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_select_backward",
TORCH_FN(wrapper_NestedTensorCPU___nested_select_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_select_backward(const at::Tensor & grad_output, const at::Tensor & self, int64_t dim, int64_t index) {
return wrapper_NestedTensorCPU___nested_select_backward(grad_output, self, dim, index);
}
at::Tensor _nested_select_backward_symint(const at::Tensor & grad_output, const at::Tensor & self, int64_t dim, c10::SymInt index) {
return wrapper_NestedTensorCPU___nested_select_backward(grad_output, self, dim, index);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__silu(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_silu(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__silu_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_silu_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("silu",
TORCH_FN(wrapper_NestedTensorCPU__silu));
m.impl("silu_",
TORCH_FN(wrapper_NestedTensorCPU__silu_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor silu(const at::Tensor & self) {
return wrapper_NestedTensorCPU__silu(self);
}
at::Tensor & silu_(at::Tensor & self) {
return wrapper_NestedTensorCPU__silu_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__silu_backward(const at::Tensor & grad_output, const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::silu_backward_nested(grad_output, self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("silu_backward",
TORCH_FN(wrapper_NestedTensorCPU__silu_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor silu_backward(const at::Tensor & grad_output, const at::Tensor & self) {
return wrapper_NestedTensorCPU__silu_backward(grad_output, self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__sin(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sin(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("sin",
TORCH_FN(wrapper_NestedTensorCPU__sin));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor sin(const at::Tensor & self) {
return wrapper_NestedTensorCPU__sin(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__detach(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::detach(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("detach",
TORCH_FN(wrapper_NestedTensorCPU__detach));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor detach(const at::Tensor & self) {
return wrapper_NestedTensorCPU__detach(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___softmax(const at::Tensor & self, int64_t dim, bool half_to_float) {
    // No device check
  // DeviceGuard omitted
  return at::native::softmax_nested(self, dim, half_to_float);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_softmax",
TORCH_FN(wrapper_NestedTensorCPU___softmax));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _softmax(const at::Tensor & self, int64_t dim, bool half_to_float) {
return wrapper_NestedTensorCPU___softmax(self, dim, half_to_float);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___softmax_backward_data(const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, at::ScalarType input_dtype) {
    // No device check
  // DeviceGuard omitted
  return at::native::nested_softmax_backward(grad_output, output, dim, input_dtype);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_softmax_backward_data",
TORCH_FN(wrapper_NestedTensorCPU___softmax_backward_data));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _softmax_backward_data(const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, at::ScalarType input_dtype) {
return wrapper_NestedTensorCPU___softmax_backward_data(grad_output, output, dim, input_dtype);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::vector<at::Tensor> wrapper_NestedTensorCPU__split_with_sizes(const at::Tensor & self, c10::SymIntArrayRef split_sizes, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::split_with_sizes_nested(self, C10_AS_INTARRAYREF_SLOW(split_sizes), dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("split_with_sizes",
TORCH_FN(wrapper_NestedTensorCPU__split_with_sizes));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::vector<at::Tensor> split_with_sizes(const at::Tensor & self, at::IntArrayRef split_sizes, int64_t dim) {
return wrapper_NestedTensorCPU__split_with_sizes(self, c10::fromIntArrayRefSlow(split_sizes), dim);
}
::std::vector<at::Tensor> split_with_sizes_symint(const at::Tensor & self, c10::SymIntArrayRef split_sizes, int64_t dim) {
return wrapper_NestedTensorCPU__split_with_sizes(self, split_sizes, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__squeeze(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::squeeze_nested(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("squeeze",
TORCH_FN(wrapper_NestedTensorCPU__squeeze));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor squeeze(const at::Tensor & self) {
return wrapper_NestedTensorCPU__squeeze(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_dim_squeeze(const at::Tensor & self, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::squeeze_dim_nested(self, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("squeeze.dim",
TORCH_FN(wrapper_NestedTensorCPU_dim_squeeze));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor squeeze(const at::Tensor & self, int64_t dim) {
return wrapper_NestedTensorCPU_dim_squeeze(self, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_dims_squeeze(const at::Tensor & self, at::IntArrayRef dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::squeeze_dim_nested(self, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("squeeze.dims",
TORCH_FN(wrapper_NestedTensorCPU_dims_squeeze));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor squeeze(const at::Tensor & self, at::IntArrayRef dim) {
return wrapper_NestedTensorCPU_dims_squeeze(self, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_dim_IntList_sum(const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim, ::std::optional<at::ScalarType> dtype) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sum_dim_CPU(self, dim, keepdim, dtype);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("sum.dim_IntList",
TORCH_FN(wrapper_NestedTensorCPU_dim_IntList_sum));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor sum(const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim, ::std::optional<at::ScalarType> dtype) {
return wrapper_NestedTensorCPU_dim_IntList_sum(self, dim, keepdim, dtype);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_sum_backward(const at::Tensor & grad, const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim) {
    // No device check
  // DeviceGuard omitted
  return at::native::_nested_sum_backward_cpu(grad, self, dim, keepdim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_sum_backward",
TORCH_FN(wrapper_NestedTensorCPU___nested_sum_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_sum_backward(const at::Tensor & grad, const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim) {
return wrapper_NestedTensorCPU___nested_sum_backward(grad, self, dim, keepdim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__sqrt(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sqrt(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("sqrt",
TORCH_FN(wrapper_NestedTensorCPU__sqrt));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor sqrt(const at::Tensor & self) {
return wrapper_NestedTensorCPU__sqrt(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__tanh(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_tanh(self);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU__tanh_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_tanh_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("tanh",
TORCH_FN(wrapper_NestedTensorCPU__tanh));
m.impl("tanh_",
TORCH_FN(wrapper_NestedTensorCPU__tanh_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor tanh(const at::Tensor & self) {
return wrapper_NestedTensorCPU__tanh(self);
}
at::Tensor & tanh_(at::Tensor & self) {
return wrapper_NestedTensorCPU__tanh_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__threshold_backward(const at::Tensor & grad_output, const at::Tensor & self, const at::Scalar & threshold) {
    // No device check
  // DeviceGuard omitted
  return at::native::threshold_backwards_nested(grad_output, self, threshold);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("threshold_backward",
TORCH_FN(wrapper_NestedTensorCPU__threshold_backward));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor threshold_backward(const at::Tensor & grad_output, const at::Tensor & self, const at::Scalar & threshold) {
return wrapper_NestedTensorCPU__threshold_backward(grad_output, self, threshold);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_int_transpose(const at::Tensor & self, int64_t dim0, int64_t dim1) {
    // No device check
  // DeviceGuard omitted
  return at::native::transpose_nested(self, dim0, dim1);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("transpose.int",
TORCH_FN(wrapper_NestedTensorCPU_int_transpose));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor transpose(const at::Tensor & self, int64_t dim0, int64_t dim1) {
return wrapper_NestedTensorCPU_int_transpose(self, dim0, dim1);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> wrapper_NestedTensorCPU___transform_bias_rescale_qkv(const at::Tensor & qkv, const at::Tensor & qkv_bias, int64_t num_heads) {
    // No device check
  // DeviceGuard omitted
  return at::native::transform_bias_rescale_qkv_cpu(qkv, qkv_bias, num_heads);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_transform_bias_rescale_qkv",
TORCH_FN(wrapper_NestedTensorCPU___transform_bias_rescale_qkv));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor,at::Tensor> _transform_bias_rescale_qkv(const at::Tensor & qkv, const at::Tensor & qkv_bias, int64_t num_heads) {
return wrapper_NestedTensorCPU___transform_bias_rescale_qkv(qkv, qkv_bias, num_heads);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_tensor_size(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::_nested_tensor_size(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_tensor_size",
TORCH_FN(wrapper_NestedTensorCPU___nested_tensor_size));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_tensor_size(const at::Tensor & self) {
return wrapper_NestedTensorCPU___nested_tensor_size(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_tensor_strides(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::_nested_tensor_strides(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_tensor_strides",
TORCH_FN(wrapper_NestedTensorCPU___nested_tensor_strides));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_tensor_strides(const at::Tensor & self) {
return wrapper_NestedTensorCPU___nested_tensor_strides(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_tensor_storage_offsets(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::_nested_tensor_storage_offsets(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_tensor_storage_offsets",
TORCH_FN(wrapper_NestedTensorCPU___nested_tensor_storage_offsets));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_tensor_storage_offsets(const at::Tensor & self) {
return wrapper_NestedTensorCPU___nested_tensor_storage_offsets(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_from_padded_and_nested_example(const at::Tensor & padded, const at::Tensor & nt_example) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_from_padded_and_nested_example(padded, nt_example);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_from_padded_and_nested_example",
TORCH_FN(wrapper_NestedTensorCPU___nested_from_padded_and_nested_example));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_from_padded_and_nested_example(const at::Tensor & padded, const at::Tensor & nt_example) {
return wrapper_NestedTensorCPU___nested_from_padded_and_nested_example(padded, nt_example);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__unsqueeze(const at::Tensor & self, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::unsqueeze_nested(self, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("unsqueeze",
TORCH_FN(wrapper_NestedTensorCPU__unsqueeze));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor unsqueeze(const at::Tensor & self, int64_t dim) {
return wrapper_NestedTensorCPU__unsqueeze(self, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_self_where(const at::Tensor & condition, const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_where(condition, self, other);
}
} // anonymous namespace
namespace {
at::Tensor & wrapper_NestedTensorCPU_self_out_where_out(const at::Tensor & condition, const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_where_out(condition, self, other, out);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("where.self",
TORCH_FN(wrapper_NestedTensorCPU_self_where));
m.impl("where.self_out",
TORCH_FN(wrapper_NestedTensorCPU_self_out_where_out));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor where(const at::Tensor & condition, const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_self_where(condition, self, other);
}
at::Tensor & where_out(at::Tensor & out, const at::Tensor & condition, const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_self_out_where_out(condition, self, other, out);
}
at::Tensor & where_outf(const at::Tensor & condition, const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
return wrapper_NestedTensorCPU_self_out_where_out(condition, self, other, out);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__clone(const at::Tensor & self, ::std::optional<at::MemoryFormat> memory_format) {
    // No device check
  // DeviceGuard omitted
  return at::native::clone_nested(self, memory_format);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("clone",
TORCH_FN(wrapper_NestedTensorCPU__clone));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor clone(const at::Tensor & self, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU__clone(self, memory_format);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor & wrapper_NestedTensorCPU__zero_(at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::zero_nested_(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("zero_",
TORCH_FN(wrapper_NestedTensorCPU__zero_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor & zero_(at::Tensor & self) {
return wrapper_NestedTensorCPU__zero_(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Tensor_sub(const at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_sub_Tensor(self, other, alpha);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("sub.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_sub));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor sub(const at::Tensor & self, const at::Tensor & other, const at::Scalar & alpha) {
return wrapper_NestedTensorCPU_Tensor_sub(self, other, alpha);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__values(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::values_nested(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("values",
TORCH_FN(wrapper_NestedTensorCPU__values));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor values(const at::Tensor & self) {
return wrapper_NestedTensorCPU__values(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::vector<at::Tensor> wrapper_NestedTensorCPU_int_unbind(const at::Tensor & self, int64_t dim) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_unbind(self, dim);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("unbind.int",
TORCH_FN(wrapper_NestedTensorCPU_int_unbind));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::vector<at::Tensor> unbind(const at::Tensor & self, int64_t dim) {
return wrapper_NestedTensorCPU_int_unbind(self, dim);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___to_copy(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, bool non_blocking, ::std::optional<at::MemoryFormat> memory_format) {
    // No device check
  // DeviceGuard omitted
  return at::native::_to_copy_nested(self, dtype, layout, device, pin_memory, non_blocking, memory_format);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_to_copy",
TORCH_FN(wrapper_NestedTensorCPU___to_copy));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _to_copy(const at::Tensor & self, at::TensorOptions options, bool non_blocking, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU___to_copy(self, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), non_blocking, c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
}
at::Tensor _to_copy(const at::Tensor & self, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, bool non_blocking, ::std::optional<at::MemoryFormat> memory_format) {
return wrapper_NestedTensorCPU___to_copy(self, dtype, layout, device, pin_memory, non_blocking, memory_format);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_masked_fill(const at::Tensor & self, const at::Tensor & mask, const at::Scalar & value) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_masked_fill(self, mask, value);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("masked_fill.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_masked_fill));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor masked_fill(const at::Tensor & self, const at::Tensor & mask, const at::Scalar & value) {
return wrapper_NestedTensorCPU_Scalar_masked_fill(self, mask, value);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__view(const at::Tensor & self, c10::SymIntArrayRef size) {
    // No device check
  // DeviceGuard omitted
  return at::native::view_nested(self, C10_AS_INTARRAYREF_SLOW(size));
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("view",
TORCH_FN(wrapper_NestedTensorCPU__view));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor view(const at::Tensor & self, at::IntArrayRef size) {
return wrapper_NestedTensorCPU__view(self, c10::fromIntArrayRefSlow(size));
}
at::Tensor view_symint(const at::Tensor & self, c10::SymIntArrayRef size) {
return wrapper_NestedTensorCPU__view(self, size);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_eq(const at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::eq_scalar_nested(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("eq.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_eq));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor eq(const at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_eq(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Tensor_eq(const at::Tensor & self, const at::Tensor & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::eq_tensor_nested(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("eq.Tensor",
TORCH_FN(wrapper_NestedTensorCPU_Tensor_eq));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor eq(const at::Tensor & self, const at::Tensor & other) {
return wrapper_NestedTensorCPU_Tensor_eq(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_ge(const at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::ge_scalar_nested(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("ge.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_ge));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor ge(const at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_ge(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_Scalar_gt(const at::Tensor & self, const at::Scalar & other) {
    // No device check
  // DeviceGuard omitted
  return at::native::gt_scalar_nested(self, other);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("gt.Scalar",
TORCH_FN(wrapper_NestedTensorCPU_Scalar_gt));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor gt(const at::Tensor & self, const at::Scalar & other) {
return wrapper_NestedTensorCPU_Scalar_gt(self, other);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor & wrapper_NestedTensorCPU__normal_(at::Tensor & self, double mean, double std, ::std::optional<at::Generator> generator) {
    // No device check
  // DeviceGuard omitted
  return at::native::normal_nested_(self, mean, std, generator);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("normal_",
TORCH_FN(wrapper_NestedTensorCPU__normal_));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor & normal_(at::Tensor & self, double mean, double std, ::std::optional<at::Generator> generator) {
return wrapper_NestedTensorCPU__normal_(self, mean, std, generator);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__alias(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::alias_nested(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("alias",
TORCH_FN(wrapper_NestedTensorCPU__alias));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor alias(const at::Tensor & self) {
return wrapper_NestedTensorCPU__alias(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__isinf(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_isinf(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("isinf",
TORCH_FN(wrapper_NestedTensorCPU__isinf));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor isinf(const at::Tensor & self) {
return wrapper_NestedTensorCPU__isinf(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__isposinf(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_isposinf(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("isposinf",
TORCH_FN(wrapper_NestedTensorCPU__isposinf));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor isposinf(const at::Tensor & self) {
return wrapper_NestedTensorCPU__isposinf(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__isneginf(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_isneginf(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("isneginf",
TORCH_FN(wrapper_NestedTensorCPU__isneginf));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor isneginf(const at::Tensor & self) {
return wrapper_NestedTensorCPU__isneginf(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_fullcoverage__test_autograd_multiple_dispatch(const at::Tensor & self) {
    // No device check
  // DeviceGuard omitted
  return at::native::_test_autograd_multiple_dispatch_fullcoverage(self);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_test_autograd_multiple_dispatch.fullcoverage",
TORCH_FN(wrapper_NestedTensorCPU_fullcoverage__test_autograd_multiple_dispatch));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _test_autograd_multiple_dispatch(const at::Tensor & self) {
return wrapper_NestedTensorCPU_fullcoverage__test_autograd_multiple_dispatch(self);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU_ntonly__test_autograd_multiple_dispatch(const at::Tensor & self, bool b) {
    // No device check
  // DeviceGuard omitted
  return at::native::_test_autograd_multiple_dispatch_ntonly(self, b);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_test_autograd_multiple_dispatch.ntonly",
TORCH_FN(wrapper_NestedTensorCPU_ntonly__test_autograd_multiple_dispatch));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _test_autograd_multiple_dispatch(const at::Tensor & self, bool b) {
return wrapper_NestedTensorCPU_ntonly__test_autograd_multiple_dispatch(self, b);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU__to_padded_tensor(const at::Tensor & self, double padding, at::OptionalSymIntArrayRef output_size) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_to_padded_tensor_generic(self, padding, output_size.has_value() ? ::std::make_optional(C10_AS_INTARRAYREF_SLOW(*output_size)) : ::std::nullopt);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("to_padded_tensor",
TORCH_FN(wrapper_NestedTensorCPU__to_padded_tensor));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor to_padded_tensor(const at::Tensor & self, double padding, at::OptionalIntArrayRef output_size) {
return wrapper_NestedTensorCPU__to_padded_tensor(self, padding, output_size.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*output_size)) : ::std::nullopt);
}
at::Tensor to_padded_tensor_symint(const at::Tensor & self, double padding, at::OptionalSymIntArrayRef output_size) {
return wrapper_NestedTensorCPU__to_padded_tensor(self, padding, output_size);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___nested_tensor_softmax_with_shape(const at::Tensor & self, const at::Tensor & query) {
    // No device check
  // DeviceGuard omitted
  return at::native::NestedTensor_softmax_dropout(self, query);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_nested_tensor_softmax_with_shape",
TORCH_FN(wrapper_NestedTensorCPU___nested_tensor_softmax_with_shape));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _nested_tensor_softmax_with_shape(const at::Tensor & self, const at::Tensor & query) {
return wrapper_NestedTensorCPU___nested_tensor_softmax_with_shape(self, query);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___safe_softmax(const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype) {
    // No device check
  // DeviceGuard omitted
  return at::native::_safe_softmax(self, dim, dtype);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_safe_softmax",
TORCH_FN(wrapper_NestedTensorCPU___safe_softmax));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _safe_softmax(const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype) {
return wrapper_NestedTensorCPU___safe_softmax(self, dim, dtype);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
at::Tensor wrapper_NestedTensorCPU___transformer_encoder_layer_fwd(const at::Tensor & src, int64_t embed_dim, int64_t num_heads, const at::Tensor & qkv_weight, const at::Tensor & qkv_bias, const at::Tensor & proj_weight, const at::Tensor & proj_bias, bool use_gelu, bool norm_first, double eps, const at::Tensor & norm_weight_1, const at::Tensor & norm_bias_1, const at::Tensor & norm_weight_2, const at::Tensor & norm_bias_2, const at::Tensor & ffn_weight_1, const at::Tensor & ffn_bias_1, const at::Tensor & ffn_weight_2, const at::Tensor & ffn_bias_2, const ::std::optional<at::Tensor> & mask, ::std::optional<int64_t> mask_type) {
    // No device check
  // DeviceGuard omitted
  return at::native::transformer_encoder_layer_forward(src, embed_dim, num_heads, qkv_weight, qkv_bias, proj_weight, proj_bias, use_gelu, norm_first, eps, norm_weight_1, norm_bias_1, norm_weight_2, norm_bias_2, ffn_weight_1, ffn_bias_1, ffn_weight_2, ffn_bias_2, mask, mask_type);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_transformer_encoder_layer_fwd",
TORCH_FN(wrapper_NestedTensorCPU___transformer_encoder_layer_fwd));
}
} // anonymous namespace
namespace nestedtensorcpu {
at::Tensor _transformer_encoder_layer_fwd(const at::Tensor & src, int64_t embed_dim, int64_t num_heads, const at::Tensor & qkv_weight, const at::Tensor & qkv_bias, const at::Tensor & proj_weight, const at::Tensor & proj_bias, bool use_gelu, bool norm_first, double eps, const at::Tensor & norm_weight_1, const at::Tensor & norm_bias_1, const at::Tensor & norm_weight_2, const at::Tensor & norm_bias_2, const at::Tensor & ffn_weight_1, const at::Tensor & ffn_bias_1, const at::Tensor & ffn_weight_2, const at::Tensor & ffn_bias_2, const ::std::optional<at::Tensor> & mask, ::std::optional<int64_t> mask_type) {
return wrapper_NestedTensorCPU___transformer_encoder_layer_fwd(src, embed_dim, num_heads, qkv_weight, qkv_bias, proj_weight, proj_bias, use_gelu, norm_first, eps, norm_weight_1, norm_bias_1, norm_weight_2, norm_bias_2, ffn_weight_1, ffn_bias_1, ffn_weight_2, ffn_bias_2, mask, mask_type);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
::std::tuple<at::Tensor,at::Tensor> wrapper_NestedTensorCPU___native_multi_head_attention(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, int64_t embed_dim, int64_t num_head, const at::Tensor & qkv_weight, const at::Tensor & qkv_bias, const at::Tensor & proj_weight, const at::Tensor & proj_bias, const ::std::optional<at::Tensor> & mask, bool need_weights, bool average_attn_weights, ::std::optional<int64_t> mask_type) {
    // No device check
  // DeviceGuard omitted
  return at::native::native_multi_head_attention_cpu(query, key, value, embed_dim, num_head, qkv_weight, qkv_bias, proj_weight, proj_bias, mask, need_weights, average_attn_weights, mask_type);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_native_multi_head_attention",
TORCH_FN(wrapper_NestedTensorCPU___native_multi_head_attention));
}
} // anonymous namespace
namespace nestedtensorcpu {
::std::tuple<at::Tensor,at::Tensor> _native_multi_head_attention(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, int64_t embed_dim, int64_t num_head, const at::Tensor & qkv_weight, const at::Tensor & qkv_bias, const at::Tensor & proj_weight, const at::Tensor & proj_bias, const ::std::optional<at::Tensor> & mask, bool need_weights, bool average_attn_weights, ::std::optional<int64_t> mask_type) {
return wrapper_NestedTensorCPU___native_multi_head_attention(query, key, value, embed_dim, num_head, qkv_weight, qkv_bias, proj_weight, proj_bias, mask, need_weights, average_attn_weights, mask_type);
}
} // namespace nestedtensorcpu
} // namespace at
namespace at {
// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid
// ambiguity with conflicting identifiers that may have been defined in
// at namespace already.
namespace {
namespace {
int64_t wrapper_NestedTensorCPU___fused_sdp_choice(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, const ::std::optional<at::Tensor> & attn_mask, double dropout_p, bool is_causal, ::std::optional<double> scale, bool enable_gqa) {
    // No device check
  // DeviceGuard omitted
  return at::native::_fused_sdp_choice_cpp(query, key, value, attn_mask, dropout_p, is_causal, scale, enable_gqa);
}
} // anonymous namespace
TORCH_LIBRARY_IMPL(aten, NestedTensorCPU, m) {
    m.impl("_fused_sdp_choice",
TORCH_FN(wrapper_NestedTensorCPU___fused_sdp_choice));
}
} // anonymous namespace
namespace nestedtensorcpu {
int64_t _fused_sdp_choice(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, const ::std::optional<at::Tensor> & attn_mask, double dropout_p, bool is_causal, ::std::optional<double> scale, bool enable_gqa) {
return wrapper_NestedTensorCPU___fused_sdp_choice(query, key, value, attn_mask, dropout_p, is_causal, scale, enable_gqa);
}
} // namespace nestedtensorcpu
} // namespace at
