pytorch  1.8.2
About: PyTorch provides Tensor computation (like NumPy) with strong GPU acceleration and Deep Neural Networks (in Python) built on a tape-based autograd system. LTS (Long Term Support) release.
  Fossies Dox: pytorch-1.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

at Namespace Reference

Distributions kernel adapted from THRandom.cpp The kernels try to follow std::random distributions signature For instance: in ATen auto gen = at::detail::createCPUGenerator(); at::uniform_real_distribution<double> uniform(0, 1); auto sample = uniform(gen.get());. More...

Namespaces

namespace  $
 
namespace  autocast
 
namespace  cpp_custom_type_hack
 
namespace  cpu
 
namespace  cuda
 
namespace  detail
 
namespace  impl
 
namespace  indexing
 
namespace  internal
 
namespace  meta
 
namespace  metal
 
namespace  namedinference
 
namespace  native
 
namespace  Reduction
 
namespace  sequence_number
 
namespace  sparse
 
namespace  tracer
 
namespace  transformation
 
namespace  vec256
 
namespace  vitals
 
namespace  vml
 
namespace  vulkan
 

Classes

struct  AccumulateType
 
struct  AccumulateType< BFloat16, false >
 
struct  AccumulateType< bool, true >
 
struct  AccumulateType< c10::complex< double >, false >
 
struct  AccumulateType< c10::complex< double >, true >
 
struct  AccumulateType< c10::complex< float >, false >
 
struct  AccumulateType< c10::complex< float >, true >
 
struct  AccumulateType< char, false >
 
struct  AccumulateType< char, true >
 
struct  AccumulateType< double, false >
 
struct  AccumulateType< double, true >
 
struct  AccumulateType< float, false >
 
struct  AccumulateType< float, true >
 
struct  AccumulateType< Half, true >
 
struct  AccumulateType< int16_t, false >
 
struct  AccumulateType< int16_t, true >
 
struct  AccumulateType< int32_t, false >
 
struct  AccumulateType< int32_t, true >
 
struct  AccumulateType< int64_t, false >
 
struct  AccumulateType< int64_t, true >
 
struct  AccumulateType< int8_t, false >
 
struct  AccumulateType< int8_t, true >
 
struct  AccumulateType< uint8_t, false >
 
struct  AccumulateType< uint8_t, true >
 
struct  AffineQuantizer
 AffineQuantizer uses affine transformation to do quantization. More...
 
struct  ATenDLMTensor
 
struct  AutoGradMode
 
struct  AutoNonVariableTypeMode
 
class  BaseContext
 Virtual interface for the Context class in Caffe2. More...
 
struct  BatchDim
 
struct  BatchedTensorImpl
 
struct  BroadcastingVmapTransform
 
class  CallbackManager
 
class  Context
 
struct  CPUGeneratorImpl
 
struct  CUDAHooksArgs
 
struct  CUDAHooksInterface
 
struct  DefaultPtrTraits
 
class  DeprecatedTypeProperties
 
struct  DeprecatedTypePropertiesDeleter
 
class  DeprecatedTypePropertiesRegistry
 
struct  DimCounter
 
struct  Dimname
 
class  DisableRecordFunctionGuard
 
struct  DistAccumType
 
struct  DistAccumType< BFloat16 >
 
struct  DistAccumType< double >
 
struct  DistAccumType< float >
 
struct  DistAccumType< Half >
 
struct  DynamicLibrary
 
struct  FormatGuard
 
class  GenericPackedTensorAccessor
 
class  GenericPackedTensorAccessor< T, 1, PtrTraits, index_t >
 
class  GenericPackedTensorAccessorBase
 
struct  GradMode
 
struct  HIPHooksArgs
 
struct  HIPHooksInterface
 
struct  IterArgs
 
class  MatrixRef
 MatrixRef - Like an ArrayRef, but with an extra recorded strides so that we can easily view it as a multidimensional array. More...
 
struct  MetalImpl
 
struct  MetalTensorImpl
 
struct  MultiBatchVmapTransform
 
struct  NamedTensorMeta
 
struct  NamesMode
 
struct  NoGradGuard
 
struct  NoNamesGuard
 
struct  NonUniformQuantizer
 NonUniformQuantizer is the parent class for all non-uniform quantizers. More...
 
struct  NoTF32Guard
 
struct  ObserverContext
 
struct  OpaqueTensorImpl
 
struct  OperandInfo
 
struct  PerChannelAffineFloatQParamsQuantizer
 PerChannelAffineFloatQParamsQuantizer is the same as PerChannelAffineQuantizer except that it expects both scale and zero point to be floating point values. More...
 
struct  PerChannelAffineQuantizer
 PerChannelAffineQuantizer is the same as PerTensorAffineQuantizer except that we have an independent scale and zero_point parameter for each channel. More...
 
struct  PerTensorAffineQuantizer
 PerTensorAffineQuantizer stores a scale and a zero_point, which is used for all the values in the Tensor. More...
 
class  PTThreadPool
 
struct  QTensorImpl
 QTensorImpl is a TensorImpl for Quantized Tensors, it stores Quantizer which specifies the quantization scheme and parameters, for more information please see ATen/quantized/Quantizer.h. More...
 
struct  Quantizer
 Quantizer is the class for storing all the information that's necessary to perform quantize and dequantize operation. More...
 
struct  Range
 
struct  RecordFunction
 
class  RecordFunctionCallback
 RecordFunctionCallback represents a pair of callbacks to be used with RecordFunction, members: start, end - the callbacks to run when entering and exiting the scope; optionally, the start callback may return an ObserverContext which will be passed to the end callback, use appropriate constructor accordingly. More...
 
class  RecordFunctionGuard
 
struct  RecordFunctionTLS
 
struct  SparseTensorImpl
 
struct  SplitUntil32Bit
 A container-like struct that acts as if it contains splits of a TensorIterator that can use 32-bit indexing. More...
 
struct  strided_tensor_iter
 
struct  strided_tensor_iter_fixed
 
struct  StringView
 
class  Tensor
 
class  TensorAccessor
 
class  TensorAccessor< T, 1, PtrTraits, index_t >
 
class  TensorAccessorBase
 
struct  TensorArg
 
struct  TensorGeometry
 
struct  TensorGeometryArg
 
struct  TensorIterator
 
struct  TensorIteratorBase
 
class  TensorIteratorConfig
 
class  ThreadLocalState
 
class  ThreadLocalStateGuard
 
struct  UniformQuantizer
 UniformQuantizer is the parent class for all uniform quantizers. More...
 
struct  VmapPhysicalToLogicalMap
 
struct  VmapPhysicalView
 
struct  VulkanOpaqueTensorImpl
 

Typedefs

template<typename T , bool is_cuda>
using acc_type = typename AccumulateType< T, is_cuda >::type
 
using BatchDims = SmallVector< BatchDim, kBatchDimsStackSize >
 
using BatchDimsRef = ArrayRef< BatchDim >
 
using DimnameList = c10::ArrayRef< Dimname >
 
using DimVector = SmallVector< int64_t, kDimVectorStaticSize >
 A container for sizes or strides. More...
 
using ConstQuantizerPtr = const c10::intrusive_ptr< Quantizer > &
 
using QuantizerPtr = c10::intrusive_ptr< Quantizer >
 
template<typename T , size_t N, template< typename U > class PtrTraits = DefaultPtrTraits>
using PackedTensorAccessor32 = GenericPackedTensorAccessor< T, N, PtrTraits, int32_t >
 
template<typename T , size_t N, template< typename U > class PtrTraits = DefaultPtrTraits>
using PackedTensorAccessor64 = GenericPackedTensorAccessor< T, N, PtrTraits, int64_t >
 
template<typename T >
using dist_acctype = typename DistAccumType< T >::type
 
using NameVector = SmallVector< Dimname, kDimVectorStaticSize >
 
using loop2d_t = TensorIteratorBase::loop2d_t
 
typedef c10::SmallVector< uint64_t, kSoftLimitCallbacksCallbackHandles
 
typedef std::vector< std::unique_ptr< ObserverContext > > ObserverContextList
 
typedef uint64_t RecordFunctionHandle
 
typedef uint64_t CallbackHandle
 
typedef std::vector< std::pair< RecordFunctionCallback, CallbackHandle > > RecordFunctionCallbacks
 
using TensorList = ArrayRef< Tensor >
 
using Stream = c10::Stream
 
using DimMask = TensorIteratorBase::DimMask
 
using PtrVector = TensorIteratorBase::PtrVector
 
using loop_t = TensorIteratorBase::loop_t
 
using StrideVector = TensorIteratorBase::StrideVector
 
using CheckedFrom = const char *
 
using VmapPhysicalViewVec = SmallVector< VmapPhysicalView, kVmapTransformStaticInputSize >
 
using VmapDimVector = SmallVector< int64_t, kVmapStaticDimVecSize >
 
using DataType = caffe2::TypeIdentifier
 

Enumerations

enum class  NameType : uint8_t { BASIC , WILDCARD }
 
enum class  MemOverlap { NO , YES , TOO_HARD }
 
enum class  MemOverlapStatus { FULL , PARTIAL , NO , TOO_HARD }
 
enum class  FastSetupType : uint8_t { NONE , CONTIGUOUS , CHANNELS_LAST , NON_OVERLAPPING_DENSE }
 

Functions

static SmallVector< indexing::TensorIndex, kVmapStaticDimVecSizecomputeIndex (int64_t linear_idx, IntArrayRef sizes)
 
static bool areAllReturnsTensors (const FunctionSchema &schema)
 
static bool areAnyArgumentsTensorList (const FunctionSchema &schema)
 
static bool isInplaceOp (const c10::FunctionSchema &schema)
 
static void warnFallback (const c10::FunctionSchema &schema, bool is_inplace)
 
void batchedTensorInplaceForLoopFallback (const c10::OperatorHandle &op, torch::jit::Stack *stack)
 
static Tensor safeStack (TensorList tensors)
 
void batchedTensorForLoopFallback (const c10::OperatorHandle &op, torch::jit::Stack *stack)
 
Tensor makeBatched (const Tensor &tensor, BatchDims bdims)
 
Tensor addBatchDim (const Tensor &tensor, int64_t level, int64_t dim)
 
bool inplaceIsVmapCompatible (const Tensor &self, const Tensor &other)
 
bool isBatchedTensor (const Tensor &tensor)
 
BatchedTensorImplunsafeGetBatchedImpl (Tensor tensor)
 
BatchedTensorImplmaybeGetBatchedImpl (Tensor tensor)
 
std::bitset< kVmapMaxTensorDimscreateBatchDimBitset (BatchDimsRef bdims)
 
std::bitset< kVmapNumLevelscreateVmapLevelsBitset (BatchDimsRef bdims)
 
std::ostream & operator<< (std::ostream &out, const BatchDim &bdim)
 
static bool is_allowed_dim_on_scalar_tensor (int64_t dim)
 
Tensor sum_batching_rule (const Tensor &self, IntArrayRef dims, bool keepdim, optional< ScalarType > dtype)
 
bool isPhysicalScalarTensor (const Tensor &logical_tensor)
 
template<typename F , F Func, typename... ExtraArgs>
Tensor binary_pointwise_batching_rule (const Tensor &self, const Tensor &other, ExtraArgs... args)
 
Tensor expand_batching_rule (const Tensor &self, IntArrayRef size, bool implicit)
 
std::vector< Tensorchunk_batching_rule (const Tensor &self, int64_t chunks, int64_t dim)
 
Tensor clamp_batching_rule (const Tensor &self, optional< Scalar > min, optional< Scalar > max)
 
Tensor clamp_min_batching_rule (const Tensor &self, Scalar min)
 
Tensor clamp_max_batching_rule (const Tensor &self, Scalar max)
 
std::vector< Tensortensor_split_sections_batching_rule (const Tensor &self, int64_t sections, int64_t dim)
 
std::vector< Tensortensor_split_indices_batching_rule (const Tensor &self, IntArrayRef indices, int64_t dim)
 
Tensor unsqueeze_batching_rule (const Tensor &self, int64_t dim)
 
Tensorfill_inplace_scalar_batching_rule (Tensor &self, Scalar value)
 
Tensorfill_inplace_tensor_batching_rule (Tensor &self, const Tensor &value)
 
Tensorzero_inplace_batching_rule (Tensor &self)
 
Tensor squeeze_batching_rule (const Tensor &self)
 
Tensor squeeze_dim_batching_rule (const Tensor &self, int64_t dim)
 
Tensor trace_batching_rule (const Tensor &self)
 
Tensor trace_backward_batching_rule (const Tensor &grad, IntArrayRef input_sizes)
 
Tensor transpose_int_batching_rule (const Tensor &self, int64_t dim0, int64_t dim1)
 
Tensor permute_batching_rule (const Tensor &self, IntArrayRef dims)
 
Tensor select_batching_rule (const Tensor &self, int64_t dim, int64_t index)
 
static int64_t getGradInputPhysicalDim (int64_t dim, IntArrayRef input_sizes, int64_t num_batch_dims)
 
Tensor select_backward_batching_rule (const Tensor &grad, IntArrayRef input_sizes, int64_t dim, int64_t index)
 
Tensor slice_batching_rule (const Tensor &self, int64_t dim, c10::optional< int64_t > start, c10::optional< int64_t > end, int64_t step)
 
Tensor slice_backward_batching_rule (const Tensor &grad, IntArrayRef input_sizes, int64_t dim, int64_t start, int64_t end, int64_t step)
 
Tensor diagonal_batching_rule (const Tensor &self, int64_t offset, int64_t dim1, int64_t dim2)
 
Tensor diagonal_backward_batching_rule (const Tensor &grad, IntArrayRef input_sizes, int64_t offset, int64_t dim1, int64_t dim2)
 
Tensor movedim_batching_rule (const Tensor &self, IntArrayRef source, IntArrayRef destination)
 
Tensor reshape_batching_rule (const Tensor &self, IntArrayRef shape)
 
std::vector< Tensorsplit_batching_rule (const Tensor &self, int64_t split_size, int64_t dim)
 
std::vector< Tensorsplit_with_sizes_batching_rule (const Tensor &self, IntArrayRef split_sizes, int64_t dim)
 
std::vector< Tensorunbind_batching_rule (const Tensor &self, int64_t dim)
 
Tensor unfold_batching_rule (const Tensor &self, int64_t dim, int64_t size, int64_t step)
 
Tensor contiguous_batching_rule (const Tensor &self, MemoryFormat memory_format)
 
Tensor view_batching_rule (const Tensor &self, IntArrayRef size)
 
Tensor view_as_complex_batching_rule (const Tensor &self)
 
static void checkBatchDimsAtFrontInLayout (IntArrayRef physical_strides, int64_t num_batch_dims)
 
static optional< int64_t > maximum_indexable_location (IntArrayRef sizes, IntArrayRef strides, int64_t storage_offset)
 
static void checkBasicAsStridedValidForSlice (const Tensor &physical_tensor, int64_t num_batch_dims, IntArrayRef sizes, IntArrayRef strides, optional< int64_t > maybe_storage_offset)
 
Tensor as_strided_batching_rule (const Tensor &tensor, IntArrayRef sizes, IntArrayRef strides, optional< int64_t > storage_offset)
 
template<typename F , F Func, typename... ExtraArgs>
Tensor unwrap_and_call (const Tensor &input, ExtraArgs... args)
 
template<typename F , F Func, typename... ExtraArgs>
Tensor unwrap_and_call_method (const Tensor &input, ExtraArgs... extra_args)
 
Tensor pow_scalar_Tensor_batching_rule (Scalar other, const Tensor &self)
 
Tensor clone_batching_rule (const Tensor &self, optional< MemoryFormat > memory_format)
 
Tensor mv_batching_rule (const Tensor &self, const Tensor &other)
 
Tensor dot_batching_rule (const Tensor &self, const Tensor &other)
 
Tensor bmm_batching_rule (const Tensor &self, const Tensor &other)
 
Tensor mm_batching_rule (const Tensor &self, const Tensor &other)
 
Tensor cat_batching_rule (TensorList tensors, int64_t dim)
 
Tensor stack_batching_rule (TensorList tensors, int64_t dim)
 
Tensor to_dtype_layout_batching_rule (const Tensor &self, optional< ScalarType > dtype, optional< Layout > layout, optional< Device > device, optional< bool > pin_memory, bool non_blocking, bool copy, optional< MemoryFormat > memory_format)
 
Tensor new_zeros_batching_rule (const Tensor &self, IntArrayRef size, optional< ScalarType > dtype, optional< Layout > layout, optional< Device > device, optional< bool > pin_memory)
 
Tensor new_empty_batching_rule (const Tensor &self, IntArrayRef size, c10::optional< ScalarType > dtype, c10::optional< Layout > layout, c10::optional< Device > device, c10::optional< bool > pin_memory)
 
Tensor new_empty_strided_batching_rule (const Tensor &self, IntArrayRef size, IntArrayRef stride, optional< ScalarType > dtype, optional< Layout > layout, optional< Device > device, optional< bool > pin_memory)
 
template<typename F , F Func>
Tensor comparison_pointwise_batching_rule (const Tensor &self, const Tensor &other)
 
 TORCH_LIBRARY_IMPL (_, Batched, m)
 
 TORCH_LIBRARY_IMPL (aten, Batched, m)
 
ContextglobalContext ()
 
AllocatorgetCPUAllocator ()
 
static void init ()
 
static DeprecatedTypePropertiesgetDeprecatedTypeProperties (Backend p, ScalarType s)
 
static DeprecatedTypePropertiesCPU (ScalarType s)
 
static DeprecatedTypePropertiesCUDA (ScalarType s)
 
static DeprecatedTypePropertiesHIP (ScalarType s)
 
static bool hasCUDA ()
 
static bool hasHIP ()
 
static bool hasXLA ()
 
static size_t getNumGPUs ()
 
static bool hasOpenMP ()
 
static bool hasMKL ()
 
static bool hasLAPACK ()
 
static bool hasMAGMA ()
 
static bool hasMKLDNN ()
 
static void manual_seed (uint64_t seed)
 
TORCH_API bool is_custom_op (const c10::OperatorName &opName)
 
DeprecatedTypePropertiesRegistryglobalDeprecatedTypePropertiesRegistry ()
 
std::ostream & operator<< (std::ostream &out, const Dimname &dimname)
 
static void check_valid_identifier (const std::string &name)
 
bool operator== (const Dimname &lhs, const Dimname &rhs)
 
bool operator!= (const Dimname &lhs, const Dimname &rhs)
 
std::ios_base & defaultfloat (std::ios_base &__base)
 
std::ostream & operator<< (std::ostream &out, const DeprecatedTypeProperties &t)
 
static std::tuple< double, int64_t > __printFormat (std::ostream &stream, const Tensor &self)
 
static void __printIndent (std::ostream &stream, int64_t indent)
 
static void printScale (std::ostream &stream, double scale)
 
static void __printMatrix (std::ostream &stream, const Tensor &self, int64_t linesize, int64_t indent)
 
void __printTensor (std::ostream &stream, Tensor &self, int64_t linesize)
 
std::ostream & print (std::ostream &stream, const Tensor &tensor_, int64_t linesize)
 
static std::ostream & operator<< (std::ostream &out, const Tensor &t)
 
static void print (const Tensor &t, int64_t linesize=80)
 
static std::ostream & operator<< (std::ostream &out, Scalar s)
 
TORCH_API void launch (std::function< void()> func)
 
Tensorinternal_set_names_inplace (Tensor &tensor, optional< DimnameList > names)
 
Tensorinternal_set_names_inplace (Tensor &tensor, std::vector< Dimname > &&names, bool validate_names)
 
DimnameList default_names (size_t len)
 
static void check_unique_names (DimnameList names)
 
void check_names_valid_for (const Tensor &tensor, DimnameList names)
 
void check_names_valid_for (size_t tensor_dim, DimnameList names)
 
std::ostream & operator<< (std::ostream &out, const Range &range)
 
Tensor unsafeTensorFromTH (void *th_pointer, bool retain)
 
Storage unsafeStorageFromTH (void *th_pointer, bool retain)
 
template<typename T >
std::pair< int64_t, int64_t > collapse_dims (T *sizes, T *strides, int64_t dims, const int excludeDim=-1)
 
Tensor sort_strides (Tensor &tensor_)
 
bool _all_equal_numel (at::ArrayRef< Tensor > tensors)
 
std::string _all_equal_numel_error (at::ArrayRef< Tensor > tensors)
 
bool _apply_preamble (ArrayRef< Tensor > tensors)
 
int64_t _max_dim_tensors (ArrayRef< Tensor > tensors)
 
void iterate (int64_t size)
 
template<typename Arg , typename... Args>
void iterate (int64_t size, Arg &iter, Args &... iter_tail)
 
bool iterate_continue ()
 
template<typename Arg , typename... Args>
bool iterate_continue (Arg &iter, Args &... iter_tail)
 
int64_t max_iterate_size ()
 
template<typename Arg , typename... Args>
int64_t max_iterate_size (Arg &iter, Args &... iter_tail)
 
void iterate_overflow ()
 
template<typename Arg , typename... Args>
void iterate_overflow (Arg &iter, Args &... iter_tail)
 
void forward (int64_t offset)
 
template<typename Arg , typename... Args>
void forward (int64_t offset, Arg &iter, Args &... iter_tail)
 
int64_t max_dim ()
 
template<typename Arg , typename... Args>
int64_t max_dim (Arg &iter, Args &... iter_tail)
 
void apply_op ()
 
template<typename Op , typename... Args>
void apply_op (int64_t numel, int64_t offset, const Op &op, Args... iters)
 
template<typename scalar1 , typename scalar2 , typename Op >
void CPU_tensor_apply2 (Tensor tensor1, Tensor tensor2, const Op op)
 
template<typename scalar1 , typename scalar2 , typename scalar3 , typename Op >
void CPU_tensor_apply3 (Tensor tensor1, Tensor tensor2, Tensor tensor3, const Op op)
 
template<typename scalar1 , typename scalar2 , typename scalar3 , typename scalar4 , typename Op >
void CPU_tensor_apply4 (Tensor tensor1, Tensor tensor2, Tensor tensor3, Tensor tensor4, const Op op)
 
static cpu_fixed_malloc (void *, ptrdiff_t)
 
static cpu_fixed_realloc (void *, void *, ptrdiff_t)
 
static cpu_fixed_free (void *state, void *allocation)
 
 C10_DECLARE_REGISTRY (CUDAHooksRegistry, CUDAHooksInterface, CUDAHooksArgs)
 
 C10_DECLARE_REGISTRY (HIPHooksRegistry, HIPHooksInterface, HIPHooksArgs)
 
optional< Devicedevice_of (const Tensor &t)
 Return the Device of a Tensor, if the Tensor is defined. More...
 
optional< Devicedevice_of (TensorList t)
 Return the Device of a TensorList, if the list is non-empty and the first Tensor is defined. More...
 
constexpr bool should_include_kernel_dtype (const char *kernel_tag_str, at::ScalarType scalar_type)
 The method should_include_kernel_dtype() returns true/false based on whether the switching code for a specific dtype should be included based on build time constants generated from tracing model execution. More...
 
DLDataType getDLDataType (const Tensor &t)
 
DLContext getDLContext (const Tensor &tensor, const int64_t &device_id)
 
static Device getATenDevice (const DLContext &ctx)
 
ScalarType toScalarType (const DLDataType &dtype)
 
void deleter (DLManagedTensor *arg)
 
DLManagedTensortoDLPack (const Tensor &src)
 
Tensor fromDLPack (const DLManagedTensor *src)
 
static void * checkDL (void *x)
 
std::vector< int64_t > infer_size (IntArrayRef a, IntArrayRef b)
 
std::tuple< std::vector< int64_t >, std::vector< int64_t > > inferExpandGeometry (IntArrayRef tensor_sizes, IntArrayRef tensor_strides, IntArrayRef sizes)
 
std::vector< int64_t > infer_dense_strides (IntArrayRef tensor_sizes, IntArrayRef tensor_strides)
 
bool are_expandable (IntArrayRef shape1, IntArrayRef shape2)
 
void check_defined (std::initializer_list< std::reference_wrapper< const Tensor > > tensors, const char *api_name)
 
std::tuple< Tensorexpand_inplace (const Tensor &tensor, const Tensor &to_expand)
 
std::tuple< Tensorexpand_inplace (const Tensor &tensor, const Tensor &to_expand, const char *api_name)
 
std::tuple< Tensor, Tensorexpand_inplace (const Tensor &tensor, const Tensor &to_expand1, const Tensor &to_expand2)
 
std::tuple< Tensor, Tensorexpand_inplace (const Tensor &tensor, const Tensor &to_expand1, const Tensor &to_expand2, const char *api_name)
 
std::tuple< Tensor, Tensorexpand_outplace (const Tensor &to_expand1, const Tensor &to_expand2)
 
std::tuple< Tensor, Tensorexpand_outplace (const Tensor &to_expand1, const Tensor &to_expand2, const char *api_name)
 
std::tuple< Tensor, Tensor, Tensorexpand_outplace (const Tensor &to_expand1, const Tensor &to_expand2, const Tensor &to_expand3)
 
std::tuple< Tensor, Tensor, Tensorexpand_outplace (const Tensor &to_expand1, const Tensor &to_expand2, const Tensor &to_expand3, const char *api_name)
 
std::tuple< Tensorexpand_size (const Tensor &to_expand, IntArrayRef sizes)
 
std::tuple< Tensorexpand_size (const Tensor &to_expand, IntArrayRef sizes, const char *api_name)
 
std::vector< Tensorexpand_outplace (TensorList to_expand)
 
static Tensor sum_to (Tensor tensor, const IntArrayRef shape)
 
static bool is_expandable_to (IntArrayRef shape, IntArrayRef desired)
 
std::vector< int64_t > infer_size (IntArrayRef shape, int64_t numel)
 
TensorOptions initialTensorOptions ()
 
MemOverlap has_internal_overlap (const Tensor &tensor)
 
MemOverlap has_internal_overlap (TensorImpl *t)
 
void assert_no_internal_overlap (const Tensor &t)
 
void assert_no_internal_overlap (TensorImpl *t)
 
MemOverlapStatus get_overlap_status (const Tensor &a, const Tensor &b)
 
MemOverlapStatus get_overlap_status (TensorImpl *a, TensorImpl *b)
 
void assert_no_partial_overlap (const Tensor &a, const Tensor &b)
 
void assert_no_partial_overlap (TensorImpl *a, TensorImpl *b)
 
void assert_no_overlap (const Tensor &a, const Tensor &b)
 
void assert_no_overlap (TensorImpl *a, TensorImpl *b)
 
static std::string toDimnameRepr (const Tensor &tensor)
 
int64_t dimname_to_position (const Tensor &tensor, Dimname dim)
 
std::vector< int64_t > dimnames_to_positions (const Tensor &tensor, DimnameList dims)
 
static void report_positional_error (const Dimname &name, const Dimname &other_name, DimnameList names, DimnameList other_names, const char *action)
 
static void check_for_misalignment (const Dimname &name, DimnameList names, DimnameList other_names, const char *action)
 
std::vector< Dimnameunify_from_right (DimnameList names, DimnameList other_names, const char *action)
 
bool has_names (TensorList tensors)
 
void reportNYIDimnameOverload (const char *op_name)
 
static bool use_two_pass_reduction (TensorIteratorBase &iter)
 
static void two_pass_reduction (TensorIteratorBase &iter, loop2d_t loop)
 
static void parallel_dim_reduction (TensorIteratorBase &iter, loop2d_t loop)
 
static int find_split_dim (TensorIteratorBase &iter)
 Chooses a dimension over which to parallelize. More...
 
static std::tuple< int64_t, int64_t > round_columns (TensorIteratorBase &iter, int dim, int multiple, int64_t begin, int64_t end)
 
template<typename T , typename std::enable_if< std::is_integral< T >::value, int >::type = 0>
C10_HOST_DEVICE bool _isnan (T val)
 
template<typename T , typename std::enable_if< c10::is_complex< T >::value, int >::type = 0>
bool _isnan (T val)
 
template<typename T , typename std::enable_if< std::is_same< T, at::BFloat16 >::value, int >::type = 0>
C10_HOST_DEVICE bool _isnan (at::BFloat16 val)
 
template<typename T >
C10_HOST_DEVICEexp (T x)
 
template<>
C10_HOST_DEVICE double exp< double > (double x)
 
template<typename T >
C10_HOST_DEVICElog (T x)
 
template<>
C10_HOST_DEVICE double log< double > (double x)
 
template<typename T >
C10_HOST_DEVICEtan (T x)
 
template<>
C10_HOST_DEVICE double tan< double > (double x)
 
int64_t divup (int64_t x, int64_t y)
 
TORCH_API void init_num_threads ()
 
TORCH_API void set_num_threads (int)
 
TORCH_API int get_num_threads ()
 
TORCH_API int get_thread_num ()
 
TORCH_API bool in_parallel_region ()
 
template<class F >
void parallel_for (const int64_t begin, const int64_t end, const int64_t grain_size, const F &f)
 
template<class scalar_t , class F , class SF >
scalar_t parallel_reduce (const int64_t begin, const int64_t end, const int64_t grain_size, const scalar_t ident, const F &f, const SF &sf)
 
TORCH_API std::string get_parallel_info ()
 
TORCH_API void set_num_interop_threads (int)
 
TORCH_API int get_num_interop_threads ()
 
TORCH_API void intraop_launch (std::function< void()> func)
 
TORCH_API std::shared_ptr< c10::ivalue::Futureintraop_launch_future (std::function< void()> func)
 
TORCH_API int intraop_default_num_threads ()
 
template<typename F0 , typename F1 >
void intraop_invoke (const F0 &f0, const F1 &f1)
 
QuantizerPtr make_per_tensor_affine_quantizer (double scale, int64_t zero_point, ScalarType scalar_type)
 
QuantizerPtr make_per_channel_affine_quantizer (const Tensor &scales, const Tensor &zero_points, int64_t axis, ScalarType scalar_type)
 
QTensorImplget_qtensorimpl (const Tensor &self)
 
int64_t get_sub_byte_tensor_size (int64_t size_bytes, at::ScalarType t)
 
Tensor new_qtensor (IntArrayRef sizes, const TensorOptions &options, QuantizerPtr quantizer)
 
C10_EXPORT void set_quantizer_ (const Tensor &self, ConstQuantizerPtr quantizer)
 
const RecordFunctionTLSget_record_function_tls_ ()
 
void set_record_function_tls_ (const RecordFunctionTLS &tls)
 
RecordFunctionCallbacks _getTLSCallbacks ()
 
void _setTLSCallbacks (const RecordFunctionCallbacks &callbacks)
 
bool hasCallbacks ()
 
bool hasGlobalCallbacks ()
 hasGlobalCallbacks returns whether there're global callbacks registered with pushGlobalCallback More...
 
bool hasThreadLocalCallbacks ()
 hasThreadLocalCallbacks returns whether there're callbacks registered with addThreadLocalCallback More...
 
CallbackHandle addThreadLocalCallback (RecordFunctionCallback cb)
 addThreadLocalCallback adds a thread local callback to run with RecordFunction, returns handle to use with removeThreadLocalCallback More...
 
CallbackHandle addGlobalCallback (RecordFunctionCallback cb)
 addGlobalCallback adds a global callback to run with RecordFunction: More...
 
void removeCallback (CallbackHandle handle)
 removeCallback removes a callback given the handle returned by addThreadLocalCallback or addGlobalCallback; More...
 
void clearGlobalCallbacks ()
 clearGlobalCallbacks removes all global callbacks WARNING: not thread safe More...
 
void clearThreadLocalCallbacks ()
 clearThreadLocalCallbacks removes all thread local callbacks More...
 
void clearCallbacks ()
 
bool isRecordFunctionEnabled ()
 isRecordFunctionEnabled returns whether RecordFunction is enabled thread locally More...
 
void enableRecordFunction (bool enable=true)
 enableRecordFunction enables RecordFunction thread locally More...
 
void bumpRecordAllFunctions ()
 
void releaseRecordAllFunctions ()
 
bool checkRecordAllFunctions ()
 
bool shouldRunRecordFunction (bool *pre_sampled)
 
Tensor var (const Tensor &self, int dim)
 
std::tuple< Tensor, Tensorvar_mean (const Tensor &self, int dim)
 
Tensor std (const Tensor &self, int dim)
 
std::tuple< Tensor, Tensorstd_mean (const Tensor &self, int dim)
 
Tensor from_blob (void *data, IntArrayRef sizes, IntArrayRef strides, const std::function< void(void *)> &deleter, const TensorOptions &options={}, const c10::optional< Device > target_device=c10::nullopt)
 
Tensor from_blob (void *data, IntArrayRef sizes, const std::function< void(void *)> &deleter, const TensorOptions &options={})
 
Tensor from_blob (void *data, IntArrayRef sizes, IntArrayRef strides, const TensorOptions &options={})
 
Tensor from_blob (void *data, IntArrayRef sizes, const TensorOptions &options={})
 
int64_t numel (const Tensor &tensor)
 
int64_t size (const Tensor &tensor, int64_t dim)
 
int64_t stride (const Tensor &tensor, int64_t dim)
 
 TORCH_LIBRARY (aten, m)
 
int64_t get_device (Tensor self)
 
static DispatchKey legacyExtractDispatchKey (const Tensor &t)
 
static Tensor operator+ (const Tensor &x, const Tensor &y)
 
static Tensor operator+ (const Tensor &x, Scalar y)
 
static Tensor operator+ (Scalar x, const Tensor &y)
 
static Tensor operator* (const Tensor &x, const Tensor &y)
 
static Tensor operator* (const Tensor &x, Scalar y)
 
static Tensor operator* (Scalar x, const Tensor &y)
 
static Tensor operator- (const Tensor &x, const Tensor &y)
 
static Tensor operator- (const Tensor &x, Scalar y)
 
static Tensor operator- (Scalar x, const Tensor &y)
 
static Tensor operator/ (const Tensor &x, const Tensor &y)
 
static Tensor operator/ (const Tensor &x, Scalar y)
 
static Tensor operator/ (Scalar x, const Tensor &y)
 
static Tensor operator% (const Tensor &x, const Tensor &y)
 
static Tensor operator% (const Tensor &x, Scalar y)
 
static Tensor operator% (Scalar x, const Tensor &y)
 
static Tensor operator& (const Tensor &x, const Tensor &y)
 
static Tensor operator& (const Tensor &x, Scalar y)
 
static Tensor operator& (Scalar x, const Tensor &y)
 
static Tensor operator| (const Tensor &x, const Tensor &y)
 
static Tensor operator| (const Tensor &x, Scalar y)
 
static Tensor operator| (Scalar x, const Tensor &y)
 
static Tensor operator^ (const Tensor &x, const Tensor &y)
 
static Tensor operator^ (const Tensor &x, Scalar y)
 
static Tensor operator^ (Scalar x, const Tensor &y)
 
static Tensor operator< (const Tensor &x, const Tensor &y)
 
static Tensor operator< (const Tensor &x, Scalar y)
 
static Tensor operator< (Scalar x, const Tensor &y)
 
static Tensor operator<= (const Tensor &x, const Tensor &y)
 
static Tensor operator<= (const Tensor &x, Scalar y)
 
static Tensor operator<= (Scalar x, const Tensor &y)
 
static Tensor operator> (const Tensor &x, const Tensor &y)
 
static Tensor operator> (const Tensor &x, Scalar y)
 
static Tensor operator> (Scalar x, const Tensor &y)
 
static Tensor operator>= (const Tensor &x, const Tensor &y)
 
static Tensor operator>= (const Tensor &x, Scalar y)
 
static Tensor operator>= (Scalar x, const Tensor &y)
 
static Tensor operator== (const Tensor &x, const Tensor &y)
 
static Tensor operator== (const Tensor &x, Scalar y)
 
static Tensor operator== (Scalar x, const Tensor &y)
 
static Tensor operator!= (const Tensor &x, const Tensor &y)
 
static Tensor operator!= (const Tensor &x, Scalar y)
 
static Tensor operator!= (Scalar x, const Tensor &y)
 
std::ostream & operator<< (std::ostream &out, TensorGeometryArg t)
 
void checkDim (CheckedFrom c, const Tensor &tensor, const char *name, int pos, int64_t dim)
 
void checkDim (CheckedFrom c, const TensorGeometryArg &t, int64_t dim)
 
void checkDimRange (CheckedFrom c, const TensorGeometryArg &t, int64_t dim_start, int64_t dim_end)
 
void checkContiguous (CheckedFrom c, const TensorGeometryArg &t)
 
void checkAllContiguous (CheckedFrom c, at::ArrayRef< TensorArg > ts)
 
void checkSize (CheckedFrom c, const TensorGeometryArg &t, IntArrayRef sizes)
 
void checkSize (CheckedFrom c, const TensorGeometryArg &t, int64_t dim, int64_t size)
 
void checkAllSame (CheckedFrom c, ArrayRef< TensorArg > tensors, void(*fn)(CheckedFrom, const TensorArg &, const TensorArg &))
 
void checkSameSize (CheckedFrom c, const TensorArg &t1, const TensorArg &t2)
 
void checkAllSameSize (CheckedFrom c, ArrayRef< TensorArg > tensors)
 
void checkNumel (CheckedFrom c, const TensorGeometryArg &t, int64_t numel)
 
void checkSameNumel (CheckedFrom c, const TensorArg &t1, const TensorArg &t2)
 
void checkAllSameNumel (CheckedFrom c, ArrayRef< TensorArg > tensors)
 
void checkSameGPU (CheckedFrom c, const TensorArg &t1, const TensorArg &t2)
 
void checkAllSameGPU (CheckedFrom c, ArrayRef< TensorArg > tensors)
 
void checkSameType (CheckedFrom c, const TensorArg &t1, const TensorArg &t2)
 
void checkScalarType (CheckedFrom c, const TensorArg &t, ScalarType ty)
 
void checkScalarTypes (CheckedFrom c, const TensorArg &t, at::ArrayRef< ScalarType > l)
 
void checkAllSameType (CheckedFrom c, ArrayRef< TensorArg > tensors)
 
void checkSameDim (CheckedFrom c, const TensorGeometryArg &t1, const TensorGeometryArg &t2)
 
void checkDefined (CheckedFrom c, const TensorArg &t)
 
void checkAllDefined (CheckedFrom c, ArrayRef< TensorArg > ts)
 
void checkBackend (CheckedFrom c, const Tensor &t, Backend backend)
 
void checkBackend (CheckedFrom c, at::ArrayRef< Tensor > tensors, at::Backend backend)
 
void checkDeviceType (CheckedFrom c, const Tensor &t, DeviceType device_type)
 
void checkDeviceType (CheckedFrom c, at::ArrayRef< Tensor > tensors, at::DeviceType device_type)
 
void checkLayout (CheckedFrom c, const Tensor &t, Layout layout)
 
void checkLayout (CheckedFrom c, at::ArrayRef< Tensor > tensors, at::Layout layout)
 
void * maybe_data_ptr (const Tensor &tensor)
 
void * maybe_data_ptr (const TensorArg &tensor)
 
bool geometry_is_contiguous (IntArrayRef sizes, IntArrayRef strides)
 
void check_dim_size (const Tensor &tensor, int64_t dim, int64_t dim_size, int64_t size)
 
TORCH_API void checkSameNumel (CheckedFrom c, const TensorGeometryArg &t1, const TensorGeometryArg &t2)
 
template<typename T >
std::function< T(void)> wrapPropagateTLSState (std::function< T(void)> callback)
 
int _crash_if_asan (int arg)
 
static TensorImplchecked_dense_tensor_unwrap (const Tensor &expr, const char *name, int pos, const char *api, bool allowNull, DeviceType device_type, ScalarType scalar_type)
 
static std::vector< TensorImpl * > checked_dense_tensor_list_unwrap (ArrayRef< Tensor > tensors, const char *name, int pos, DeviceType device_type, ScalarType scalar_type)
 
template<size_t N>
std::array< int64_t, Ncheck_intlist (ArrayRef< int64_t > list, const char *name, int pos)
 
int64_t sum_intlist (ArrayRef< int64_t > list)
 
template<typename C , typename std::enable_if< std::is_integral< typename C::value_type >::value, int >::type = 0>
int64_t prod_intlist (const C &container)
 
template<typename Iter , typename std::enable_if< std::is_integral< typename std::iterator_traits< Iter >::value_type >::value, int >::type = 0>
int64_t prod_intlist (Iter begin, Iter end)
 
template<typename T >
static T * check_generator (c10::optional< Generator > gen)
 Utility function to static cast input Generator* to the backend generator type (CPU/CUDAGeneratorImpl etc.) More...
 
template<typename T >
static T * get_generator_or_default (const c10::optional< Generator > &gen, const Generator &default_gen)
 Utility function used in tensor implementations, which supplies the default generator to tensors, if an input generator is not supplied. More...
 
void check_size_nonnegative (IntArrayRef size)
 
std::string get_mkl_version ()
 
std::string get_mkldnn_version ()
 
std::string get_openmp_version ()
 
std::string used_cpu_capability ()
 
std::string show_config ()
 Returns a detailed string describing the configuration PyTorch. More...
 
std::string get_cxx_flags ()
 
template<typename... Args>
Tensor unsupportedRandomOp (Args... args)
 
template<typename... Args>
TensorunsupportedRandomOp_ (Args... args)
 
 TORCH_LIBRARY_IMPL (_, VmapMode, m)
 
 TORCH_LIBRARY_IMPL (aten, VmapMode, m)
 
static bool areBdimsAtFrontInOrder (BatchDimsRef bdims)
 
static Tensor permuteBatchDimsToFront (BatchedTensorImpl *batched)
 
static BatchDims computeFrontBatchDimsFromLevels (std::bitset< kVmapNumLevels > levels_bitset)
 
static std::pair< Tensor, std::bitset< kVmapNumLevels > > getPhysicalTensorAndLevels (const Tensor &self)
 
static Tensor alignBatchDimsAtFront (const Tensor &self, std::bitset< kVmapNumLevels > requested_levels, int64_t requested_example_dim)
 
static std::pair< std::bitset< kVmapNumLevels >, int64_t > getLevelsAndLargestLogicalDim (TensorList logical_tensors)
 
static int64_t maybe_wrap_dim (int64_t dim, int64_t dim_post_expr, bool wrap_scalar=true)
 
static int64_t maybe_wrap_dim (int64_t dim, TensorImpl *tensor)
 
static int64_t maybe_wrap_dim (int64_t dim, TensorList tensors)
 
static int64_t maybe_wrap_dim (int64_t dim, const std::vector< std::vector< int64_t > > &tensor_sizes)
 
static void maybe_wrap_dims_n (int64_t *dims, int64_t ndims, int64_t dim_post_expr)
 
template<typename Container >
void maybe_wrap_dims (Container &dims, int64_t dim_post_expr)
 
static int64_t legacy_cat_wrap_dim (int64_t dim, const std::vector< std::vector< int64_t > > &tensor_sizes)
 
static int64_t legacy_cat_wrap_dim (int64_t dim, TensorList tensors)
 
static void wrap_all_dims (std::vector< int64_t > &dims_to_wrap, int64_t tensor_total_dims)
 
static std::bitset< dim_bitset_sizedim_list_to_bitset (IntArrayRef dims, int64_t ndims)
 
 REGISTER_CONTEXT (DeviceType::CPU, caffe2::CPUContext)
 
 REGISTER_COPY_BYTES_FUNCTION (DeviceType::CPU, DeviceType::CPU, caffe2::CopyBytesWrapper)
 
 C10_DEFINE_TYPED_REGISTRY (ContextRegistry, at::DeviceType, at::BaseContext, std::unique_ptr, at::Device)
 
 C10_DECLARE_TYPED_REGISTRY (ContextRegistry, at::DeviceType, at::BaseContext, std::unique_ptr, at::Device)
 
std::unique_ptr< at::BaseContextCreateContext (const at::Device &device)
 
 REGISTER_CONTEXT (DeviceType::IDEEP, caffe2::IDEEPContext)
 
 REGISTER_COPY_BYTES_FUNCTION (DeviceType::IDEEP, DeviceType::CPU, CopyBytesWrapper)
 
 REGISTER_COPY_BYTES_FUNCTION (DeviceType::CPU, DeviceType::IDEEP, CopyBytesWrapper)
 
 REGISTER_COPY_BYTES_FUNCTION (DeviceType::IDEEP, DeviceType::IDEEP, CopyBytesWrapper)
 

Variables

constexpr int64_t kVmapMaxTensorDims = 64
 
constexpr int64_t kVmapNumLevels = 64
 
constexpr int64_t kBatchDimsStackSize = 5
 
static const char cublas_config_var_name [] = "CUBLAS_WORKSPACE_CONFIG"
 
static const char *const cublas_deterministic_configs [] = { ":4096:8", ":16:8" }
 
thread_local bool override_allow_tf32_flag = false
 
static Symbol kWildcard = Symbol::dimname("*")
 
constexpr size_t kDimVectorStaticSize = 5
 
thread_local bool GradMode_enabled = true
 thread_local is a feature that is not enabled by Caffe2 mobile build (e.g. More...
 
constexpr int MERSENNE_STATE_N = 624
 
constexpr int MERSENNE_STATE_M = 397
 
constexpr uint32_t MATRIX_A = 0x9908b0df
 
constexpr uint32_t UMASK = 0x80000000
 
constexpr uint32_t LMASK = 0x7fffffff
 
thread_local bool NamesMode_enabled = true
 
constexpr size_t kMaxNamedTensorDim = 64
 
static Allocator CPU_fixed_allocator
 
constexpr const char * CUDA_HELP
 
enum C10_API_ENUM RecordScope
 
enum C10_API_ENUM BACKWARD_FUNCTION
 
enum C10_API_ENUM TORCHSCRIPT_FUNCTION
 
enum C10_API_ENUM KERNEL_FUNCTION_DTYPE
 
enum C10_API_ENUM USER_SCOPE
 
enum C10_API_ENUM NUM_SCOPES
 
constexpr std::size_t kSoftLimitCallbacks = 4
 
 $
 
constexpr int64_t kVmapTransformStaticInputSize = 4
 
constexpr int64_t kVmapStaticDimVecSize = 8
 
constexpr size_t dim_bitset_size = 64
 

Detailed Description

Distributions kernel adapted from THRandom.cpp The kernels try to follow std::random distributions signature For instance: in ATen auto gen = at::detail::createCPUGenerator(); at::uniform_real_distribution<double> uniform(0, 1); auto sample = uniform(gen.get());.

This file provides distributions compatible with ATen/core/DistributionsHelper.h but backed with the std RNG implementation instead of the ATen one.

Contains the implementation of parallel reductions in TensorIterator.

This file contains some tensor-agnostic operations to be used in the core functions of the SobolEngine

This file contains tensor-agnostic SoboleEngine constants.

Flush-To-Zero and Denormals-Are-Zero mode.

vs std::random

std::mt19937 gen; std::uniform_real_distribution uniform(0, 1); auto sample = uniform(gen);

Flush-To-Zero (FTZ) and Denormals-Are-Zero (DAZ) are modes that bypass IEEE 754 methods of dealing with denormal floating-point numbers on x86-64 and some x86 CPUs. They result in reduced precision for values near zero, but increased performance.

See https://software.intel.com/en-us/articles/x87-and-sse-floating-point-assists-in-ia-32-flush-to-zero-ftz-and-denormals-are-zero-daz

Caffe2 mobile builds currently do not depend on all of ATen so this is required to allow using the faster ATen RNG for normal builds but keep the build size small on mobile. RNG performance typically doesn't matter on mobile builds since the models are small and rarely using random initialization.

Typedef Documentation

◆ acc_type

template<typename T , bool is_cuda>
using at::acc_type = typedef typename AccumulateType<T, is_cuda>::type

Definition at line 52 of file AccumulateType.h.

◆ BatchDims

Definition at line 42 of file BatchedTensorImpl.h.

◆ BatchDimsRef

Definition at line 43 of file BatchedTensorImpl.h.

◆ CallbackHandle

typedef uint64_t at::CallbackHandle

Definition at line 446 of file record_function.h.

◆ CallbackHandles

Definition at line 88 of file record_function.h.

◆ CheckedFrom

using at::CheckedFrom = typedef const char*

Definition at line 40 of file TensorUtils.h.

◆ ConstQuantizerPtr

Definition at line 8 of file QuantizerBase.h.

◆ DataType

Definition at line 105 of file typeid.h.

◆ DimMask

Definition at line 13 of file TensorIterator.cpp.

◆ DimnameList

Definition at line 36 of file Dimname.h.

◆ DimVector

using at::DimVector = typedef SmallVector<int64_t, kDimVectorStaticSize>

A container for sizes or strides.

Definition at line 11 of file DimVector.h.

◆ dist_acctype

template<typename T >
using at::dist_acctype = typedef typename DistAccumType<T>::type

Definition at line 29 of file TransformationHelper.h.

◆ loop2d_t

◆ loop_t

Definition at line 15 of file TensorIterator.cpp.

◆ NameVector

Definition at line 11 of file NamedTensorUtils.h.

◆ ObserverContextList

typedef std::vector<std::unique_ptr<ObserverContext> > at::ObserverContextList

Definition at line 89 of file record_function.h.

◆ PackedTensorAccessor32

template<typename T , size_t N, template< typename U > class PtrTraits = DefaultPtrTraits>
using at::PackedTensorAccessor32 = typedef GenericPackedTensorAccessor<T, N, PtrTraits, int32_t>

Definition at line 228 of file TensorAccessor.h.

◆ PackedTensorAccessor64

template<typename T , size_t N, template< typename U > class PtrTraits = DefaultPtrTraits>
using at::PackedTensorAccessor64 = typedef GenericPackedTensorAccessor<T, N, PtrTraits, int64_t>

Definition at line 231 of file TensorAccessor.h.

◆ PtrVector

Definition at line 14 of file TensorIterator.cpp.

◆ QuantizerPtr

Definition at line 9 of file QuantizerBase.h.

◆ RecordFunctionCallbacks

Definition at line 450 of file record_function.h.

◆ RecordFunctionHandle

typedef uint64_t at::RecordFunctionHandle

Definition at line 90 of file record_function.h.

◆ Stream

Definition at line 56 of file TensorBody.h.

◆ StrideVector

Definition at line 17 of file TensorIterator.cpp.

◆ TensorList

Definition at line 54 of file TensorBody.h.

◆ VmapDimVector

Definition at line 39 of file VmapTransforms.h.

◆ VmapPhysicalViewVec

Enumeration Type Documentation

◆ FastSetupType

enum class at::FastSetupType : uint8_t
strong
Enumerator
NONE 
CONTIGUOUS 
CHANNELS_LAST 
NON_OVERLAPPING_DENSE 

Definition at line 134 of file TensorIterator.h.

◆ MemOverlap

enum class at::MemOverlap
strong
Enumerator
NO 
YES 
TOO_HARD 

Definition at line 14 of file MemoryOverlap.h.

◆ MemOverlapStatus

enum class at::MemOverlapStatus
strong
Enumerator
FULL 
PARTIAL 
NO 
TOO_HARD 

Definition at line 16 of file MemoryOverlap.h.

◆ NameType

enum class at::NameType : uint8_t
strong
Enumerator
BASIC 
WILDCARD 

Definition at line 10 of file Dimname.h.

Function Documentation

◆ __printFormat()

static std::tuple<double, int64_t> at::__printFormat ( std::ostream &  stream,
const Tensor self 
)
static

◆ __printIndent()

static void at::__printIndent ( std::ostream &  stream,
int64_t  indent 
)
static

Definition at line 128 of file Formatting.cpp.

References torch::jit::indent(), caffe2::int64_t, and stream.

Referenced by __printMatrix().

◆ __printMatrix()

static void at::__printMatrix ( std::ostream &  stream,
const Tensor self,
int64_t  linesize,
int64_t  indent 
)
static

◆ __printTensor()

void at::__printTensor ( std::ostream &  stream,
Tensor self,
int64_t  linesize 
)

◆ _all_equal_numel()

bool at::_all_equal_numel ( at::ArrayRef< Tensor tensors)
inline

Definition at line 195 of file CPUApplyUtils.h.

References caffe2::int64_t, numel(), and caffe2::tensors.

Referenced by _apply_preamble().

◆ _all_equal_numel_error()

std::string at::_all_equal_numel_error ( at::ArrayRef< Tensor tensors)
inline

Definition at line 206 of file CPUApplyUtils.h.

References caffe2::tensors.

Referenced by _apply_preamble().

◆ _apply_preamble()

◆ _crash_if_asan()

TORCH_API int at::_crash_if_asan ( int  arg)

Definition at line 13 of file Utils.cpp.

References setup::arg, and bench_ops::x.

Referenced by THPModule_crashIfATenASAN().

◆ _getTLSCallbacks()

TORCH_API RecordFunctionCallbacks at::_getTLSCallbacks ( )

Definition at line 338 of file record_function.cpp.

◆ _isnan() [1/3]

template<typename T , typename std::enable_if< std::is_same< T, at::BFloat16 >::value, int >::type = 0>
C10_HOST_DEVICE bool at::_isnan ( at::BFloat16  val)
inline

Definition at line 51 of file NumericUtils.h.

References _isnan(), and val.

◆ _isnan() [2/3]

◆ _isnan() [3/3]

template<typename T , typename std::enable_if< c10::is_complex< T >::value, int >::type = 0>
bool at::_isnan ( val)
inline

Definition at line 38 of file NumericUtils.h.

References c10::aten::isnan(), and val.

◆ _max_dim_tensors()

int64_t at::_max_dim_tensors ( ArrayRef< Tensor tensors)
inline

◆ _setTLSCallbacks()

TORCH_API void at::_setTLSCallbacks ( const RecordFunctionCallbacks callbacks)

Definition at line 342 of file record_function.cpp.

References r, and caffe2.experiments.python.net_construct_bench::sort.

◆ addBatchDim()

TORCH_API Tensor at::addBatchDim ( const Tensor tensor,
int64_t  level,
int64_t  dim 
)

◆ addGlobalCallback()

TORCH_API CallbackHandle at::addGlobalCallback ( RecordFunctionCallback  cb)

addGlobalCallback adds a global callback to run with RecordFunction:

WARNING: not thread safe, typically addGlobalCallback can be called only during the program initialization

Definition at line 372 of file record_function.cpp.

Referenced by pytorch_jni::PytorchJni::preModuleLoadSetupOnce(), and THPAutograd_initExtension().

◆ addThreadLocalCallback()

TORCH_API CallbackHandle at::addThreadLocalCallback ( RecordFunctionCallback  cb)

addThreadLocalCallback adds a thread local callback to run with RecordFunction, returns handle to use with removeThreadLocalCallback

Definition at line 367 of file record_function.cpp.

Referenced by THPAutograd_initExtension().

◆ alignBatchDimsAtFront()

◆ apply_op() [1/2]

void at::apply_op ( )
inline

Definition at line 311 of file CPUApplyUtils.h.

Referenced by CPU_tensor_apply2(), CPU_tensor_apply3(), and CPU_tensor_apply4().

◆ apply_op() [2/2]

template<typename Op , typename... Args>
void at::apply_op ( int64_t  numel,
int64_t  offset,
const Op &  op,
Args...  iters 
)
inline

◆ are_expandable()

bool at::are_expandable ( IntArrayRef  shape1,
IntArrayRef  shape2 
)
inline

Definition at line 25 of file ExpandUtils.h.

References caffe2::int64_t, and c10::ArrayRef< T >::size().

◆ areAllReturnsTensors()

static bool at::areAllReturnsTensors ( const FunctionSchema schema)
static

Definition at line 26 of file BatchedFallback.cpp.

References setup::arg.

Referenced by batchedTensorForLoopFallback().

◆ areAnyArgumentsTensorList()

static bool at::areAnyArgumentsTensorList ( const FunctionSchema schema)
static

Definition at line 33 of file BatchedFallback.cpp.

References setup::arg.

Referenced by batchedTensorForLoopFallback().

◆ areBdimsAtFrontInOrder()

static bool at::areBdimsAtFrontInOrder ( BatchDimsRef  bdims)
static

Definition at line 7 of file VmapTransforms.cpp.

References dim, c10::attr::idx(), caffe2::int64_t, and c10::ArrayRef< T >::size().

Referenced by permuteBatchDimsToFront().

◆ as_strided_batching_rule()

◆ assert_no_internal_overlap() [1/2]

◆ assert_no_internal_overlap() [2/2]

TORCH_API void at::assert_no_internal_overlap ( TensorImpl t)

Definition at line 32 of file MemoryOverlap.cpp.

References has_internal_overlap(), TORCH_CHECK, and YES.

◆ assert_no_overlap() [1/2]

◆ assert_no_overlap() [2/2]

TORCH_API void at::assert_no_overlap ( TensorImpl a,
TensorImpl b 
)

◆ assert_no_partial_overlap() [1/2]

◆ assert_no_partial_overlap() [2/2]

void at::assert_no_partial_overlap ( TensorImpl a,
TensorImpl b 
)

◆ batchedTensorForLoopFallback()

◆ batchedTensorInplaceForLoopFallback()

◆ binary_pointwise_batching_rule()

template<typename F , F Func, typename... ExtraArgs>
Tensor at::binary_pointwise_batching_rule ( const Tensor self,
const Tensor other,
ExtraArgs...  args 
)

◆ bmm_batching_rule()

◆ bumpRecordAllFunctions()

◆ C10_DECLARE_REGISTRY() [1/2]

at::C10_DECLARE_REGISTRY ( CUDAHooksRegistry  ,
CUDAHooksInterface  ,
CUDAHooksArgs   
)

◆ C10_DECLARE_REGISTRY() [2/2]

at::C10_DECLARE_REGISTRY ( HIPHooksRegistry  ,
HIPHooksInterface  ,
HIPHooksArgs   
)

◆ C10_DECLARE_TYPED_REGISTRY()

at::C10_DECLARE_TYPED_REGISTRY ( ContextRegistry  ,
at::DeviceType  ,
at::BaseContext  ,
std::unique_ptr  ,
at::Device   
)

◆ C10_DEFINE_TYPED_REGISTRY()

at::C10_DEFINE_TYPED_REGISTRY ( ContextRegistry  ,
at::DeviceType  ,
at::BaseContext  ,
std::unique_ptr  ,
at::Device   
)

◆ cat_batching_rule()

◆ check_defined()

void at::check_defined ( std::initializer_list< std::reference_wrapper< const Tensor > >  tensors,
const char *  api_name 
)
inline

Definition at line 40 of file ExpandUtils.h.

References AT_ERROR, at::Tensor::defined(), and caffe2::tensors.

Referenced by expand_inplace(), expand_outplace(), and expand_size().

◆ check_dim_size()

TORCH_API void at::check_dim_size ( const Tensor tensor,
int64_t  dim,
int64_t  dim_size,
int64_t  size 
)

◆ check_for_misalignment()

static void at::check_for_misalignment ( const Dimname name,
DimnameList  names,
DimnameList  other_names,
const char *  action 
)
static

◆ check_generator()

template<typename T >
static T* at::check_generator ( c10::optional< Generator >  gen)
inlinestatic

Utility function to static cast input Generator* to the backend generator type (CPU/CUDAGeneratorImpl etc.)

Definition at line 113 of file Utils.h.

References caffe2.python.gradient_check_test::device_type, tools.autograd.gen_python_functions::gen(), and TORCH_CHECK.

◆ check_intlist()

template<size_t N>
std::array<int64_t, N> at::check_intlist ( ArrayRef< int64_t >  list,
const char *  name,
int  pos 
)

Definition at line 74 of file Utils.h.

References AT_ERROR, c10::prim::list(), N, name, and caffe2::python::res.

◆ check_names_valid_for() [1/2]

void at::check_names_valid_for ( const Tensor tensor,
DimnameList  names 
)

◆ check_names_valid_for() [2/2]

void at::check_names_valid_for ( size_t  tensor_dim,
DimnameList  names 
)

◆ check_size_nonnegative()

void at::check_size_nonnegative ( IntArrayRef  size)
inline

◆ check_unique_names()

static void at::check_unique_names ( DimnameList  names)
static

Definition at line 37 of file NamedTensor.cpp.

References caffe2::it, microbenchmarks::names, and TORCH_CHECK.

Referenced by check_names_valid_for().

◆ check_valid_identifier()

static void at::check_valid_identifier ( const std::string &  name)
static

Definition at line 37 of file Dimname.cpp.

References at::Dimname::isValidName(), name, and TORCH_CHECK.

Referenced by at::Dimname::fromSymbol().

◆ checkAllContiguous()

TORCH_API void at::checkAllContiguous ( CheckedFrom  c,
at::ArrayRef< TensorArg ts 
)

Definition at line 62 of file TensorUtils.cpp.

References c, checkContiguous(), and at::Tensor::defined().

◆ checkAllDefined()

TORCH_API void at::checkAllDefined ( CheckedFrom  c,
ArrayRef< TensorArg ts 
)

Definition at line 209 of file TensorUtils.cpp.

References c, and checkDefined().

◆ checkAllSame()

void at::checkAllSame ( CheckedFrom  c,
ArrayRef< TensorArg tensors,
void(*)(CheckedFrom, const TensorArg &, const TensorArg &)  fn 
)

◆ checkAllSameGPU()

TORCH_API void at::checkAllSameGPU ( CheckedFrom  c,
ArrayRef< TensorArg tensors 
)

Definition at line 150 of file TensorUtils.cpp.

References c, checkAllSame(), checkSameGPU(), and caffe2::tensors.

◆ checkAllSameNumel()

TORCH_API void at::checkAllSameNumel ( CheckedFrom  c,
ArrayRef< TensorArg tensors 
)

Definition at line 126 of file TensorUtils.cpp.

References c, checkAllSame(), checkSameNumel(), and caffe2::tensors.

◆ checkAllSameSize()

void at::checkAllSameSize ( CheckedFrom  c,
ArrayRef< TensorArg tensors 
)

Definition at line 105 of file TensorUtils.cpp.

References c, checkAllSame(), checkSameSize(), and caffe2::tensors.

◆ checkAllSameType()

TORCH_API void at::checkAllSameType ( CheckedFrom  c,
ArrayRef< TensorArg tensors 
)

Definition at line 190 of file TensorUtils.cpp.

References c, checkAllSame(), checkSameType(), and caffe2::tensors.

◆ checkBackend() [1/2]

TORCH_API void at::checkBackend ( CheckedFrom  c,
at::ArrayRef< Tensor tensors,
at::Backend  backend 
)

Definition at line 224 of file TensorUtils.cpp.

References c, checkBackend(), and caffe2::tensors.

◆ checkBackend() [2/2]

◆ checkBasicAsStridedValidForSlice()

static void at::checkBasicAsStridedValidForSlice ( const Tensor physical_tensor,
int64_t  num_batch_dims,
IntArrayRef  sizes,
IntArrayRef  strides,
optional< int64_t >  maybe_storage_offset 
)
static

◆ checkBatchDimsAtFrontInLayout()

static void at::checkBatchDimsAtFrontInLayout ( IntArrayRef  physical_strides,
int64_t  num_batch_dims 
)
static

◆ checkContiguous()

◆ checkDefined()

TORCH_API void at::checkDefined ( CheckedFrom  c,
const TensorArg t 
)

Definition at line 202 of file TensorUtils.cpp.

References c, at::Tensor::defined(), and TORCH_CHECK.

Referenced by checkAllDefined().

◆ checkDeviceType() [1/2]

TORCH_API void at::checkDeviceType ( CheckedFrom  c,
at::ArrayRef< Tensor tensors,
at::DeviceType  device_type 
)

◆ checkDeviceType() [2/2]

◆ checkDim() [1/2]

◆ checkDim() [2/2]

TORCH_API void at::checkDim ( CheckedFrom  c,
const TensorGeometryArg t,
int64_t  dim 
)

Definition at line 41 of file TensorUtils.cpp.

References c, dim, at::Tensor::dim(), and TORCH_CHECK.

◆ checkDimRange()

TORCH_API void at::checkDimRange ( CheckedFrom  c,
const TensorGeometryArg t,
int64_t  dim_start,
int64_t  dim_end 
)

Definition at line 47 of file TensorUtils.cpp.

References c, at::Tensor::dim(), and TORCH_CHECK.

◆ checkDL()

static void* at::checkDL ( void *  x)
static

Definition at line 21 of file DynamicLibrary.cpp.

References AT_ERROR, and bench_ops::x.

Referenced by at::DynamicLibrary::DynamicLibrary(), and at::DynamicLibrary::sym().

◆ checked_dense_tensor_list_unwrap()

static std::vector<TensorImpl*> at::checked_dense_tensor_list_unwrap ( ArrayRef< Tensor tensors,
const char *  name,
int  pos,
DeviceType  device_type,
ScalarType  scalar_type 
)
inlinestatic

◆ checked_dense_tensor_unwrap()

static TensorImpl* at::checked_dense_tensor_unwrap ( const Tensor expr,
const char *  name,
int  pos,
const char *  api,
bool  allowNull,
DeviceType  device_type,
ScalarType  scalar_type 
)
inlinestatic

Definition at line 29 of file Utils.h.

References AT_ERROR, at::Tensor::defined(), at::Tensor::device(), caffe2.python.gradient_check_test::device_type, at::Tensor::layout(), name, at::Tensor::scalar_type(), detail::scalar_type(), c10::Device::type(), and at::Tensor::unsafeGetTensorImpl().

Referenced by at::native::legacy::cuda::_th_copy_ignoring_overlaps_(), at::native::legacy::cuda::_th_cross_kernel(), at::native::legacy::cuda::_th_cross_kernel_out(), at::native::legacy::cuda::_th_gels(), at::native::legacy::cpu::_th_gels(), at::native::legacy::cuda::_th_gels_out(), at::native::legacy::cpu::_th_gels_out(), at::native::legacy::cuda::_th_geqrf(), at::native::legacy::cpu::_th_geqrf(), at::native::legacy::cuda::_th_geqrf_out(), at::native::legacy::cpu::_th_geqrf_out(), at::native::legacy::cpu::_th_histc(), at::native::legacy::cpu::_th_histc_out(), at::native::legacy::cuda::_th_index_copy_(), at::native::legacy::cpu::_th_index_copy_(), at::native::legacy::cuda::_th_masked_fill_(), at::native::legacy::cuda::_th_masked_fill_bool_(), at::native::legacy::cuda::_th_mode(), at::native::legacy::cpu::_th_mode(), at::native::legacy::cuda::_th_mode_out(), at::native::legacy::cpu::_th_mode_out(), at::native::legacy::cpu::_th_nonzero(), at::native::legacy::cpu::_th_nonzero_out(), at::native::legacy::cpu::_th_ormqr(), at::native::legacy::cpu::_th_ormqr_out(), at::native::legacy::cuda::_th_put_(), at::native::legacy::cpu::_th_put_(), at::native::legacy::cuda::_th_renorm(), at::native::legacy::cpu::_th_renorm(), at::native::legacy::cuda::_th_renorm_(), at::native::legacy::cpu::_th_renorm_(), at::native::legacy::cuda::_th_renorm_out(), at::native::legacy::cpu::_th_renorm_out(), at::native::legacy::cuda::_th_sort(), at::native::legacy::cuda::_th_sort_out(), at::native::legacy::cpu::_th_std(), at::native::legacy::cuda::_th_topk(), at::native::legacy::cuda::_th_topk_out(), at::native::legacy::cpu::_th_var(), at::native::legacy::cuda::_thnn_conv2d_backward(), at::native::legacy::cuda::_thnn_conv2d_backward_out(), at::native::legacy::cuda::_thnn_conv2d_forward(), at::native::legacy::cuda::_thnn_conv2d_forward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward_out(), at::native::legacy::cuda::_thnn_glu_backward(), at::native::legacy::cuda::_thnn_glu_backward_out(), at::native::legacy::cuda::_thnn_glu_forward(), at::native::legacy::cuda::_thnn_glu_forward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_backward(), at::native::legacy::cuda::_thnn_log_sigmoid_backward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_forward(), at::native::legacy::cuda::_thnn_log_sigmoid_forward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_backward(), at::native::legacy::cuda::_thnn_nll_loss2d_backward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_forward(), at::native::legacy::cuda::_thnn_nll_loss2d_forward_out(), at::native::legacy::cuda::_thnn_nll_loss_backward(), at::native::legacy::cuda::_thnn_nll_loss_backward_out(), at::native::legacy::cuda::_thnn_nll_loss_forward(), at::native::legacy::cuda::_thnn_nll_loss_forward_out(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_(), and at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_out().

◆ checkLayout() [1/2]

TORCH_API void at::checkLayout ( CheckedFrom  c,
at::ArrayRef< Tensor tensors,
at::Layout  layout 
)

Definition at line 252 of file TensorUtils.cpp.

References c, checkLayout(), caffe2::layout, and caffe2::tensors.

◆ checkLayout() [2/2]

TORCH_API void at::checkLayout ( CheckedFrom  c,
const Tensor t,
Layout  layout 
)

Definition at line 244 of file TensorUtils.cpp.

References c, at::Tensor::defined(), at::Tensor::layout(), caffe2::layout, and TORCH_CHECK.

Referenced by _apply_preamble(), and checkLayout().

◆ checkNumel()

TORCH_API void at::checkNumel ( CheckedFrom  c,
const TensorGeometryArg t,
int64_t  numel 
)

Definition at line 109 of file TensorUtils.cpp.

References c, at::Tensor::numel(), numel(), and TORCH_CHECK.

◆ checkRecordAllFunctions()

TORCH_API bool at::checkRecordAllFunctions ( )

Definition at line 495 of file record_function.cpp.

Referenced by at::ThreadLocalState::ThreadLocalState().

◆ checkSameDim()

TORCH_API void at::checkSameDim ( CheckedFrom  c,
const TensorGeometryArg t1,
const TensorGeometryArg t2 
)

Definition at line 194 of file TensorUtils.cpp.

References c, pyspybench::t1, pyspybench::t2, and TORCH_CHECK.

◆ checkSameGPU()

TORCH_API void at::checkSameGPU ( CheckedFrom  c,
const TensorArg t1,
const TensorArg t2 
)

Definition at line 130 of file TensorUtils.cpp.

References AT_ERROR, c, pyspybench::t1, pyspybench::t2, and TORCH_CHECK.

Referenced by checkAllSameGPU().

◆ checkSameNumel() [1/2]

void at::checkSameNumel ( CheckedFrom  c,
const TensorArg t1,
const TensorArg t2 
)

Definition at line 117 of file TensorUtils.cpp.

References c, pyspybench::t1, pyspybench::t2, and TORCH_CHECK.

Referenced by checkAllSameNumel().

◆ checkSameNumel() [2/2]

TORCH_API void at::checkSameNumel ( CheckedFrom  c,
const TensorGeometryArg t1,
const TensorGeometryArg t2 
)

◆ checkSameSize()

◆ checkSameType()

TORCH_API void at::checkSameType ( CheckedFrom  c,
const TensorArg t1,
const TensorArg t2 
)

◆ checkScalarType()

TORCH_API void at::checkScalarType ( CheckedFrom  c,
const TensorArg t,
ScalarType  ty 
)

◆ checkScalarTypes()

◆ checkSize() [1/2]

TORCH_API void at::checkSize ( CheckedFrom  c,
const TensorGeometryArg t,
int64_t  dim,
int64_t  size 
)

Definition at line 77 of file TensorUtils.cpp.

References c, dim, size(), at::Tensor::size(), and TORCH_CHECK.

◆ checkSize() [2/2]

TORCH_API void at::checkSize ( CheckedFrom  c,
const TensorGeometryArg t,
IntArrayRef  sizes 
)

◆ chunk_batching_rule()

std::vector<Tensor> at::chunk_batching_rule ( const Tensor self,
int64_t  chunks,
int64_t  dim 
)

◆ clamp_batching_rule()

Tensor at::clamp_batching_rule ( const Tensor self,
optional< Scalar min,
optional< Scalar max 
)

◆ clamp_max_batching_rule()

Tensor at::clamp_max_batching_rule ( const Tensor self,
Scalar  max 
)

◆ clamp_min_batching_rule()

Tensor at::clamp_min_batching_rule ( const Tensor self,
Scalar  min 
)

◆ clearCallbacks()

TORCH_API void at::clearCallbacks ( )

Definition at line 389 of file record_function.cpp.

References matmul_dlmc_bench::m.

Referenced by main(), and THPAutograd_initExtension().

◆ clearGlobalCallbacks()

TORCH_API void at::clearGlobalCallbacks ( )

clearGlobalCallbacks removes all global callbacks WARNING: not thread safe

Definition at line 381 of file record_function.cpp.

◆ clearThreadLocalCallbacks()

TORCH_API void at::clearThreadLocalCallbacks ( )

clearThreadLocalCallbacks removes all thread local callbacks

Definition at line 385 of file record_function.cpp.

◆ clone_batching_rule()

◆ collapse_dims()

template<typename T >
std::pair<int64_t, int64_t> at::collapse_dims ( T *  sizes,
T *  strides,
int64_t  dims,
const int  excludeDim = -1 
)
inline

◆ comparison_pointwise_batching_rule()

template<typename F , F Func>
Tensor at::comparison_pointwise_batching_rule ( const Tensor self,
const Tensor other 
)

◆ computeFrontBatchDimsFromLevels()

static BatchDims at::computeFrontBatchDimsFromLevels ( std::bitset< kVmapNumLevels levels_bitset)
static

◆ computeIndex()

◆ contiguous_batching_rule()

Tensor at::contiguous_batching_rule ( const Tensor self,
MemoryFormat  memory_format 
)

◆ CPU()

◆ cpu_fixed_free()

static at::cpu_fixed_free ( void *  state,
void *  allocation 
)
static

Definition at line 22 of file CPUFixedAllocator.h.

References caffe2::function, and state.

◆ cpu_fixed_malloc()

static at::cpu_fixed_malloc ( void *  ,
ptrdiff_t   
)
static

Definition at line 14 of file CPUFixedAllocator.h.

References AT_ERROR.

◆ cpu_fixed_realloc()

static at::cpu_fixed_realloc ( void *  ,
void *  ,
ptrdiff_t   
)
static

Definition at line 18 of file CPUFixedAllocator.h.

References AT_ERROR.

◆ CPU_tensor_apply2()

template<typename scalar1 , typename scalar2 , typename Op >
void at::CPU_tensor_apply2 ( Tensor  tensor1,
Tensor  tensor2,
const Op  op 
)
inline

◆ CPU_tensor_apply3()

template<typename scalar1 , typename scalar2 , typename scalar3 , typename Op >
void at::CPU_tensor_apply3 ( Tensor  tensor1,
Tensor  tensor2,
Tensor  tensor3,
const Op  op 
)
inline

◆ CPU_tensor_apply4()

template<typename scalar1 , typename scalar2 , typename scalar3 , typename scalar4 , typename Op >
void at::CPU_tensor_apply4 ( Tensor  tensor1,
Tensor  tensor2,
Tensor  tensor3,
Tensor  tensor4,
const Op  op 
)
inline

◆ createBatchDimBitset()

std::bitset<kVmapMaxTensorDims> at::createBatchDimBitset ( BatchDimsRef  bdims)
inline

◆ CreateContext()

std::unique_ptr<at::BaseContext> at::CreateContext ( const at::Device device)
inline

◆ createVmapLevelsBitset()

◆ CUDA()

◆ default_names()

DimnameList at::default_names ( size_t  len)

◆ defaultfloat()

std::ios_base& at::defaultfloat ( std::ios_base &  __base)
inline

Definition at line 18 of file Formatting.cpp.

Referenced by __printFormat(), print(), and printScale().

◆ deleter()

◆ device_of() [1/2]

optional<Device> at::device_of ( const Tensor t)
inline

Return the Device of a Tensor, if the Tensor is defined.

Definition at line 17 of file DeviceGuard.h.

References at::Tensor::defined(), at::Tensor::device(), c10::make_optional(), and c10::nullopt.

Referenced by at::native::legacy::cuda::_thnn_conv2d_backward(), at::native::legacy::cuda::_thnn_conv2d_backward_out(), at::native::legacy::cuda::_thnn_conv2d_forward(), at::native::legacy::cuda::_thnn_conv2d_forward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward_out(), at::native::legacy::cuda::_thnn_glu_backward(), at::native::legacy::cuda::_thnn_glu_backward_out(), at::native::legacy::cuda::_thnn_glu_forward(), at::native::legacy::cuda::_thnn_glu_forward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_backward(), at::native::legacy::cuda::_thnn_log_sigmoid_backward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_forward(), at::native::legacy::cuda::_thnn_log_sigmoid_forward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_backward(), at::native::legacy::cuda::_thnn_nll_loss2d_backward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_forward(), at::native::legacy::cuda::_thnn_nll_loss2d_forward_out(), at::native::legacy::cuda::_thnn_nll_loss_backward(), at::native::legacy::cuda::_thnn_nll_loss_backward_out(), at::native::legacy::cuda::_thnn_nll_loss_forward(), at::native::legacy::cuda::_thnn_nll_loss_forward_out(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_out(), torch::autograd::InputBuffer::add(), device_of(), torch::autograd::dispatch_contiguous(), torch::autograd::dispatch_copy_(), torch::autograd::dispatch_invert(), torch::autograd::dispatch_nonzero(), torch::autograd::dispatch_nonzero_numpy(), torch::autograd::dispatch_range(), torch::autograd::dispatch_to_Bool(), torch::autograd::dispatch_to_CComplexDouble(), torch::autograd::dispatch_to_CDouble(), torch::autograd::dispatch_to_CLong(), torch::autograd::Engine::evaluate_function(), tools.codegen.dest.register_dispatch_key.RegisterDispatchKey::gen_unstructured(), at::Tensor::index(), at::Tensor::index_put_(), torch::autograd::THPVariable_getitem(), torch::autograd::THPVariable_new(), torch::autograd::THPVariable_new_ones(), torch::autograd::THPVariable_new_tensor(), and torch::autograd::THPVariable_setitem().

◆ device_of() [2/2]

optional<Device> at::device_of ( TensorList  t)
inline

Return the Device of a TensorList, if the list is non-empty and the first Tensor is defined.

(This function implicitly assumes that all tensors in the list have the same device.)

Definition at line 28 of file DeviceGuard.h.

References device_of(), and c10::nullopt.

◆ diagonal_backward_batching_rule()

Tensor at::diagonal_backward_batching_rule ( const Tensor grad,
IntArrayRef  input_sizes,
int64_t  offset,
int64_t  dim1,
int64_t  dim2 
)

◆ diagonal_batching_rule()

Tensor at::diagonal_batching_rule ( const Tensor self,
int64_t  offset,
int64_t  dim1,
int64_t  dim2 
)

◆ dim_list_to_bitset()

◆ dimname_to_position()

◆ dimnames_to_positions()

◆ divup()

int64_t at::divup ( int64_t  x,
int64_t  y 
)
inline

◆ dot_batching_rule()

◆ enableRecordFunction()

TORCH_API void at::enableRecordFunction ( bool  enable)

◆ exp()

◆ exp< double >()

template<>
C10_HOST_DEVICE double at::exp< double > ( double  x)
inline

Definition at line 71 of file NumericUtils.h.

References exp(), and bench_ops::x.

◆ expand_batching_rule()

◆ expand_inplace() [1/4]

◆ expand_inplace() [2/4]

std::tuple<Tensor> at::expand_inplace ( const Tensor tensor,
const Tensor to_expand,
const char *  api_name 
)
inline

Definition at line 56 of file ExpandUtils.h.

References check_defined(), expand_inplace(), and tensor.

◆ expand_inplace() [3/4]

std::tuple<Tensor, Tensor> at::expand_inplace ( const Tensor tensor,
const Tensor to_expand1,
const Tensor to_expand2 
)
inline

◆ expand_inplace() [4/4]

std::tuple<Tensor, Tensor> at::expand_inplace ( const Tensor tensor,
const Tensor to_expand1,
const Tensor to_expand2,
const char *  api_name 
)
inline

Definition at line 71 of file ExpandUtils.h.

References check_defined(), expand_inplace(), and tensor.

◆ expand_outplace() [1/5]

◆ expand_outplace() [2/5]

std::tuple<Tensor, Tensor> at::expand_outplace ( const Tensor to_expand1,
const Tensor to_expand2,
const char *  api_name 
)
inline

Definition at line 88 of file ExpandUtils.h.

References check_defined(), and expand_outplace().

◆ expand_outplace() [3/5]

std::tuple<Tensor, Tensor, Tensor> at::expand_outplace ( const Tensor to_expand1,
const Tensor to_expand2,
const Tensor to_expand3 
)
inline

◆ expand_outplace() [4/5]

std::tuple<Tensor, Tensor, Tensor> at::expand_outplace ( const Tensor to_expand1,
const Tensor to_expand2,
const Tensor to_expand3,
const char *  api_name 
)
inline

Definition at line 108 of file ExpandUtils.h.

References check_defined(), and expand_outplace().

◆ expand_outplace() [5/5]

std::vector<Tensor> at::expand_outplace ( TensorList  to_expand)
inline

◆ expand_size() [1/2]

◆ expand_size() [2/2]

std::tuple<Tensor> at::expand_size ( const Tensor to_expand,
IntArrayRef  sizes,
const char *  api_name 
)
inline

Definition at line 124 of file ExpandUtils.h.

References check_defined(), expand_size(), and sizes.

◆ fill_inplace_scalar_batching_rule()

Tensor& at::fill_inplace_scalar_batching_rule ( Tensor self,
Scalar  value 
)

◆ fill_inplace_tensor_batching_rule()

Tensor& at::fill_inplace_tensor_batching_rule ( Tensor self,
const Tensor value 
)

◆ find_split_dim()

static int at::find_split_dim ( TensorIteratorBase iter)
static

Chooses a dimension over which to parallelize.

Prefers the outer-most dimension thats larger than the number of available threads.

Definition at line 70 of file TensorIteratorReduce.cpp.

References AT_ASSERT, dim, get_num_threads(), iter, and shape.

Referenced by at::TensorIteratorBase::foreach_reduced_elt(), and parallel_dim_reduction().

◆ forward() [1/2]

void at::forward ( int64_t  offset)
inline

Definition at line 288 of file CPUApplyUtils.h.

Referenced by torch.distributed.nn.api.remote_module._RemoteModule::__init__(), torch::autograd::Function< T >::apply(), apply_op(), torch::python::bind_module(), torch.fx.graph.Graph::call_module(), torch.fx.symbolic_trace.Tracer::call_module(), torch.utils.checkpoint::checkpoint_sequential(), torch.quantization.fx.utils::collect_producer_nodes(), torch._jit_internal::export(), torch::onnx::export(), fastrnns.factory::flatten_list(), torch.jit._async::fork(), forward(), torch.jit._freeze::freeze(), operator_benchmark.benchmark_test_generator::generate_pt_tests_from_op_list(), torch::nn::AnyModule::get_(), audio_text_models::get_deepspeech(), vision_models::get_detr(), vision_models::get_fcn_resnet(), audio_text_models::get_multiheadattn(), torch.distributed.pipeline.sync.phony::get_phony(), vision_models::get_resnet18(), ppl_models::get_robust_regression(), ppl_models::get_simple_regression(), audio_text_models::get_transformer(), audio_text_models::get_wav2letter(), torch._jit_internal::ignore(), torch.distributed.pipeline.sync.checkpoint::is_recomputing(), torch::jit::isinstance(), fastrnns.factory::layernorm_pytorch_lstm_creator(), torch.fx.subgraph_rewriter::replace_pattern(), operator_benchmark.benchmark_caffe2.Caffe2OperatorTestCase::run_forward(), torch.jit._serialization::save(), torch.jit._script::script(), torch.distributed.pipeline.sync.skip.skippable::skippable(), torch.jit._trace::trace(), torch.jit._trace::trace_module(), torch._jit_internal::unused(), fastrnns.factory::varlen_pytorch_lstm_creator(), and torch::detail::wrap_pybind_function_impl_().

◆ forward() [2/2]

template<typename Arg , typename... Args>
void at::forward ( int64_t  offset,
Arg &  iter,
Args &...  iter_tail 
)
inline

◆ from_blob() [1/4]

Tensor at::from_blob ( void *  data,
IntArrayRef  sizes,
const std::function< void(void *)> &  deleter,
const TensorOptions options = {} 
)
inline

Definition at line 95 of file Functions.h.

◆ from_blob() [2/4]

Tensor at::from_blob ( void *  data,
IntArrayRef  sizes,
const TensorOptions options = {} 
)
inline

Definition at line 126 of file Functions.h.

◆ from_blob() [3/4]

◆ from_blob() [4/4]

Tensor at::from_blob ( void *  data,
IntArrayRef  sizes,
IntArrayRef  strides,
const TensorOptions options = {} 
)
inline

Definition at line 103 of file Functions.h.

◆ fromDLPack()

TORCH_API Tensor at::fromDLPack ( const DLManagedTensor src)

Definition at line 208 of file DLConvertor.cpp.

References deleter(), device, from_blob(), getATenDevice(), caffe2::src, and toScalarType().

Referenced by THPModule_fromDLPack().

◆ geometry_is_contiguous()

TORCH_API bool at::geometry_is_contiguous ( IntArrayRef  sizes,
IntArrayRef  strides 
)

Definition at line 267 of file TensorUtils.cpp.

References dim, caffe2::int64_t, sizes, and strides.

Referenced by at::TensorGeometry::is_contiguous().

◆ get_cxx_flags()

TORCH_API std::string at::get_cxx_flags ( )

Definition at line 201 of file Version.cpp.

References caffe2::GetBuildOptions(), and TORCH_CHECK.

Referenced by THPModule_cxxFlags().

◆ get_device()

◆ get_generator_or_default()

template<typename T >
static T* at::get_generator_or_default ( const c10::optional< Generator > &  gen,
const Generator &  default_gen 
)
inlinestatic

Utility function used in tensor implementations, which supplies the default generator to tensors, if an input generator is not supplied.

The input Generator* is also static casted to the backend generator type (CPU/CUDAGeneratorImpl etc.)

Definition at line 127 of file Utils.h.

References tools.autograd.gen_python_functions::gen().

◆ get_mkl_version()

TORCH_API std::string at::get_mkl_version ( )

Definition at line 21 of file Version.cpp.

References version.

Referenced by get_parallel_info(), and show_config().

◆ get_mkldnn_version()

TORCH_API std::string at::get_mkldnn_version ( )

Definition at line 37 of file Version.cpp.

Referenced by get_parallel_info(), and show_config().

◆ get_num_interop_threads()

TORCH_API int at::get_num_interop_threads ( )

◆ get_num_threads()

◆ get_openmp_version()

TORCH_API std::string at::get_openmp_version ( )

Definition at line 55 of file Version.cpp.

Referenced by get_parallel_info(), and show_config().

◆ get_overlap_status() [1/2]

◆ get_overlap_status() [2/2]

TORCH_API MemOverlapStatus at::get_overlap_status ( TensorImpl a,
TensorImpl b 
)

◆ get_parallel_info()

◆ get_qtensorimpl()

◆ get_record_function_tls_()

TORCH_API const RecordFunctionTLS & at::get_record_function_tls_ ( )

Definition at line 58 of file record_function.cpp.

Referenced by at::ThreadLocalState::ThreadLocalState().

◆ get_sub_byte_tensor_size()

int64_t at::get_sub_byte_tensor_size ( int64_t  size_bytes,
at::ScalarType  t 
)

Definition at line 80 of file Quantizer.cpp.

References std::ceil(), and caffe2::int64_t.

Referenced by new_qtensor().

◆ get_thread_num()

TORCH_API int at::get_thread_num ( )

◆ getATenDevice()

◆ getCPUAllocator()

TORCH_API Allocator * at::getCPUAllocator ( )

◆ getDeprecatedTypeProperties()

◆ getDLContext()

TORCH_API DLContext at::getDLContext ( const Tensor tensor,
const int64_t &  device_id 
)

◆ getDLDataType()

◆ getGradInputPhysicalDim()

static int64_t at::getGradInputPhysicalDim ( int64_t  dim,
IntArrayRef  input_sizes,
int64_t  num_batch_dims 
)
static

◆ getLevelsAndLargestLogicalDim()

static std::pair<std::bitset<kVmapNumLevels>,int64_t> at::getLevelsAndLargestLogicalDim ( TensorList  logical_tensors)
static

◆ getNumGPUs()

static size_t at::getNumGPUs ( )
inlinestatic

◆ getPhysicalTensorAndLevels()

static std::pair<Tensor,std::bitset<kVmapNumLevels> > at::getPhysicalTensorAndLevels ( const Tensor self)
static

◆ globalContext()

TORCH_API Context & at::globalContext ( )

Definition at line 31 of file Context.cpp.

Referenced by at::native::_choose_qparams_per_tensor(), at::native::_convolution(), at::native::legacy::cuda::_th_copy_ignoring_overlaps_(), at::native::legacy::cuda::_th_cross_kernel(), at::native::legacy::cuda::_th_cross_kernel_out(), at::native::legacy::cuda::_th_gels(), at::native::legacy::cuda::_th_gels_out(), at::native::legacy::cuda::_th_geqrf(), at::native::legacy::cuda::_th_geqrf_out(), at::native::legacy::cuda::_th_index_copy_(), at::native::legacy::cuda::_th_masked_fill_(), at::native::legacy::cuda::_th_masked_fill_bool_(), at::native::legacy::cuda::_th_mode(), at::native::legacy::cuda::_th_mode_out(), at::native::legacy::cuda::_th_put_(), at::native::legacy::cuda::_th_renorm(), at::native::legacy::cuda::_th_renorm_(), at::native::legacy::cuda::_th_renorm_out(), at::native::legacy::cuda::_th_sort(), at::native::legacy::cuda::_th_sort_out(), at::native::legacy::cuda::_th_topk(), at::native::legacy::cuda::_th_topk_out(), at::native::legacy::cuda::_thnn_conv2d_backward(), at::native::legacy::cuda::_thnn_conv2d_backward_out(), at::native::legacy::cuda::_thnn_conv2d_forward(), at::native::legacy::cuda::_thnn_conv2d_forward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_backward_out(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward(), at::native::legacy::cuda::_thnn_conv_depthwise2d_forward_out(), at::native::legacy::cuda::_thnn_glu_backward(), at::native::legacy::cuda::_thnn_glu_backward_out(), at::native::legacy::cuda::_thnn_glu_forward(), at::native::legacy::cuda::_thnn_glu_forward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_backward(), at::native::legacy::cuda::_thnn_log_sigmoid_backward_out(), at::native::legacy::cuda::_thnn_log_sigmoid_forward(), at::native::legacy::cuda::_thnn_log_sigmoid_forward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward(), at::native::legacy::cuda::_thnn_multi_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward(), at::native::legacy::cuda::_thnn_multi_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_backward_out(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward(), at::native::legacy::cuda::_thnn_multilabel_margin_loss_forward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_backward(), at::native::legacy::cuda::_thnn_nll_loss2d_backward_out(), at::native::legacy::cuda::_thnn_nll_loss2d_forward(), at::native::legacy::cuda::_thnn_nll_loss2d_forward_out(), at::native::legacy::cuda::_thnn_nll_loss_backward(), at::native::legacy::cuda::_thnn_nll_loss_backward_out(), at::native::legacy::cuda::_thnn_nll_loss_forward(), at::native::legacy::cuda::_thnn_nll_loss_forward_out(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_(), at::native::legacy::cuda::_thnn_rrelu_with_noise_forward_out(), at::native::adaptive_avg_pool2d_quantized_cpu(), at::native::adaptive_avg_pool3d_out_quantized_cpu(), at::Context::alertNotDeterministic(), torch::autograd::VariableType::allCUDATypes(), at::native::avg_pool2d_quantized_cpu(), at::cuda::blas::bgemm< at::Half >(), at::cuda::blas::bgemm< c10::complex< double > >(), at::cuda::blas::bgemm< c10::complex< float > >(), at::cuda::blas::bgemm< double >(), at::cuda::blas::bgemm< float >(), torch::jit::tensorexpr::CudaCodeGen::CompileToNVRTC(), at::native::convolution(), at::native::cudnn_convolution_deprecated2(), at::native::cudnn_convolution_transpose_deprecated2(), at::native::cudnn_is_acceptable(), deserialize_conv(), torch::jit::fuser::cuda::FusedKernelCUDA::FusedKernelCUDA(), at::cuda::blas::gemm< at::Half >(), at::cuda::blas::gemm< c10::complex< double > >(), at::cuda::blas::gemm< c10::complex< float > >(), at::cuda::blas::gemm< double >(), at::cuda::blas::gemm< float >(), at::cuda::blas::gemv< c10::complex< double > >(), at::cuda::blas::gemv< c10::complex< float > >(), at::cuda::blas::gemv< double >(), at::cuda::blas::gemv< float >(), tools.codegen.dest.register_dispatch_key.RegisterDispatchKey::gen_unstructured(), at::cuda::getCurrentCUDABlasHandle(), at::cuda::getPinnedMemoryAllocator(), at::native::hardsigmoid_quantized_cpu(), hasCUDA(), hasHIP(), hasLAPACK(), hasMAGMA(), hasMKL(), hasMKLDNN(), hasOpenMP(), hasXLA(), at::native::index_copy_(), init(), isPinned(), manual_seed(), at::native::mean_out_quantized_cpu(), new_qtensor(), torch::jit::fuser::cuda::nvrtc(), torch::jit::tensorexpr::nvrtc(), torch::jit::fuser::cuda::executor_utils::nvrtcCompile(), pytorch_jni::PytorchJni::preModuleLoadSetupOnce(), at::native::quantized_hardswish(), at::native::quantized_max_pool2d(), register_linear_params(), torch::jit::RegisterCudaFuseGraph::registerPass(), at::native::relu_quantized_cpu(), torch::jit::fuser::cuda::FusionExecutor::runFusion(), at::native::sigmoid_quantized_cpu(), at::native::tanh_quantized_cpu(), THCPModule_initExtension(), THPModule_allowTF32CuBLAS(), THPModule_allowTF32CuDNN(), THPModule_are_vmap_fallback_warnings_enabled(), THPModule_benchmarkCuDNN(), THPModule_deterministicAlgorithms(), THPModule_deterministicCuDNN(), THPModule_isEnabledXNNPACK(), THPModule_qEngine(), THPModule_set_display_vmap_fallback_warnings_mode(), THPModule_setAllowTF32CuBLAS(), THPModule_setAllowTF32CuDNN(), THPModule_setBenchmarkCuDNN(), THPModule_setDeterministicAlgorithms(), THPModule_setDeterministicCuDNN(), THPModule_setFlushDenormal(), THPModule_setQEngine(), THPModule_setUserEnabledCuDNN(), THPModule_setUserEnabledMkldnn(), THPModule_supportedQEngines(), THPModule_userEnabledCuDNN(), THPModule_userEnabledMkldnn(), torch::jit::to_dispatch(), at::native::ConvParams::use_mkldnn(), and warnFallback().

◆ globalDeprecatedTypePropertiesRegistry()

◆ has_internal_overlap() [1/2]

◆ has_internal_overlap() [2/2]

◆ has_names()

◆ hasCallbacks()

TORCH_API bool at::hasCallbacks ( )

◆ hasCUDA()

static bool at::hasCUDA ( )
inlinestatic

◆ hasGlobalCallbacks()

TORCH_API bool at::hasGlobalCallbacks ( )

hasGlobalCallbacks returns whether there're global callbacks registered with pushGlobalCallback

Definition at line 359 of file record_function.cpp.

Referenced by torch::jit::mobile::InterpreterState::run(), and shouldRunRecordFunction().

◆ hasHIP()

static bool at::hasHIP ( )
inlinestatic

◆ hasLAPACK()

static bool at::hasLAPACK ( )
inlinestatic

Definition at line 302 of file Context.h.

References globalContext(), and at::Context::hasLAPACK().

Referenced by initModule().

◆ hasMAGMA()

static bool at::hasMAGMA ( )
inlinestatic

Definition at line 306 of file Context.h.

References globalContext(), and at::Context::hasMAGMA().

Referenced by THCPModule_initExtension().

◆ hasMKL()

static bool at::hasMKL ( )
inlinestatic

Definition at line 298 of file Context.h.

References globalContext(), and at::Context::hasMKL().

Referenced by at::native::bmm_out_or_baddbmm_(), and initModule().

◆ hasMKLDNN()

static bool at::hasMKLDNN ( )
inlinestatic

Definition at line 310 of file Context.h.

References globalContext(), and at::Context::hasMKLDNN().

Referenced by initModule().

◆ hasOpenMP()

static bool at::hasOpenMP ( )
inlinestatic

Definition at line 294 of file Context.h.

References globalContext(), and at::Context::hasOpenMP().

Referenced by initModule().

◆ hasThreadLocalCallbacks()

TORCH_API bool at::hasThreadLocalCallbacks ( )

hasThreadLocalCallbacks returns whether there're callbacks registered with addThreadLocalCallback

Definition at line 363 of file record_function.cpp.

◆ hasXLA()

static bool at::hasXLA ( )
inlinestatic

Definition at line 270 of file Context.h.

References globalContext(), and at::Context::hasXLA().

◆ HIP()

◆ in_parallel_region()

◆ infer_dense_strides()

TORCH_API std::vector< int64_t > at::infer_dense_strides ( IntArrayRef  tensor_sizes,
IntArrayRef  tensor_strides 
)

◆ infer_size() [1/2]

◆ infer_size() [2/2]

std::vector<int64_t> at::infer_size ( IntArrayRef  shape,
int64_t  numel 
)
inline

◆ inferExpandGeometry()

TORCH_API std::tuple< std::vector< int64_t >, std::vector< int64_t > > at::inferExpandGeometry ( IntArrayRef  tensor_sizes,
IntArrayRef  tensor_strides,
IntArrayRef  sizes 
)

◆ init()

static void at::init ( void  )
inlinestatic

◆ init_num_threads()

◆ initialTensorOptions()

◆ inplaceIsVmapCompatible()

◆ internal_set_names_inplace() [1/2]

◆ internal_set_names_inplace() [2/2]

TORCH_API Tensor & at::internal_set_names_inplace ( Tensor tensor,
std::vector< Dimname > &&  names,
bool  validate_names 
)

◆ intraop_default_num_threads()

int at::intraop_default_num_threads ( )

Definition at line 94 of file ParallelCommon.cpp.

References c10::TaskThreadPoolBase::defaultNumThreads(), and TORCH_CHECK.

◆ intraop_invoke()

template<typename F0 , typename F1 >
void at::intraop_invoke ( const F0 &  f0,
const F1 &  f1 
)

Definition at line 103 of file ParallelNativeTBB.h.

◆ intraop_launch()

TORCH_API void at::intraop_launch ( std::function< void()>  func)

◆ intraop_launch_future()

TORCH_API std::shared_ptr<c10::ivalue::Future> at::intraop_launch_future ( std::function< void()>  func)

◆ is_allowed_dim_on_scalar_tensor()

static bool at::is_allowed_dim_on_scalar_tensor ( int64_t  dim)
static

Definition at line 53 of file BatchingRegistrations.cpp.

References dim.

Referenced by sum_batching_rule(), and transpose_int_batching_rule().

◆ is_custom_op()

bool at::is_custom_op ( const c10::OperatorName opName)

◆ is_expandable_to()

◆ isBatchedTensor()

◆ isInplaceOp()

static bool at::isInplaceOp ( const c10::FunctionSchema schema)
static

Definition at line 46 of file BatchedFallback.cpp.

References caffe2::it.

Referenced by batchedTensorForLoopFallback().

◆ isPhysicalScalarTensor()

bool at::isPhysicalScalarTensor ( const Tensor logical_tensor)

Definition at line 73 of file BatchingRegistrations.cpp.

References at::Tensor::dim(), and maybeGetBatchedImpl().

Referenced by binary_pointwise_batching_rule().

◆ isRecordFunctionEnabled()

TORCH_API bool at::isRecordFunctionEnabled ( )

isRecordFunctionEnabled returns whether RecordFunction is enabled thread locally

Definition at line 395 of file record_function.cpp.

Referenced by torch::jit::mobile::InterpreterState::run().

◆ iterate() [1/2]

void at::iterate ( int64_t  size)
inline

Definition at line 241 of file CPUApplyUtils.h.

Referenced by apply_op(), and iterate().

◆ iterate() [2/2]

template<typename Arg , typename... Args>
void at::iterate ( int64_t  size,
Arg &  iter,
Args &...  iter_tail 
)
inline

Definition at line 244 of file CPUApplyUtils.h.

References iter, iterate(), and size().

◆ iterate_continue() [1/2]

bool at::iterate_continue ( )
inline

Definition at line 250 of file CPUApplyUtils.h.

Referenced by apply_op(), and iterate_continue().

◆ iterate_continue() [2/2]

template<typename Arg , typename... Args>
bool at::iterate_continue ( Arg &  iter,
Args &...  iter_tail 
)
inline

Definition at line 255 of file CPUApplyUtils.h.

References iter, and iterate_continue().

◆ iterate_overflow() [1/2]

void at::iterate_overflow ( )
inline

Definition at line 271 of file CPUApplyUtils.h.

Referenced by apply_op(), and iterate_overflow().

◆ iterate_overflow() [2/2]

template<typename Arg , typename... Args>
void at::iterate_overflow ( Arg &  iter,
Args &...  iter_tail 
)
inline

Definition at line 274 of file CPUApplyUtils.h.

References caffe2::int64_t, iter, and iterate_overflow().

◆ launch()

◆ legacy_cat_wrap_dim() [1/2]

static int64_t at::legacy_cat_wrap_dim ( int64_t  dim,
const std::vector< std::vector< int64_t > > &  tensor_sizes 
)
inlinestatic

◆ legacy_cat_wrap_dim() [2/2]

static int64_t at::legacy_cat_wrap_dim ( int64_t  dim,
TensorList  tensors 
)
inlinestatic

◆ legacyExtractDispatchKey()

◆ log()

◆ log< double >()

template<>
C10_HOST_DEVICE double at::log< double > ( double  x)
inline

Definition at line 87 of file NumericUtils.h.

References log(), and bench_ops::x.

◆ make_per_channel_affine_quantizer()

◆ make_per_tensor_affine_quantizer()

TORCH_API QuantizerPtr at::make_per_tensor_affine_quantizer ( double  scale,
int64_t  zero_point,
ScalarType  scalar_type 
)

◆ makeBatched()

◆ manual_seed()

◆ max_dim() [1/2]

int64_t at::max_dim ( )
inline

Definition at line 302 of file CPUApplyUtils.h.

Referenced by apply_op(), and max_dim().

◆ max_dim() [2/2]

template<typename Arg , typename... Args>
int64_t at::max_dim ( Arg &  iter,
Args &...  iter_tail 
)
inline

Definition at line 307 of file CPUApplyUtils.h.

References iter, std::max(), and max_dim().

◆ max_iterate_size() [1/2]

int64_t at::max_iterate_size ( )
inline

Definition at line 260 of file CPUApplyUtils.h.

References max.

Referenced by max_iterate_size().

◆ max_iterate_size() [2/2]

template<typename Arg , typename... Args>
int64_t at::max_iterate_size ( Arg &  iter,
Args &...  iter_tail 
)
inline

Definition at line 265 of file CPUApplyUtils.h.

References iter, max_iterate_size(), and std::min().

◆ maximum_indexable_location()

static optional<int64_t> at::maximum_indexable_location ( IntArrayRef  sizes,
IntArrayRef  strides,
int64_t  storage_offset 
)
static

◆ maybe_data_ptr() [1/2]

TORCH_API void * at::maybe_data_ptr ( const Tensor tensor)

Definition at line 258 of file TensorUtils.cpp.

References at::Tensor::data_ptr(), at::Tensor::defined(), and tensor.

◆ maybe_data_ptr() [2/2]

TORCH_API void * at::maybe_data_ptr ( const TensorArg tensor)

Definition at line 262 of file TensorUtils.cpp.

References at::Tensor::data_ptr(), at::Tensor::defined(), and tensor.

◆ maybe_wrap_dim() [1/4]

static int64_t at::maybe_wrap_dim ( int64_t  dim,
const std::vector< std::vector< int64_t > > &  tensor_sizes 
)
inlinestatic

Definition at line 25 of file WrapDimUtils.h.

References dim, maybe_wrap_dim(), and size().

◆ maybe_wrap_dim() [2/4]

static int64_t at::maybe_wrap_dim ( int64_t  dim,
int64_t  dim_post_expr,
bool  wrap_scalar = true 
)
inlinestatic

Definition at line 9 of file WrapDimUtils.h.

References dim, and c10::maybe_wrap_dim().

Referenced by at::native::_allocate_or_resize_output_with_indices(), at::native::_aminmax_out_impl(), at::native::_reduction_with_indices_allocate_or_resize_output(), torch::autograd::generated::details::_safe_size(), at::native::_stack(), at::native::_stack_cpu(), at::BatchedTensorImpl::actualDim(), at::native::all_out(), at::native::any_out(), at::native::argmax_out(), at::native::argmin_out(), at::native::cat_sparse(), at::native::count_nonzero(), at::native::cross_out(), at::native::cummax_out(), at::native::cummin_out(), at::native::cumprod_backward(), at::native::default_alldims(), at::native::diag_embed(), at::native::diagonal(), at::native::diff_check_compatible_shape(), dim_list_to_bitset(), torch::autograd::generated::details::fft_r2c_backward(), at::native::flatten(), torch::cuda::gather(), torch::cuda::gather_out(), getGradInputPhysicalDim(), torch::jit::fuser::getMapSize(), torch::jit::getNativeOperation(), at::VmapPhysicalView::getPhysicalDim(), at::VmapPhysicalView::getPhysicalDims(), torch::jit::tensorexpr::TensorExprKernel::getReductionInfo(), at::native::glu_backward_out(), at::native::glu_out(), at::native::index_add_cpu_(), at::native::index_copy_(), at::native::index_fill_(), at::native::index_select_out_cpu_(), at::native::index_select_sparse(), legacy_cat_wrap_dim(), at::native::log_softmax_backward_cpu(), at::native::log_softmax_cpu(), at::native::max_out_impl(), maybe_wrap_dim(), at::native::min_out_impl(), at::native::mode_out(), at::native::movedim(), at::native::narrow(), at::native::narrow_copy_dense_cpu_out(), at::native::permute(), torch::autograd::generated::details::permute_backwards(), torch::autograd::generated::details::prod_backward(), at::namedinference::propagate_names_except(), at::native::quantized_topk_out_cpu(), torch::cuda::scatter(), torch::cuda::scatter_out(), at::native::select(), c10::TensorImpl::size(), at::TensorGeometry::size(), at::native::slice(), at::native::softmax_backward_cpu(), at::native::softmax_backward_sparse_input_preprocessing(), at::native::softmax_cpu(), torch::autograd::generated::details::split_backward(), torch::autograd::generated::details::split_with_sizes_backward(), at::native::squeeze(), at::native::squeeze_(), at::native::stack(), stack_batching_rule(), at::native::stack_out(), c10::TensorImpl::stride(), at::MetalTensorImpl< OpaqueHandle >::stride(), at::VulkanOpaqueTensorImpl< OpaqueHandle >::stride(), at::TensorGeometry::stride(), at::native::tensor_split(), at::namedinference::TensorNames::TensorNames(), at::native::topk_out_cpu(), at::native::transpose(), at::native::transpose_(), at::native::trapz(), at::native::unbind(), at::native::unflatten(), at::native::unfold(), at::native::unsqueeze(), at::native::unsqueeze_(), unsqueeze_batching_rule(), at::native::unsqueeze_qtensor(), torch::autograd::generated::details::unsqueeze_to(), and wrap_all_dims().

◆ maybe_wrap_dim() [3/4]

static int64_t at::maybe_wrap_dim ( int64_t  dim,
TensorImpl tensor 
)
inlinestatic

Definition at line 13 of file WrapDimUtils.h.

References dim, at::Tensor::dim(), maybe_wrap_dim(), and tensor.

◆ maybe_wrap_dim() [4/4]

static int64_t at::maybe_wrap_dim ( int64_t  dim,
TensorList  tensors 
)
inlinestatic

Definition at line 17 of file WrapDimUtils.h.

References dim, maybe_wrap_dim(), and caffe2::tensors.

◆ maybe_wrap_dims()

◆ maybe_wrap_dims_n()

static void at::maybe_wrap_dims_n ( int64_t *  dims,
int64_t  ndims,
int64_t  dim_post_expr 
)
inlinestatic

Definition at line 34 of file WrapDimUtils.h.

References dim, caffe2::dims, caffe2::int64_t, max, min, and TORCH_CHECK_INDEX.

Referenced by maybe_wrap_dims().

◆ maybeGetBatchedImpl()

◆ mm_batching_rule()

◆ movedim_batching_rule()

Tensor at::movedim_batching_rule ( const Tensor self,
IntArrayRef  source,
IntArrayRef  destination 
)

◆ mv_batching_rule()

◆ new_empty_batching_rule()

Tensor at::new_empty_batching_rule ( const Tensor self,
IntArrayRef  size,
c10::optional< ScalarType dtype,
c10::optional< Layout layout,
c10::optional< Device device,
c10::optional< bool >  pin_memory 
)

◆ new_empty_strided_batching_rule()

Tensor at::new_empty_strided_batching_rule ( const Tensor self,
IntArrayRef  size,
IntArrayRef  stride,
optional< ScalarType dtype,
optional< Layout layout,
optional< Device device,
optional< bool >  pin_memory 
)

◆ new_qtensor()

◆ new_zeros_batching_rule()

◆ numel()

◆ operator!=() [1/4]

bool at::operator!= ( const Dimname lhs,
const Dimname rhs 
)
inline

Definition at line 44 of file Dimname.h.

◆ operator!=() [2/4]

static Tensor at::operator!= ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator!=() [3/4]

static Tensor at::operator!= ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator!=() [4/4]

static Tensor at::operator!= ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator%() [1/3]

static Tensor at::operator% ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator%() [2/3]

static Tensor at::operator% ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator%() [3/3]

static Tensor at::operator% ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator&() [1/3]

static Tensor at::operator& ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator&() [2/3]

static Tensor at::operator& ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator&() [3/3]

static Tensor at::operator& ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator*() [1/3]

static Tensor at::operator* ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator*() [2/3]

static Tensor at::operator* ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator*() [3/3]

static Tensor at::operator* ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator+() [1/3]

static Tensor at::operator+ ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator+() [2/3]

static Tensor at::operator+ ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator+() [3/3]

static Tensor at::operator+ ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator-() [1/3]

static Tensor at::operator- ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator-() [2/3]

static Tensor at::operator- ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator-() [3/3]

static Tensor at::operator- ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator/() [1/3]

static Tensor at::operator/ ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator/() [2/3]

static Tensor at::operator/ ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator/() [3/3]

static Tensor at::operator/ ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<() [1/3]

static Tensor at::operator< ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<() [2/3]

static Tensor at::operator< ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<() [3/3]

static Tensor at::operator< ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<<() [1/7]

std::ostream& at::operator<< ( std::ostream &  out,
const BatchDim bdim 
)
inline

Definition at line 134 of file BatchedTensorImpl.h.

References at::BatchDim::dim(), at::BatchDim::level(), and out.

◆ operator<<() [2/7]

TORCH_API std::ostream & at::operator<< ( std::ostream &  out,
const DeprecatedTypeProperties t 
)

Definition at line 36 of file Formatting.cpp.

References out, and at::Tensor::toString().

◆ operator<<() [3/7]

TORCH_API std::ostream & at::operator<< ( std::ostream &  out,
const Dimname dimname 
)

Definition at line 9 of file Dimname.cpp.

References c10::namespaces::dimname(), out, c10::Symbol::toUnqualString(), and WILDCARD.

◆ operator<<() [4/7]

std::ostream & at::operator<< ( std::ostream &  out,
const Range range 
)

Definition at line 7 of file Range.cpp.

References out, and c10::prim::range().

◆ operator<<() [5/7]

static std::ostream& at::operator<< ( std::ostream &  out,
const Tensor t 
)
inlinestatic

Definition at line 18 of file Formatting.h.

References out, and print().

◆ operator<<() [6/7]

static std::ostream& at::operator<< ( std::ostream &  out,
Scalar  s 
)
inlinestatic

Definition at line 25 of file Formatting.h.

References out.

◆ operator<<() [7/7]

TORCH_API std::ostream & at::operator<< ( std::ostream &  out,
TensorGeometryArg  t 
)

Definition at line 11 of file TensorUtils.cpp.

References at::Tensor::name(), and out.

◆ operator<=() [1/3]

static Tensor at::operator<= ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<=() [2/3]

static Tensor at::operator<= ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator<=() [3/3]

static Tensor at::operator<= ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator==() [1/4]

bool at::operator== ( const Dimname lhs,
const Dimname rhs 
)
inline

Definition at line 40 of file Dimname.h.

References at::Dimname::symbol().

◆ operator==() [2/4]

static Tensor at::operator== ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator==() [3/4]

static Tensor at::operator== ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator==() [4/4]

static Tensor at::operator== ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>() [1/3]

static Tensor at::operator> ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>() [2/3]

static Tensor at::operator> ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>() [3/3]

static Tensor at::operator> ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>=() [1/3]

static Tensor at::operator>= ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>=() [2/3]

static Tensor at::operator>= ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator>=() [3/3]

static Tensor at::operator>= ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator^() [1/3]

static Tensor at::operator^ ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator^() [2/3]

static Tensor at::operator^ ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator^() [3/3]

static Tensor at::operator^ ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator|() [1/3]

static Tensor at::operator| ( const Tensor x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator|() [2/3]

static Tensor at::operator| ( const Tensor x,
Scalar  y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ operator|() [3/3]

static Tensor at::operator| ( Scalar  x,
const Tensor y 
)
inlinestatic

Definition at line 110 of file TensorOperators.h.

◆ parallel_dim_reduction()

◆ parallel_for()

template<class F >
void at::parallel_for ( const int64_t  begin,
const int64_t  end,
const int64_t  grain_size,
const F &  f 
)
inline

Definition at line 34 of file ParallelNative.h.

References at::internal::_parallel_run(), matmul_dlmc_bench::end, in_parallel_region(), caffe2::int64_t, torch.cuda.profiler::start(), and TORCH_CHECK.

Referenced by at::native::_embedding_bag_dense_backward_cpu_sum_mean(), at::native::_grid_sampler_2d_cpu_fallback(), at::native::_grid_sampler_2d_cpu_fallback_backward(), _launch_tasks_tree(), at::native::_sparse_sum_backward_cpu(), at::native::add_dense_sparse_worker_cpu(), at::native::apply_triu_tril(), at::native::apply_triu_tril_single(), at::native::baddbmm_cpu_kernel(), at::native::batch_norm_backward_cpu_template(), at::native::batch_norm_cpu_transform_input_template(), at::native::batch_norm_cpu_update_stats_template(), compute_cpu(), at::sparse::coo_to_csr(), at::native::copy_impl(), at::native::dim_apply(), caffe2::RMSNormOp< Context >::DoRunWithType(), at::native::flip_cpu_kernel(), at::TensorIteratorBase::for_each(), at::TensorIteratorBase::foreach_reduced_elt(), at::native::index_select_out_cpu_(), torch::nn::parallel::parallel_apply(), parallel_dim_reduction(), at::native::prelu_cpu_backward_kernel_multi_weights(), at::native::prelu_cpu_kernel_multi_weights(), at::native::prelu_cpu_kernel_share_weights(), PackedEmbeddingBagWeight::prepack(), at::native::range_cpu_out(), caffe2::RMSNormGradientOp< Context >::RMSNormBackward(), at::native::slow_conv2d_forward_out_cpu(), at::native::slow_conv3d_forward_out_cpu(), at::native::sparse_mask_out_cpu_kernel(), two_pass_reduction(), and PackedEmbeddingBagWeight::unpack().

◆ parallel_reduce()

template<class scalar_t , class F , class SF >
scalar_t at::parallel_reduce ( const int64_t  begin,
const int64_t  end,
const int64_t  grain_size,
const scalar_t  ident,
const F &  f,
const SF &  sf 
)
inline

◆ permute_batching_rule()

◆ permuteBatchDimsToFront()

◆ pow_scalar_Tensor_batching_rule()

Tensor at::pow_scalar_Tensor_batching_rule ( Scalar  other,
const Tensor self 
)

◆ print() [1/2]

static void at::print ( const Tensor t,
int64_t  linesize = 80 
)
inlinestatic

Definition at line 21 of file Formatting.h.

References print().

◆ print() [2/2]

TORCH_API std::ostream & at::print ( std::ostream &  stream,
const Tensor tensor_,
int64_t  linesize 
)

Definition at line 230 of file Formatting.cpp.

References __printFormat(), __printMatrix(), __printTensor(), at::Tensor::contiguous(), at::Tensor::data_ptr(), defaultfloat(), at::Tensor::defined(), at::Tensor::fw_grad(), caffe2::int64_t, at::Tensor::is_quantized(), at::Tensor::is_sparse(), c10::kCPU, c10::kDouble, c10::kPerChannelAffine, c10::kPerChannelAffineFloatQParams, c10::kPerTensorAffine, at::Tensor::ndimension(), at::Tensor::numel(), print(), printScale(), scale, at::Tensor::size(), at::Tensor::sizes(), stream, sz, tensor, at::Tensor::toString(), and c10::toString().

Referenced by torch.utils.benchmark.utils.valgrind_wrapper.timer_interface._ValgrindWrapper::__init__(), torchaudio_models.ScaledDotProduct::__init__(), torchaudio_models.MultiheadAttentionContainer::__init__(), torch.futures.Future::_add_done_callback(), update-caffe2-models.SomeClass::_download(), torch.nn.parallel.distributed::_dump_DDP_relevant_env_vars(), torch.utils.cpp_extension::_find_cuda_home(), torch.utils.cpp_extension::_find_rocm_home(), torch.utils.cpp_extension::_get_build_directory(), torch.utils.cpp_extension::_get_num_workers(), caffe2.python.onnx.backend.Caffe2Backend::_graph_to_net(), torch.utils.cpp_extension::_jit_compile(), torch.functional::_lu_impl(), operator_benchmark.benchmark_core.BenchmarkRunner::_measure_time(), torch.onnx.utils::_model_to_graph(), tools.nightly::_move_single(), tools.nightly::_nightly_version(), caffe2.python.onnx.backend.Caffe2Backend::_onnx_model_to_caffe2_net(), torch::nn::functional::_pad(), torch::nn::functional::_pad_circular(), torch.utils.cpp_extension::_prepare_ldflags(), update-caffe2-models.SomeClass::_prepare_model_data(), caffe2.python.rnn.rnn_cell_test_util::_prepare_rnn(), benchmark_ddp_rpc::_print_cont(), operator_benchmark.benchmark_core.BenchmarkRunner::_print_header(), operator_benchmark.benchmark_pytorch.PyTorchOperatorTestCase::_print_per_iter(), operator_benchmark.benchmark_core.BenchmarkRunner::_print_perf_result(), operator_benchmark.benchmark_core.BenchmarkRunner::_print_test_case_info(), torch.optim.lr_scheduler.ReduceLROnPlateau::_reduce_lr(), torch.distributed.rpc.internal::_run_function(), torch.jit._trace::_time(), caffe2.python.parallel_workers.WorkerCoordinator::_wait_finish(), torch.utils.cpp_extension::_write_ninja_file_and_build_library(), torch.utils.cpp_extension::_write_ninja_file_and_compile_objects(), torch.utils.tensorboard.writer.SummaryWriter::add_embedding(), torch.nn.modules.module.Module::apply(), torch.distributed.rpc.functions::async_execution(), torch.utils.tensorboard.summary::audio(), caffe2.experiments.python.convnet_benchmarks::Benchmark(), caffe2.python.convnet_benchmarks::Benchmark(), caffe2.contrib.nccl.nccl_ops_test::benchmark(), caffe2.contrib.nnpack.nnpack_ops_test::benchmark(), concat_benchmark::benchmark_concat(), utils::benchmark_module(), framework_overhead_benchmark::benchmark_simple_fn(), sparse_lengths_sum_nbit_benchmark::benchmark_sparse_lengths_sum(), sparse_normalize_benchmark::benchmark_sparse_normalize(), utils::benchmark_using_throughput_benchmark(), torch.nn.modules.module.Module::buffers(), caffe2.python.onnx.helper::c2_native_run_net(), update-models-from-caffe2::caffe2_to_onnx(), caffe2.python.device_checker.DeviceChecker::CheckNet(), caffe2.python.gradient_checker.GradientChecker::CheckSimple(), caffe2.python.device_checker.DeviceChecker::CheckSimple(), update-caffe2-models::cleanup(), torch.package.exporter.PackageExporter::close(), torch.futures::collect_all(), caffe2.python.rnn.lstm_comparison::Compare(), torch.quantization._numeric_suite::compare_model_outputs(), torch.quantization._numeric_suite_fx::compare_model_outputs_fx(), torch.quantization._numeric_suite::compare_model_stub(), torch.quantization._numeric_suite_fx::compare_model_stub_fx(), caffe2.python.lengths_reducer_fused_8bit_rowwise_ops_test::compare_rowwise(), torch.quantization._numeric_suite::compare_weights(), torch.quantization._numeric_suite_fx::compare_weights_fx(), torch.utils.hipify.hipify_python::compute_stats(), caffe2.python.lstm_benchmark::create_model(), torch._jit_internal::createResolutionCallbackFromFrame(), torch.nn.utils.prune::custom_from_mask(), caffe2.python.helpers.array_helpers::depth_concat(), caffe2.python.cnn.CNNModelHelper::DepthConcat(), caffe2.experiments.python.device_reduce_sum_bench.Benchmark::display(), tools.download_mnist::download(), update-models-from-caffe2::download_caffe2_model(), tools.clang_format_utils::download_clang_format(), update-caffe2-models::download_models(), update-models-from-caffe2::download_onnx_model(), caffe2.python.models.download::downloadFromURLToFile(), caffe2.python.models.download::downloadModel(), benchmark.Benchmark::dump_result(), package.tool.clang_coverage::export(), fast_nvcc::fast_nvcc_warn(), caffe2.python.helpers.fc::fc_sparse(), tools.clang_format_all::file_clang_formatted_correctly(), tools.clang_tidy::filter_files(), caffe2.python.mkl.rewrite_graph::fix_BoxWithNMSLimit(), torch.jit._freeze::freeze(), caffe2.python.fused_8bit_rowwise_conversion_ops_test::fused_rowwise_8bit_quantize_reference(), gen_vulkan_spv::genCppH(), gen_vulkan_glsl::genCppH(), tools.setup_helpers.cmake.CMake::generate(), caffe2.python.lstm_benchmark::generate_data(), update-caffe2-models::generate_models(), caffe2.python.docs.generator.OperatorDoc::generateInterface(), tools.clang_format_utils::get_and_check_clang_format(), caffe2.python.binarysize::GetSymbolTrie(), torch.nn.utils.prune::global_unstructured(), torch.utils.tensorboard._pytorch_graph::graph(), categorize.Categorizer::handle_commit(), torch.hub::help(), torch.utils.hipify.hipify_python::hipify(), torch.nn.utils.prune::identity(), caffe2.python.dyndep::InitOpsLibrary(), process::insert(), torch.nn.utils.prune::is_pruned(), torch::jit::isinstance(), package.tool.print_report::line_oriented_report(), torch.jit._serialization::load(), matmul_dlmc_bench::load_dataset(), caffe2.python.parallel_workers.Metrics::log_metrics(), tools.nightly::logging_manager(), benchmark::main(), diff::main(), launcher::main(), framework_overhead_benchmark::main(), compare::main(), functional_autograd_benchmark::main(), bench::main(), __main__::main(), caffe2.python.net_drawer::main(), caffe2.python.numa_benchmark::main(), tools.clang_tidy::main(), tools.download_mnist::main(), torch.distributed.launch::main(), torch.utils.bottleneck.__main__::main(), torch.utils.collect_env::main(), bench_gen::main(), caffe2.python.benchmark_generator::main(), caffe2.python.mint.app::main(), fused_rowwise_nbit_conversion_bench::main(), torch.utils.tensorboard.summary::make_video(), package.tool.clang_coverage::merge(), torch.nn.modules.module.Module::modules(), freeze.Freezer::msg(), torch.nn.modules.module.Module::named_buffers(), torch.nn.modules.module.Module::named_children(), torch.nn.modules.module.Module::named_modules(), torch.nn.modules.module.Module::named_parameters(), caffe2.experiments.python.convnet_benchmarks::net_DAG_Builder(), caffe2.experiments.python.SparseTransformer::netbuilder(), fast_nvcc::nvcc_dryrun_data(), torch.quantization._learnable_fake_quantize._LearnableFakeQuantize::observe_quant_params(), operator<<(), c10::operator<<(), caffe2.python.ideep.transform_ideep_net::Optimize(), torch.nn.modules.module.Module::parameters(), torch.utils.tensorboard._onnx_graph::parse(), torch.jit._state.EnabledProxy::parse_env(), package.tool.summarize_jsons::parse_json(), common::parse_pr_number(), torch.utils.hipify.hipify_python::preprocess(), torch.utils.hipify.hipify_python::preprocess_file_and_save_result(), torch.utils.hipify.hipify_python::preprocessor(), print(), torch.utils.bottleneck.__main__::print_autograd_prof_summary(), launcher::print_benchmark_results(), setup::print_box(), torch.utils.bottleneck.__main__::print_cprofile_summary(), fast_nvcc::print_dot_graph(), package.util.utils::print_error(), package.tool.print_report::print_file_oriented_report(), package.tool.print_report::print_file_summary(), fastrnns.bench::print_json_oss_format(), fastrnns.bench::print_json_pep_format(), package.util.utils::print_log(), torch.optim.lr_scheduler._LRScheduler::print_lr(), framework_overhead_benchmark::print_results(), fastrnns.bench::print_stderr(), torch.fx.graph.Graph::print_tabular(), package.tool.print_report::print_test_by_type(), package.tool.print_report::print_test_condition(), package.util.utils::print_time(), fast_nvcc::print_verbose_output(), torch.utils.tensorboard._pytorch_graph.GraphPy::printall(), caffe2.python.binarysize::PrintTrie(), torch.nn.utils.prune::random_structured(), caffe2.python.lazy_dyndep::RegisterOpsLibrary(), caffe2.python.nomnigraph::render(), setup::report(), torch.package.exporter.PackageExporter::require_module(), namespace_check::run(), caffe2.python.utils.DebugMode::run(), operator_benchmark.benchmark_core.BenchmarkRunner::run(), caffe2.python.timeout_guard.WatcherThread::run(), tools.setup_helpers.cmake.CMake::run(), torch.utils.bottleneck.__main__::run_autograd_prof(), record_function_bench::run_bench(), microbenchmarks::run_benchmarks(), tools.clang_format_all::run_clang_format(), tools.clang_format_all::run_clang_format_on_file(), coordinator.CoordinatorBase::run_coordinator(), torch.utils.bottleneck.__main__::run_cprofile(), torch.utils.bottleneck.__main__::run_env_analysis(), caffe2.python.models.seq2seq.translate::run_seq2seq_beam_decoder(), tools.clang_tidy::run_shell_command(), caffe2.python.muji_test.TestMuji::RunningAllreduceWithGPUs(), torch.package.exporter.PackageExporter::save_pickle(), torch.package.exporter.PackageExporter::save_source_string(), torch.jit._script::script(), generate_test_torchscripts::scriptAndSave(), torch.distributed.rpc.options.TensorPipeRpcBackendOptions::set_device_map(), operator_benchmark.benchmark_utils::set_mkl_threads(), operator_benchmark.benchmark_utils::set_omp_threads(), torch.futures.Future::set_result(), caffe2.python.models.download::signalHandler(), caffe2.python.workspace::StartImmediate(), caffe2.python.workspace::StartMint(), caffe2.contrib.aten.gen_op::supports(), benchmark::sweep(), fastrnns.profile::system(), caffe2.python.ideep.concat_split_op_test.TestConcatSplitOps::test_concat_with_TensorCPU(), caffe2.python.nomnigraph_test.TestBindings::test_convertToProto(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_affch_folding(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_bn_folding(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_grouped_sum_relu_fusion(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_relu_fusion(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_sum_fusion(), caffe2.python.ideep.convfusion_op_test.ConvFusionTest::test_convolution_sum_relu_fusion(), caffe2.python.hypothesis_test.TestOperators::test_dag_net_forking(), caffe2.python.ideep.conv_op_test.ConvTest::test_depthwise_convolution(), caffe2.python.ideep.elementwise_sum_op_test.ElementwiseSumTest::test_elementwise_sum_fallback(), caffe2.python.ideep.expanddims_squeeze_op_test.ExpandDimsSqueezeTest::test_expand_dims_fallback(), caffe2.python.ideep.fc_op_test.FcTest::test_fc_with_axis(), caffe2.python.ideep.fc_op_test.FcTest::test_fc_with_axis_w(), caffe2.python.models.imagenet_trainer_test_utils::test_forward_only_fast_simplenet(), caffe2.python.memonger_test.MemongerTest::test_forward_optim_tree_harder(), caffe2.quantization.server.fully_connected_fp16_test.FullyConnectedFP16Test::test_fully_connected(), caffe2.python.ideep.operator_fallback_op_test.TestFallbackOps::test_in_place(), caffe2.python.ideep.elementwise_sum_op_test.ElementwiseSumTest::test_int8_elementwise_sum(), caffe2.python.ideep.fc_op_test.FcTest::test_int8_fc_4_dims(), caffe2.python.ideep.pool_op_test.PoolTest::test_int8_pooling(), caffe2.python.ideep.relu_op_test.ReluTest::test_int8_relu(), caffe2.python.nomnigraph_test.TestBindings::test_match_graph(), caffe2.python.predictor.predictor_exporter_test.PredictorExporterTest::test_meta_net_def_net_runs(), caffe2.python.mkl.rewrite_graph_test.MKLRewriteTest::test_mkl_multi_output_rewrite(), caffe2.python.ideep.order_switch_op_test.OrderSwitchTest::test_nhwc2nchw(), caffe2.python.observer_test.TestObservers::test_observer_rnn_executor(), caffe2.python.optimizer_test.TestOptimizerContext::test_optimizer_context(), caffe2.python.ideep.pre_convert_test.PreConvertTest::test_preConvert(), caffe2.contrib.nnpack.nnpack_ops_test.NNPackOpsTest::test_relu_timings(), caffe2.python.ideep.shape_op_test.ShapeTest::test_shape(), caffe2.python.ideep.shape_op_test.ShapeTest::test_shape_with_axes(), caffe2.python.lengths_reducer_fused_8bit_rowwise_ops_test.TestLengthsReducerOpsFused8BitRowwise::test_sparse_lengths_mean(), caffe2.python.sparse_to_dense_test.TestSparseToDense::test_sparse_to_dense(), caffe2.python.hypothesis_test.TestOperators::test_sparse_to_dense(), caffe2.python.sparse_to_dense_test.TestSparseToDense::test_sparse_to_dense_with_data_to_infer_dim(), caffe2.python.ideep.spatial_bn_op_test.TestSpatialBN::test_spatialbn_train_mode(), caffe2.python.ideep.expanddims_squeeze_op_test.ExpandDimsSqueezeTest::test_squeeze_fallback(), caffe2.contrib.nccl.nccl_ops_test.NCCLOpsTest::test_timings(), caffe2.contrib.nnpack.nnpack_ops_test.NNPackOpsTest::test_timings(), caffe2.python.transformations_test.TestTransformations::test_transformer_FuseConvBNNoConvBiasDuplicatedName(), caffe2.python.core_gradients_test.TestGradientCalculation::test_two_grads(), caffe2.contrib.aten.aten_test.TestATen::test_unique(), caffe2.python.net_printer_test.TestNetPrinter::test_valid_job(), caffe2.python.optimizer_test.TestWeightDecay::test_weight_decay(), caffe2.python.hypothesis_test.TestOperators::test_weighted_sample_blobs_queue(), caffe2.python.core_gradients_test.TestGradientsAccumulationWithPassThroughGradients::testAccumulationRuns(), caffe2.python.core_gradients_test.TestGradientsAccumulationWithPassThroughGradients::testAddAndStaticConstant(), caffe2.python.muji_test.TestMuji::testAllreduceWithEightGPUs(), caffe2.python.muji_test.TestMuji::testAllreduceWithFourGPUs(), caffe2.python.muji_test.TestMuji::testAllreduceWithFourGPUsAndTwoGroups(), caffe2.python.muji_test.TestMuji::testAllreduceWithTwoGPUs(), caffe2.python.mkl.mkl_pool_speed_test.TestMKLBasic::testAveragePoolingSpeed(), caffe2.python.caffe_translator_test.TestNumericalEquivalence::testBlobs(), caffe2.python.mkl.mkl_speed_test.TestMKLBasic::testConvSpeed(), caffe2.python.mkl.mkl_fc_speed_test.TestMKLBasic::testFCSpeed(), caffe2.python.core_gradients_test.TestGradientCalculation::testGradientCalculationWithPrint(), caffe2.python.core_gradients_test.TestGradientCalculation::testGradientMappingUsingSumOp(), caffe2.python.mkl.mkl_LRN_speed_test.TestMKLBasic::testLRNSpeed(), caffe2.python.mkl.mkl_pool_speed_test.TestMKLBasic::testMaxPoolingSpeed(), caffe2.python.core_gradients_test.TestGradientCalculation::testMultiUseInputAndMultipleVersionsBig(), caffe2.python.observer_test.TestObservers::testObserver(), caffe2.python.mkl.mkl_speed_test.TestMKLBasic::testReLUSpeed(), caffe2.python.mkl.mkl_sbn_speed_test.TestMKLBasic::testSpatialBNTestingSpeed(), caffe2.python.mkl.mkl_sbn_speed_test.TestMKLBasic::testSpatialBNTrainingSpeed(), caffe2.python.core_gradients_test.TestGradientsAccumulationWithPassThroughGradients::testSubOpInMiddle(), caffe2.python.core_gradients_test.TestGradientCalculation::testVersionMismatch(), torch.futures.Future::then(), pipe::train(), caffe2.experiments.python.SparseTransformer::transFCRelu(), tools.download_mnist::unzip(), upload_scribe.ScribeUploader::upload(), update-caffe2-models::upload_models(), update-models-from-caffe2::upload_onnx_model(), caffe2.contrib.warpctc.ctc_ops_test.CTCOpsTest::verify_cost(), and caffe2.python.memonger::verify_graph_equality().

◆ printScale()

static void at::printScale ( std::ostream &  stream,
double  scale 
)
static

Definition at line 135 of file Formatting.cpp.

References defaultfloat(), scale, and stream.

Referenced by __printMatrix(), and print().

◆ prod_intlist() [1/2]

◆ prod_intlist() [2/2]

template<typename Iter , typename std::enable_if< std::is_integral< typename std::iterator_traits< Iter >::value_type >::value, int >::type = 0>
int64_t at::prod_intlist ( Iter  begin,
Iter  end 
)
inline

Definition at line 105 of file Utils.h.

References torch::autograd::accumulate(), matmul_dlmc_bench::end, and caffe2::int64_t.

◆ REGISTER_CONTEXT() [1/2]

at::REGISTER_CONTEXT ( DeviceType::CPU  ,
caffe2::CPUContext   
)

◆ REGISTER_CONTEXT() [2/2]

at::REGISTER_CONTEXT ( DeviceType::IDEEP  ,
caffe2::IDEEPContext   
)

◆ REGISTER_COPY_BYTES_FUNCTION() [1/4]

at::REGISTER_COPY_BYTES_FUNCTION ( DeviceType::CPU  ,
DeviceType::CPU  ,
caffe2::CopyBytesWrapper   
)

◆ REGISTER_COPY_BYTES_FUNCTION() [2/4]

at::REGISTER_COPY_BYTES_FUNCTION ( DeviceType::CPU  ,
DeviceType::IDEEP  ,
CopyBytesWrapper   
)

◆ REGISTER_COPY_BYTES_FUNCTION() [3/4]

at::REGISTER_COPY_BYTES_FUNCTION ( DeviceType::IDEEP  ,
DeviceType::CPU  ,
CopyBytesWrapper   
)

◆ REGISTER_COPY_BYTES_FUNCTION() [4/4]

at::REGISTER_COPY_BYTES_FUNCTION ( DeviceType::IDEEP  ,
DeviceType::IDEEP  ,
CopyBytesWrapper   
)

◆ releaseRecordAllFunctions()

TORCH_API void at::releaseRecordAllFunctions ( )

◆ removeCallback()

TORCH_API void at::removeCallback ( CallbackHandle  handle)

removeCallback removes a callback given the handle returned by addThreadLocalCallback or addGlobalCallback;

WARNING: removing a global callback is not thread safe, no other code can run simultaneously

Definition at line 377 of file record_function.cpp.

References handle.

Referenced by torch.autograd.profiler::disableProfilerLegacy().

◆ report_positional_error()

static void at::report_positional_error ( const Dimname name,
const Dimname other_name,
DimnameList  names,
DimnameList  other_names,
const char *  action 
)
static

Definition at line 39 of file NamedTensorUtils.cpp.

References fastrnns.bench::action, name, microbenchmarks::names, and TORCH_CHECK.

Referenced by unify_from_right().

◆ reportNYIDimnameOverload()

◆ reshape_batching_rule()

Tensor at::reshape_batching_rule ( const Tensor self,
IntArrayRef  shape 
)

◆ round_columns()

static std::tuple<int64_t, int64_t> at::round_columns ( TensorIteratorBase iter,
int  dim,
int  multiple,
int64_t  begin,
int64_t  end 
)
static

◆ safeStack()

static Tensor at::safeStack ( TensorList  tensors)
static

◆ select_backward_batching_rule()

Tensor at::select_backward_batching_rule ( const Tensor grad,
IntArrayRef  input_sizes,
int64_t  dim,
int64_t  index 
)

◆ select_batching_rule()

Tensor at::select_batching_rule ( const Tensor self,
int64_t  dim,
int64_t  index 
)

◆ set_num_interop_threads()

TORCH_API void at::set_num_interop_threads ( int  )

◆ set_num_threads()

TORCH_API void at::set_num_threads ( int  )

Referenced by main(), and THPModule_setNumThreads().

◆ set_quantizer_()

TORCH_API void at::set_quantizer_ ( const Tensor self,
ConstQuantizerPtr  quantizer 
)

Definition at line 210 of file Quantizer.cpp.

References get_qtensorimpl(), and at::QTensorImpl::set_quantizer_().

Referenced by at::native::copy_impl().

◆ set_record_function_tls_()

TORCH_API void at::set_record_function_tls_ ( const RecordFunctionTLS tls)

Definition at line 62 of file record_function.cpp.

Referenced by at::ThreadLocalState::setThreadLocalState().

◆ should_include_kernel_dtype()

constexpr bool at::should_include_kernel_dtype ( const char *  kernel_tag_str,
at::ScalarType  scalar_type 
)
inlineconstexpr

The method should_include_kernel_dtype() returns true/false based on whether the switching code for a specific dtype should be included based on build time constants generated from tracing model execution.

This method will be implmeneted via code-generation and included in this file when code-gen is ready.

Definition at line 24 of file Dispatch.h.

◆ shouldRunRecordFunction()

◆ show_config()

TORCH_API std::string at::show_config ( )

Returns a detailed string describing the configuration PyTorch.

Definition at line 124 of file Version.cpp.

References get_mkl_version(), get_mkldnn_version(), get_openmp_version(), caffe2::GetBuildOptions(), at::detail::getCUDAHooks(), hasCUDA(), at::CUDAHooksInterface::showConfig(), and used_cpu_capability().

Referenced by THPModule_showConfig().

◆ size()

int64_t at::size ( const Tensor tensor,
int64_t  dim 
)
inline

Definiti