René's URL Explorer Experiment


Title: Stable Operators — PyTorch main documentation

Description: Stable ABI operator API in PyTorch C++ — StableLibrary and boxed kernel registration.

Keywords:

direct link

Domain: docs.pytorch.org


Hey, it has json ld scripts:
    {
       "@context": "https://schema.org",
       "@type": "Article",
       "name": "Stable Operators",
       "headline": "Stable Operators",
       "description": "Stable ABI operator API in PyTorch C++ \u2014 StableLibrary and boxed kernel registration.",
       "url": "/api/stable/operators.html",
       "articleBody": "Stable Operators# The stable API provides tensor operations that maintain binary compatibility across PyTorch versions. Tensor Class# class Tensor# An ABI stable wrapper around PyTorch tensors. This class is modeled after TensorBase, as custom op kernels primarily need to interact with Tensor metadata (sizes, strides, device, dtype). Other tensor operations (like empty_like) exist as standalone functions outside of this struct. Minimum compatible version: PyTorch 2.9. Public Functions inline Tensor()# Constructs a Tensor with an uninitialized AtenTensorHandle. Creates a new stable::Tensor by allocating an uninitialized tensor handle. The ownership of the handle is managed internally via shared_ptr. Minimum compatible version: PyTorch 2.9. inline explicit Tensor(AtenTensorHandle ath)# Constructs a Tensor from an existing AtenTensorHandle. Steals ownership of the provided AtenTensorHandle. Minimum compatible version: PyTorch 2.9. Parameters: ath \u2013 The AtenTensorHandle to wrap. Ownership is transferred to this Tensor. inline AtenTensorHandle get() const# Returns a borrowed reference to the underlying AtenTensorHandle. Minimum compatible version: PyTorch 2.9. Returns: The underlying AtenTensorHandle. inline void *data_ptr() const# Returns a pointer to the tensor\u2019s data. Minimum compatible version: PyTorch 2.9. Returns: A void pointer to the tensor\u2019s data storage. inline void *mutable_data_ptr() const# Returns a mutable pointer to the tensor\u2019s data. Minimum compatible version: PyTorch 2.10. Returns: A mutable void pointer to the tensor\u2019s data storage. inline const void *const_data_ptr() const# Returns a const pointer to the tensor\u2019s data. Minimum compatible version: PyTorch 2.10. Returns: A const void pointer to the tensor\u2019s data storage. template\u003ctypename T\u003eT *mutable_data_ptr() const# Returns a typed mutable pointer to the tensor\u2019s data. Minimum compatible version: PyTorch 2.10. Template Parameters: T \u2013 The type to cast the data pointer to. Returns: A mutable pointer to the tensor\u2019s data cast to type T*. EiEEENK5torch6stable6Tensor14const_data_ptrEv\"\u003etemplate\u003ctypename T, std::enable_if_t\u003c!std::is_const_v\u003cT\u003e, int\u003e = 0\u003econst T *const_data_ptr() const# Returns a typed const pointer to the tensor\u2019s data. Minimum compatible version: PyTorch 2.10. Template Parameters: T \u2013 The type to cast the data pointer to. Must not be const-qualified. Returns: A const pointer to the tensor\u2019s data cast to type const T*. inline const Tensor \u0026set_requires_grad(bool requires_grad) const# Sets whether this tensor requires gradient computation. Minimum compatible version: PyTorch 2.10. Parameters: requires_grad \u2013 If true, gradients will be computed for this tensor during backpropagation. Returns: A reference to this Tensor. inline int64_t dim() const# Returns the number of dimensions of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The number of dimensions (rank) of the tensor. inline int64_t numel() const# Returns the total number of elements in the tensor. Minimum compatible version: PyTorch 2.9. Returns: The total number of elements across all dimensions. inline IntHeaderOnlyArrayRef sizes() const# Returns the sizes (shape) of the tensor. Returns a borrowed reference of the dimension sizes of the tensor. Minimum compatible version: PyTorch 2.9. Returns: An IntHeaderOnlyArrayRef containing the size of each dimension. inline IntHeaderOnlyArrayRef strides() const# Returns the strides of the tensor. Returns a borrowed reference of the strides of the tensor. Minimum compatible version: PyTorch 2.9. Returns: An IntHeaderOnlyArrayRef containing the stride of each dimension. inline bool is_contiguous() const# Checks if the tensor is contiguous in memory. Minimum compatible version: PyTorch 2.9. Note This is a subset of the original TensorBase API. It takes no arguments whereas the original API takes a memory format argument. Here, we assume the default contiguous memory format. Returns: true if the tensor is contiguous, false otherwise. inline int64_t stride(int64_t dim) const# Returns the stride of a specific dimension. Minimum compatible version: PyTorch 2.9. Parameters: dim \u2013 The dimension index to query. Returns: The stride of the specified dimension. inline DeviceIndex get_device_index() const# Returns the device index of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The device index as DeviceIndex (int32_t). inline bool is_cuda() const# Checks if the tensor is on a CUDA device. Minimum compatible version: PyTorch 2.9. Returns: true if the tensor is on a CUDA device, false otherwise. inline bool is_cpu() const# Checks if the tensor is on the CPU. Minimum compatible version: PyTorch 2.9. Returns: true if the tensor is on the CPU, false otherwise. inline int64_t size(int64_t dim) const# Returns the size of a specific dimension. Minimum compatible version: PyTorch 2.9. Parameters: dim \u2013 The dimension index to query. Returns: The size of the specified dimension. inline bool defined() const# Checks if the tensor is defined (not null). Minimum compatible version: PyTorch 2.9. Returns: true if the tensor is defined, false otherwise. inline int64_t storage_offset() const# Returns the storage offset of the tensor. The storage offset is the number of elements from the beginning of the underlying storage to the first element of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The storage offset in number of elements. inline size_t element_size() const# Returns the size in bytes of each element in the tensor. Minimum compatible version: PyTorch 2.9. Returns: The element size in bytes. ScalarType scalar_type() const# Returns the scalar type (dtype) of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The ScalarType of the tensor. Device device() const# Returns the device of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The Device on which the tensor resides. Layout layout() const# Returns the layout of the tensor. Minimum compatible version: PyTorch 2.9. Returns: The Layout of the tensor (e.g., Strided, Sparse). Example: torch::stable::Tensor tensor = torch::stable::empty({3, 4}, ...); float* data = tensor.data_ptr\u003cfloat\u003e(); auto shape = tensor.sizes(); Device Class# class Device# A stable version of c10::Device. Minimum compatible version: PyTorch 2.9. Public Functions inline Device(DeviceType type, DeviceIndex index = -1)# Constructs a Device from a DeviceType and optional device index. Minimum compatible version: PyTorch 2.9. Parameters: type \u2013 The type of device (e.g., DeviceType::CPU, DeviceType::CUDA). index \u2013 The device index. Default is -1 (current device). Device(const std::string \u0026device_string)# Constructs a stable::Device from a string description. The string must follow the schema: (cpu|cuda|\u2026)[:\u003cdevice-index\u003e] Minimum compatible version: PyTorch 2.10. Parameters: device_string \u2013 A string describing the device (e.g., \u201ccuda:0\u201d, \u201ccpu\u201d). inline bool operator==(const Device \u0026other) const noexcept# Checks if two devices are equal. Minimum compatible version: PyTorch 2.9. Parameters: other \u2013 The device to compare with. Returns: true if both type and index match, false otherwise. inline bool operator!=(const Device \u0026other) const noexcept# Checks if two devices are not equal. Minimum compatible version: PyTorch 2.9. Parameters: other \u2013 The device to compare with. Returns: true if type or index differ, false otherwise. inline void set_index(DeviceIndex index)# Sets the device index. Minimum compatible version: PyTorch 2.9. Parameters: index \u2013 The new device index. inline DeviceType type() const noexcept# Returns the device type. Minimum compatible version: PyTorch 2.9. Returns: The DeviceType of this device. inline DeviceIndex index() const noexcept# Returns the device index. Minimum compatible version: PyTorch 2.9. Returns: The device index, or -1 if no specific index is set. inline bool has_index() const noexcept# Checks if this device has a specific index. Minimum compatible version: PyTorch 2.9. Returns: true if index is not -1, false otherwise. inline bool is_cuda() const noexcept# Checks if this is a CUDA device. Minimum compatible version: PyTorch 2.9. Returns: true if the device type is CUDA, false otherwise. inline bool is_cpu() const noexcept# Checks if this is a CPU device. Minimum compatible version: PyTorch 2.9. Returns: true if the device type is CPU, false otherwise. Example: torch::stable::Device cpu_device(torch::headeronly::DeviceType::CPU); torch::stable::Device cuda_device(torch::headeronly::DeviceType::CUDA, 0); Tensor Creation# inline torch::stable::Tensor torch::stable::empty(torch::headeronly::IntHeaderOnlyArrayRef size, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt, std::optional\u003ctorch::headeronly::Layout\u003e layout = std::nullopt, std::optional\u003ctorch::stable::Device\u003e device = std::nullopt, std::optional\u003cbool\u003e pin_memory = std::nullopt, std::optional\u003ctorch::headeronly::MemoryFormat\u003e memory_format = std::nullopt)# Stable version of the empty.memory_format op. Creates a new uninitialized tensor with the specified size and options. This function supports full tensor creation options including device, dtype, layout, and memory format. Minimum compatible version: PyTorch 2.10. Parameters: size \u2013 The desired size of the output tensor. dtype \u2013 Optional scalar type for the tensor elements. layout \u2013 Optional memory layout (e.g., strided, sparse). device \u2013 Optional device to place the tensor on. pin_memory \u2013 Optional flag to use pinned memory (for CUDA tensors). memory_format \u2013 Optional memory format for the tensor. Returns: A new uninitialized tensor with the specified properties. inline torch::stable::Tensor torch::stable::empty_like(const torch::stable::Tensor \u0026self)# Stable version of the empty_like op. Creates a new uninitialized tensor with the same size, dtype, layout, and device as the input tensor. This version does not support kwargs (device, dtype, layout, memory_format) - kwargs support may be added in the future. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor whose properties will be used for the new tensor. Returns: A new uninitialized tensor with the same properties as self. inline torch::stable::Tensor torch::stable::new_empty(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef size, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt, std::optional\u003ctorch::headeronly::Layout\u003e layout = std::nullopt, std::optional\u003ctorch::stable::Device\u003e device = std::nullopt, std::optional\u003cbool\u003e pin_memory = std::nullopt)# Stable version of the new_empty op (2.10 version with full kwargs). Creates a new uninitialized tensor with the specified size and options. This version supports all tensor creation kwargs. For versions \u003c 2.10, a simpler overload that only takes dtype is available. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor whose properties may be inherited if kwargs are not provided. size \u2013 The desired size of the output tensor. dtype \u2013 Optional scalar type for the tensor elements. layout \u2013 Optional memory layout (e.g., strided, sparse). device \u2013 Optional device to place the tensor on. pin_memory \u2013 Optional flag to use pinned memory (for CUDA tensors). Returns: A new uninitialized tensor with the specified properties. inline torch::stable::Tensor torch::stable::new_zeros(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef size, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt, std::optional\u003ctorch::headeronly::Layout\u003e layout = std::nullopt, std::optional\u003ctorch::stable::Device\u003e device = std::nullopt, std::optional\u003cbool\u003e pin_memory = std::nullopt)# Stable version of the new_zeros op (2.10 version with full kwargs). Creates a new zero-filled tensor with the specified size and options. This version supports all tensor creation kwargs. For versions \u003c 2.10, a simpler overload that only takes dtype is available. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor whose properties may be inherited if kwargs are not provided. size \u2013 The desired size of the output tensor. dtype \u2013 Optional scalar type for the tensor elements. layout \u2013 Optional memory layout (e.g., strided, sparse). device \u2013 Optional device to place the tensor on. pin_memory \u2013 Optional flag to use pinned memory (for CUDA tensors). Returns: A new zero-filled tensor with the specified properties. inline torch::stable::Tensor torch::stable::full(torch::headeronly::IntHeaderOnlyArrayRef size, double fill_value, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt, std::optional\u003ctorch::headeronly::Layout\u003e layout = std::nullopt, std::optional\u003ctorch::stable::Device\u003e device = std::nullopt, std::optional\u003cbool\u003e pin_memory = std::nullopt)# Stable version of the full.default op. Creates a tensor of the specified size filled with the given value. Minimum compatible version: PyTorch 2.10. Note The fill_value parameter is typed C shim API uses double for the Scalar parameter. Parameters: size \u2013 The desired size of the output tensor. fill_value \u2013 The value to fill the tensor with. dtype \u2013 Optional scalar type for the tensor elements. layout \u2013 Optional memory layout. device \u2013 Optional device to place the tensor on. pin_memory \u2013 Optional flag to use pinned memory. Returns: A new tensor filled with the specified value. inline torch::stable::Tensor torch::stable::from_blob(void *data, torch::headeronly::IntHeaderOnlyArrayRef sizes, torch::headeronly::IntHeaderOnlyArrayRef strides, torch::stable::Device device, torch::headeronly::ScalarType dtype, int64_t storage_offset = 0, torch::headeronly::Layout layout = torch::headeronly::Layout::Strided)# Creates a tensor from an existing data blob. Creates a tensor that uses the provided data pointer as its storage. The tensor does not own the data, so the caller must ensure the data remains valid for the lifetime of the tensor. Minimum compatible version: PyTorch 2.10. Parameters: data \u2013 Pointer to the data buffer. sizes \u2013 The size of each dimension of the tensor. strides \u2013 The stride for each dimension. device \u2013 The device where the data resides. dtype \u2013 The scalar type of the data. storage_offset \u2013 The offset into the data buffer. Defaults to 0. layout \u2013 The memory layout. Defaults to Strided. Returns: A tensor backed by the provided data. Example: auto tensor = torch::stable::empty( {3, 4}, torch::headeronly::ScalarType::Float, torch::headeronly::Layout::Strided, torch::stable::Device(torch::headeronly::DeviceType::CUDA, 0), false, torch::headeronly::MemoryFormat::Contiguous); Tensor Manipulation# inline torch::stable::Tensor torch::stable::clone(const torch::stable::Tensor \u0026self)# Stable version of the clone op. Returns a copy of the input tensor. The returned tensor has the same data and type as the input, but is stored in a new memory location. Minimum compatible version: PyTorch 2.9. Note Optional memory_format kwarg support Parameters: self \u2013 The input tensor to clone. Returns: A new tensor with copied data. inline torch::stable::Tensor torch::stable::contiguous(const torch::stable::Tensor \u0026self, torch::headeronly::MemoryFormat memory_format = torch::headeronly::MemoryFormat::Contiguous)# Stable version of the contiguous op. Returns a contiguous in memory tensor containing the same data as the input tensor. If the input tensor is already contiguous in the specified memory format, the input tensor is returned. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. memory_format \u2013 The desired memory format. Returns: A contiguous tensor. inline torch::stable::Tensor torch::stable::reshape(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef shape)# Stable version of the reshape op. Returns a tensor with the same data and number of elements as the input, but with the specified shape. When possible, the returned tensor will be a view of the input. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. shape \u2013 The desired output shape. Returns: A tensor with the specified shape. inline torch::stable::Tensor torch::stable::view(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef size)# Stable version of the view op. Returns a new tensor with the same data as the input tensor but with a different shape. The returned tensor shares the same data and must have the same number of elements. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. size \u2013 The desired output shape. Returns: A view tensor with the specified shape. inline torch::stable::Tensor torch::stable::flatten(const torch::stable::Tensor \u0026self, int64_t start_dim = 0, int64_t end_dim = -1)# Stable version of the flatten.using_ints op. Flattens the input tensor by reshaping it into a one-dimensional tensor. If start_dim or end_dim are specified, only dimensions starting from start_dim to end_dim are flattened. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor to flatten. start_dim \u2013 The first dimension to flatten. Defaults to 0. end_dim \u2013 The last dimension to flatten. Defaults to -1 (last dim). Returns: A flattened tensor. inline torch::stable::Tensor torch::stable::squeeze(const torch::stable::Tensor \u0026self, int64_t dim)# Stable version of the squeeze.dim op. Returns a tensor with the dimension of size one at the specified position removed. The returned tensor shares the same underlying data with the input tensor. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor. dim \u2013 The dimension to squeeze. the tensor is returned unchanged. Returns: A tensor with the specified dimension removed (if size was 1). inline torch::stable::Tensor torch::stable::unsqueeze(const torch::stable::Tensor \u0026self, int64_t dim)# Stable version of the unsqueeze op. Returns a new tensor with a dimension of size one inserted at the specified position. The returned tensor shares the same underlying data with the input tensor. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor. dim \u2013 The index at which to insert values are supported. Returns: A tensor with an additional dimension. inline torch::stable::Tensor torch::stable::transpose(const torch::stable::Tensor \u0026self, int64_t dim0, int64_t dim1)# Stable version of the transpose.int op. Returns a tensor that is a transposed version of the input, with dimensions dim0 and dim1 swapped. The returned tensor shares storage with the input. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor. dim0 \u2013 The first dimension to transpose. dim1 \u2013 The second dimension to transpose. Returns: A transposed view of the input tensor. inline torch::stable::Tensor torch::stable::select(const torch::stable::Tensor \u0026self, int64_t dim, int64_t index)# Stable version of the select.int op. Slices the input tensor along the specified dimension at the given index. This function returns a view of the original tensor with the given dimension removed. Minimum compatible version: PyTorch 2.9. Note The index parameter is typed header-only. Parameters: self \u2013 The input tensor. dim \u2013 The dimension to slice. index \u2013 The index to select along the dimension. Returns: A tensor with one fewer dimension. inline torch::stable::Tensor torch::stable::narrow(torch::stable::Tensor \u0026self, int64_t dim, int64_t start, int64_t length)# Stable version of the narrow.default op. Returns a new tensor that is a narrowed version of the input tensor. The dimension dim is narrowed from start to start + length. Minimum compatible version: PyTorch 2.9. Note The start and length parameters is not yet header-only. Parameters: self \u2013 The input tensor to narrow. dim \u2013 The dimension along which to narrow. start \u2013 The starting index for the narrowed dimension. length \u2013 The length of the narrowed dimension. Returns: A new tensor that is a narrowed view of the input. inline torch::stable::Tensor torch::stable::pad(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef pad, const std::string \u0026mode = \"constant\", double value = 0.0)# Stable version of the pad.default op. Pads the input tensor according to the specified padding sizes. The padding is applied symmetrically to each dimension, with the padding sizes specified in reverse order (last dimension first). Minimum compatible version: PyTorch 2.9. Note The pad parameter is typed not yet header-only. Parameters: self \u2013 The input tensor to pad. pad \u2013 The padding sizes for each dimension (in pairs, starting from the last dimension). mode \u2013 The padding mode: \u201cconstant\u201d, \u201creflect\u201d, \u201creplicate\u201d, or \u201ccircular\u201d. Defaults to \u201cconstant\u201d. value \u2013 The fill value for constant padding. Defaults to 0.0. Returns: A new padded tensor. Device and Type Conversion# inline torch::stable::Tensor torch::stable::to(const torch::stable::Tensor \u0026self, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt, std::optional\u003ctorch::headeronly::Layout\u003e layout = std::nullopt, std::optional\u003ctorch::stable::Device\u003e device = std::nullopt, std::optional\u003cbool\u003e pin_memory = std::nullopt, bool non_blocking = false, bool copy = false, std::optional\u003ctorch::headeronly::MemoryFormat\u003e memory_format = std::nullopt)# Stable version of the to.dtype_layout op. Converts a tensor to the specified dtype, layout, device, and/or memory format. Returns a new tensor with the specified properties. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. dtype \u2013 Optional target scalar type. layout \u2013 Optional target memory layout. device \u2013 Optional target device. pin_memory \u2013 Optional flag to use pinned memory. non_blocking \u2013 If true, the operation may be asynchronous. Defaults to false. copy \u2013 If true, always create a copy. Defaults to false. memory_format \u2013 Optional target memory format. Returns: A tensor with the specified properties. inline torch::stable::Tensor torch::stable::to(const torch::stable::Tensor \u0026self, torch::stable::Device device, bool non_blocking = false, bool copy = false)# Convenience overload for moving a tensor to a device. Moves the tensor to the specified device. This is a convenience wrapper around the full to() function. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. device \u2013 The target device. non_blocking \u2013 If true, the operation may be asynchronous. Defaults to false. copy \u2013 If true, always create a copy. Defaults to false. Returns: A tensor on the specified device. In-place Operations# inline torch::stable::Tensor torch::stable::fill_(const torch::stable::Tensor \u0026self, double value)# Stable version of the fill_.Scalar op. Fills the input tensor with the specified scalar value in-place and returns it. This has identical semantics to the existing fill_.Scalar op. Minimum compatible version: PyTorch 2.9. Note The value parameter is typed as double This is because Scalar.h is currently not header-only. Parameters: self \u2013 The tensor to fill. value \u2013 The scalar value to fill the tensor with. Returns: The input tensor, now filled with the specified value. inline torch::stable::Tensor torch::stable::zero_(torch::stable::Tensor \u0026self)# Stable version of the zero_ op. Fills the input tensor with zeros in-place and returns it. Unlike the tensor method version (t.zero_()), this is called as a function: zero_(t). Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The tensor to fill with zeros. Returns: The input tensor, now filled with zeros. inline torch::stable::Tensor torch::stable::copy_(torch::stable::Tensor \u0026self, const torch::stable::Tensor \u0026src, std::optional\u003cbool\u003e non_blocking = std::nullopt)# Stable version of the copy_ op. Copies the elements from the source tensor into the destination tensor in-place and returns the destination tensor. The tensors must be broadcastable. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The destination tensor (modified in-place). src \u2013 The source tensor to copy from. non_blocking \u2013 If true, the copy may occur asynchronously with respect to the host. Defaults to false. Returns: The destination tensor with copied values. Mathematical Operations# inline torch::stable::Tensor torch::stable::matmul(const torch::stable::Tensor \u0026self, const torch::stable::Tensor \u0026other)# Stable version of the matmul op. Performs matrix multiplication between two tensors. The behavior depends on the dimensionality of the tensors (see PyTorch documentation for details on broadcasting rules for matmul). Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The first input tensor. other \u2013 The second input tensor. Returns: The result of matrix multiplication. inline torch::stable::Tensor torch::stable::amax(const torch::stable::Tensor \u0026self, int64_t dim, bool keepdim = false)# Stable version of the amax.default op (single dimension). Computes the maximum value along the specified dimension. If keepdim is true, the output tensor has the same number of dimensions as the input, with the reduced dimension having size 1. Otherwise, the reduced dimension is removed. Minimum compatible version: PyTorch 2.9. Parameters: self \u2013 The input tensor. dim \u2013 The dimension along which to compute the maximum. keepdim \u2013 Whether to retain Returns: A tensor containing the maximum values along the specified dimension. inline torch::stable::Tensor torch::stable::amax(const torch::stable::Tensor \u0026self, torch::headeronly::IntHeaderOnlyArrayRef dims, bool keepdim = false)# Stable version of the amax.default op (multiple dimensions). Computes the maximum value reducing over all the specified dimensions. If keepdim is true, the output tensor has the same number of dimensions as the input, with the reduced dimensions having size 1. Otherwise, the reduced dimensions are removed. Minimum compatible version: PyTorch 2.9. Note The dims parameter is typed is not yet header-only. Parameters: self \u2013 The input tensor. dims \u2013 The dimensions along which to compute the maximum. keepdim \u2013 Whether to retain the reduced dimensions. Defaults to false. Returns: A tensor containing the maximum values. inline torch::stable::Tensor torch::stable::sum(const torch::stable::Tensor \u0026self, std::optional\u003ctorch::headeronly::IntHeaderOnlyArrayRef\u003e dim = std::nullopt, bool keepdim = false, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt)# Stable version of the sum.dim_IntList op. Computes the sum of the input tensor along the specified dimensions. If dim is not provided, sums over all dimensions. Minimum compatible version: PyTorch 2.10. Parameters: self \u2013 The input tensor. dim \u2013 Optional dimensions to reduce. If not provided, reduces all dimensions. keepdim \u2013 Whether to retain the reduced dimensions. Defaults to false. dtype \u2013 Optional output dtype. If not provided, uses the input dtype. Returns: A tensor containing the sum. inline torch::stable::Tensor \u0026torch::stable::sum_out(torch::stable::Tensor \u0026out, const torch::stable::Tensor \u0026self, std::optional\u003ctorch::headeronly::IntHeaderOnlyArrayRef\u003e dim = std::nullopt, bool keepdim = false, std::optional\u003ctorch::headeronly::ScalarType\u003e dtype = std::nullopt)# Stable version of the sum.IntList_out op. Computes the sum of the input tensor along the specified dimensions, storing the result in the provided output tensor. Following C++ convention, the out parameter comes first. Minimum compatible version: PyTorch 2.10. Parameters: out \u2013 The output tensor (modified in-place). self \u2013 The input tensor. dim \u2013 Optional dimensions to reduce. keepdim \u2013 Whether to retain the reduced dimensions. Defaults to false. dtype \u2013 Optional output dtype. Returns: Reference to the output tensor. inline torch::stable::Tensor torch::stable::subtract(const torch::stable::Tensor \u0026self, const torch::stable::Tensor \u0026other, double alpha = 1.0)# Stable version of the subtract.Tensor op. Subtracts the other tensor from self, with an optional scaling factor alpha. Computes: self - alpha * other. Minimum compatible version: PyTorch 2.10. Note The alpha parameter is typed as double API uses double for the Scalar parameter. Parameters: self \u2013 The input tensor. other \u2013 The tensor to subtract. alpha \u2013 The scaling factor for other. Defaults to 1.0. Returns: The result of self - alpha * other.",
       "author": {
         "@type": "Organization",
         "name": "PyTorch Contributors",
         "url": "https://pytorch.org"
       },
       "image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
       "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "/api/stable/operators.html"
       },
       "datePublished": "2023-01-01T00:00:00Z",
       "dateModified": "2023-01-01T00:00:00Z"
     }
 

docsearch:languageen
llm:site-typedocumentation
llm:frameworkPyTorch
llm:descriptionStable ABI operator API in PyTorch C++ — StableLibrary and boxed kernel registration.
llm:navigation-filehttps://pytorch.org/docs/stable/llms.txt
llm:sitemaphttps://pytorch.org/docs/stable/sitemap.xml
llm:versionmain
llm:projectPyTorch
llm:page-typedocumentation
og:imagehttps://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png
None3

Links:

Skip to main contenthttps://docs.pytorch.org/cppdocs/api/stable/operators.html#main-content
Home https://docs.pytorch.org/cppdocs/index.html
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensor Indexinghttps://docs.pytorch.org/cppdocs/api/aten/indexing.html
Tensor Accessorshttps://docs.pytorch.org/cppdocs/api/aten/accessors.html
C10: Core Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/index.html
Device and DeviceTypehttps://docs.pytorch.org/cppdocs/api/c10/device.html
Device Guardshttps://docs.pytorch.org/cppdocs/api/c10/guards.html
Streamshttps://docs.pytorch.org/cppdocs/api/c10/streams.html
Core Typeshttps://docs.pytorch.org/cppdocs/api/c10/types.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/utilities.html
Autograd: Automatic Differentiationhttps://docs.pytorch.org/cppdocs/api/autograd/index.html
Gradient Computationhttps://docs.pytorch.org/cppdocs/api/autograd/gradient.html
Custom Autograd Functionshttps://docs.pytorch.org/cppdocs/api/autograd/custom_functions.html
Gradient Modeshttps://docs.pytorch.org/cppdocs/api/autograd/modes.html
CUDA Supporthttps://docs.pytorch.org/cppdocs/api/cuda/index.html
CUDA Streamshttps://docs.pytorch.org/cppdocs/api/cuda/streams.html
CUDA Guardshttps://docs.pytorch.org/cppdocs/api/cuda/guards.html
CUDA Utility Functionshttps://docs.pytorch.org/cppdocs/api/cuda/utilities.html
XPU Supporthttps://docs.pytorch.org/cppdocs/api/xpu/index.html
XPU Streamshttps://docs.pytorch.org/cppdocs/api/xpu/streams.html
XPU Utility Functionshttps://docs.pytorch.org/cppdocs/api/xpu/utilities.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
Optimizers (torch::optim)https://docs.pytorch.org/cppdocs/api/optim/index.html
Gradient Descent Optimizershttps://docs.pytorch.org/cppdocs/api/optim/gradient_descent.html
Adaptive Learning Rate Optimizershttps://docs.pytorch.org/cppdocs/api/optim/adaptive.html
Second-Order Optimizershttps://docs.pytorch.org/cppdocs/api/optim/second_order.html
Learning Rate Schedulershttps://docs.pytorch.org/cppdocs/api/optim/schedulers.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
Datasetshttps://docs.pytorch.org/cppdocs/api/data/datasets.html
DataLoaderhttps://docs.pytorch.org/cppdocs/api/data/dataloader.html
Samplershttps://docs.pytorch.org/cppdocs/api/data/samplers.html
Transformshttps://docs.pytorch.org/cppdocs/api/data/transforms.html
Serialization (torch::serialize)https://docs.pytorch.org/cppdocs/api/serialize/index.html
Saving and Loadinghttps://docs.pytorch.org/cppdocs/api/serialize/save_load.html
Archiveshttps://docs.pytorch.org/cppdocs/api/serialize/archives.html
Checkpointshttps://docs.pytorch.org/cppdocs/api/serialize/checkpoints.html
Torch Library APIhttps://docs.pytorch.org/cppdocs/api/library/index.html
Operator Registrationhttps://docs.pytorch.org/cppdocs/api/library/registration.html
Custom Classeshttps://docs.pytorch.org/cppdocs/api/library/custom_classes.html
Library Versioninghttps://docs.pytorch.org/cppdocs/api/library/versioning.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
Library Registration Macroshttps://docs.pytorch.org/cppdocs/api/stable/registration.html
Stable Operatorshttps://docs.pytorch.org/cppdocs/api/stable/operators.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/stable/utilities.html
https://docs.pytorch.org/cppdocs/index.html
C++ API Referencehttps://docs.pytorch.org/cppdocs/api/index.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#stable-operators
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-class
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Tensor6TensorEv
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
stable::Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Tensor6TensorE16AtenTensorHandle
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor3getEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor8data_ptrEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor16mutable_data_ptrEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor14const_data_ptrEv
Thttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0ENK5torch6stable6Tensor16mutable_data_ptrEP1Tv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0ENK5torch6stable6Tensor16mutable_data_ptrEP1Tv
Thttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0_NSt11enable_if_tIXntNSt10is_const_vI1TEEEiEEENK5torch6stable6Tensor14const_data_ptrEPK1Tv
Thttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0_NSt11enable_if_tIXntNSt10is_const_vI1TEEEiEEENK5torch6stable6Tensor14const_data_ptrEPK1Tv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0_NSt11enable_if_tIXntNSt10is_const_vI1TEEEiEEENK5torch6stable6Tensor14const_data_ptrEPK1Tv
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor17set_requires_gradEb
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_tensor
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor3dimEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor5numelEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor5sizesEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7stridesEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor13is_contiguousEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6strideE7int64_t
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor16get_device_indexEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7is_cudaEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6is_cpuEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor4sizeE7int64_t
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7definedEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor14storage_offsetEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor12element_sizeEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor11scalar_typeEv
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6deviceEv
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_device
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6layoutEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#device-class
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
c10::Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#PyTorchstructc10_1_1_device
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device6DeviceE10DeviceType11DeviceIndex
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_device
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device6DeviceERKNSt6stringE
stable::Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchclasstorch_1_1stable_1_1_device
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6DeviceeqERK6Device
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6DeviceneERK6Device
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device9set_indexE11DeviceIndex
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device4typeEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device5indexEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device9has_indexEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device7is_cudaEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device6is_cpuEv
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-creation
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5emptyEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEENSt8optionalIN5torch10headeronly12MemoryFormatEEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable10empty_likeERKN5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9new_emptyERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9new_zerosERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4fullEN5torch10headeronly21IntHeaderOnlyArrayRefEdNSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9from_blobEPvN5torch10headeronly21IntHeaderOnlyArrayRefEN5torch10headeronly21IntHeaderOnlyArrayRefEN5torch6stable6DeviceEN5torch10headeronly10ScalarTypeE7int64_tN5torch10headeronly6LayoutE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-manipulation
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5cloneERKN5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable10contiguousERKN5torch6stable6TensorEN5torch10headeronly12MemoryFormatE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7reshapeERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4viewERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7flattenERKN5torch6stable6TensorE7int64_t7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7squeezeERKN5torch6stable6TensorE7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9unsqueezeERKN5torch6stable6TensorE7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9transposeERKN5torch6stable6TensorE7int64_t7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6selectERKN5torch6stable6TensorE7int64_t7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6narrowERN5torch6stable6TensorE7int64_t7int64_t7int64_t
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable3padERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefERKNSt6stringEd
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#device-and-type-conversion
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable2toERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEEbbNSt8optionalIN5torch10headeronly12MemoryFormatEEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable2toERKN5torch6stable6TensorEN5torch6stable6DeviceEbb
to()https://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchnamespacetorch_1_1stable_1a90b24ee3b37e7a81fdd86633fbe74ee9
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#in-place-operations
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5fill_ERKN5torch6stable6TensorEd
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5zero_ERN5torch6stable6TensorE
t.zero_()https://docs.pytorch.org/cppdocs/api/stable/operators.html#PyTorchnamespacetorch_1_1stable_1ad3f8981d0aff116ac32254fe4a27fa17
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5copy_ERN5torch6stable6TensorERKN5torch6stable6TensorENSt8optionalIbEE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#mathematical-operations
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6matmulERKN5torch6stable6TensorERKN5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4amaxERKN5torch6stable6TensorE7int64_tb
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4amaxERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefEb
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable3sumERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly21IntHeaderOnlyArrayRefEEEbNSt8optionalIN5torch10headeronly10ScalarTypeEEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7sum_outERN5torch6stable6TensorERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly21IntHeaderOnlyArrayRefEEEbNSt8optionalIN5torch10headeronly10ScalarTypeEEE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
#https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable8subtractERKN5torch6stable6TensorERKN5torch6stable6TensorEd
previous Library Registration Macros https://docs.pytorch.org/cppdocs/api/stable/registration.html
next Utilities https://docs.pytorch.org/cppdocs/api/stable/utilities.html
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
previous Library Registration Macros https://docs.pytorch.org/cppdocs/api/stable/registration.html
next Utilities https://docs.pytorch.org/cppdocs/api/stable/utilities.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-class
torch::stable::Tensorhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6TensorE
Tensor()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Tensor6TensorEv
Tensor()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Tensor6TensorE16AtenTensorHandle
get()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor3getEv
data_ptr()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor8data_ptrEv
mutable_data_ptr()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor16mutable_data_ptrEv
const_data_ptr()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor14const_data_ptrEv
mutable_data_ptr()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0ENK5torch6stable6Tensor16mutable_data_ptrEP1Tv
const_data_ptr()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4I0_NSt11enable_if_tIXntNSt10is_const_vI1TEEEiEEENK5torch6stable6Tensor14const_data_ptrEPK1Tv
set_requires_grad()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor17set_requires_gradEb
dim()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor3dimEv
numel()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor5numelEv
sizes()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor5sizesEv
strides()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7stridesEv
is_contiguous()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor13is_contiguousEv
stride()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6strideE7int64_t
get_device_index()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor16get_device_indexEv
is_cuda()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7is_cudaEv
is_cpu()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6is_cpuEv
size()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor4sizeE7int64_t
defined()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor7definedEv
storage_offset()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor14storage_offsetEv
element_size()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor12element_sizeEv
scalar_type()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor11scalar_typeEv
device()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6deviceEv
layout()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Tensor6layoutEv
Device Classhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#device-class
torch::stable::Devicehttps://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6DeviceE
Device()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device6DeviceE10DeviceType11DeviceIndex
Device()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device6DeviceERKNSt6stringE
operator==()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6DeviceeqERK6Device
operator!=()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6DeviceneERK6Device
set_index()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6Device9set_indexE11DeviceIndex
type()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device4typeEv
index()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device5indexEv
has_index()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device9has_indexEv
is_cuda()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device7is_cudaEv
is_cpu()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4NK5torch6stable6Device6is_cpuEv
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-creation
empty()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5emptyEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEENSt8optionalIN5torch10headeronly12MemoryFormatEEE
empty_like()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable10empty_likeERKN5torch6stable6TensorE
new_empty()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9new_emptyERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
new_zeros()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9new_zerosERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
full()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4fullEN5torch10headeronly21IntHeaderOnlyArrayRefEdNSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEE
from_blob()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9from_blobEPvN5torch10headeronly21IntHeaderOnlyArrayRefEN5torch10headeronly21IntHeaderOnlyArrayRefEN5torch6stable6DeviceEN5torch10headeronly10ScalarTypeE7int64_tN5torch10headeronly6LayoutE
Tensor Manipulationhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#tensor-manipulation
clone()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5cloneERKN5torch6stable6TensorE
contiguous()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable10contiguousERKN5torch6stable6TensorEN5torch10headeronly12MemoryFormatE
reshape()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7reshapeERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefE
view()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4viewERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefE
flatten()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7flattenERKN5torch6stable6TensorE7int64_t7int64_t
squeeze()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7squeezeERKN5torch6stable6TensorE7int64_t
unsqueeze()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9unsqueezeERKN5torch6stable6TensorE7int64_t
transpose()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable9transposeERKN5torch6stable6TensorE7int64_t7int64_t
select()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6selectERKN5torch6stable6TensorE7int64_t7int64_t
narrow()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6narrowERN5torch6stable6TensorE7int64_t7int64_t7int64_t
pad()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable3padERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefERKNSt6stringEd
Device and Type Conversionhttps://docs.pytorch.org/cppdocs/api/stable/operators.html#device-and-type-conversion
to()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable2toERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly10ScalarTypeEEENSt8optionalIN5torch10headeronly6LayoutEEENSt8optionalIN5torch6stable6DeviceEEENSt8optionalIbEEbbNSt8optionalIN5torch10headeronly12MemoryFormatEEE
to()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable2toERKN5torch6stable6TensorEN5torch6stable6DeviceEbb
In-place Operationshttps://docs.pytorch.org/cppdocs/api/stable/operators.html#in-place-operations
fill_()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5fill_ERKN5torch6stable6TensorEd
zero_()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5zero_ERN5torch6stable6TensorE
copy_()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable5copy_ERN5torch6stable6TensorERKN5torch6stable6TensorENSt8optionalIbEE
Mathematical Operationshttps://docs.pytorch.org/cppdocs/api/stable/operators.html#mathematical-operations
matmul()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable6matmulERKN5torch6stable6TensorERKN5torch6stable6TensorE
amax()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4amaxERKN5torch6stable6TensorE7int64_tb
amax()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable4amaxERKN5torch6stable6TensorEN5torch10headeronly21IntHeaderOnlyArrayRefEb
sum()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable3sumERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly21IntHeaderOnlyArrayRefEEEbNSt8optionalIN5torch10headeronly10ScalarTypeEEE
sum_out()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable7sum_outERN5torch6stable6TensorERKN5torch6stable6TensorENSt8optionalIN5torch10headeronly21IntHeaderOnlyArrayRefEEEbNSt8optionalIN5torch10headeronly10ScalarTypeEEE
subtract()https://docs.pytorch.org/cppdocs/api/stable/operators.html#_CPPv4N5torch6stable8subtractERKN5torch6stable6TensorERKN5torch6stable6TensorEd
Show Source https://docs.pytorch.org/cppdocs/_sources/api/stable/operators.md.txt
ExecuTorchhttps://docs.pytorch.org/executorch
Helionhttps://docs.pytorch.org/helion
torchaohttps://docs.pytorch.org/ao
kinetohttps://github.com/pytorch/kineto
torchtitanhttps://github.com/pytorch/torchtitan
TorchRLhttps://docs.pytorch.org/rl
torchvisionhttps://docs.pytorch.org/vision
torchaudiohttps://docs.pytorch.org/audio
tensordicthttps://docs.pytorch.org/tensordict
PyTorch on XLA Deviceshttps://docs.pytorch.org/xla
View Docshttps://docs.pytorch.org/docs/stable/index.html
View Tutorialshttps://docs.pytorch.org/tutorials
View Resourceshttps://pytorch.org/resources
Privacy Policyhttps://www.linuxfoundation.org/privacy/
https://www.facebook.com/pytorch
https://twitter.com/pytorch
https://www.youtube.com/pytorch
https://www.linkedin.com/company/pytorch
https://pytorch.slack.com
https://pytorch.org/wechat
Policieshttps://www.linuxfoundation.org/legal/policies
Trademark Usagehttps://www.linuxfoundation.org/trademark-usage
Privacy Policyhttp://www.linuxfoundation.org/privacy
Cookies Policyhttps://opensource.fb.com/legal/cookie-policy
Sphinxhttps://www.sphinx-doc.org/
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.