PyTorch
|
Namespaces | |
namespace | cuda |
namespace | detail |
namespace | detail_ |
namespace | ivalue |
namespace | WarningUtils |
Typedefs | |
using | ClassTypePtr = std::shared_ptr< ClassType > |
typedef std::function< bool(const IValue &a, const IValue &b)> | IValueComparator |
using | DeviceIndex = int8_t |
An index representing a specific device; e.g., the 1 in GPU 1. More... | |
using | OptionalIntArrayRef = OptionalArrayRef< int64_t > |
using | UserWarning = Warning::UserWarning |
using | DeprecationWarning = Warning::DeprecationWarning |
template<class T > | |
using | OptionalBase = std::conditional_t< detail_::is_arrayref< T >::value, arrayref_optional_base< T >, std::conditional_t< std::is_trivially_destructible< T >::value &&std::is_trivially_copyable< T >::value &&std::is_copy_constructible< trivially_copyable_optimization_optional_base< T > >::value &&std::is_copy_assignable< trivially_copyable_optimization_optional_base< T > >::value, trivially_copyable_optimization_optional_base< T >, std::conditional_t< std::is_trivially_destructible< T >::value, constexpr_optional_base< std::remove_const_t< T > >, optional_base< std::remove_const_t< T > > > > > |
Enumerations | |
enum class | DeviceType : int8_t { CPU = 0 , CUDA = 1 , MKLDNN = 2 , OPENGL = 3 , OPENCL = 4 , IDEEP = 5 , HIP = 6 , FPGA = 7 , ORT = 8 , XLA = 9 , Vulkan = 10 , Metal = 11 , XPU = 12 , MPS = 13 , Meta = 14 , HPU = 15 , VE = 16 , Lazy = 17 , IPU = 18 , MTIA = 19 , PrivateUse1 = 20 , COMPILE_TIME_MAX_DEVICE_TYPES = 21 } |
Functions | |
bool | _fastEqualsForContainer (const IValue &lhs, const IValue &rhs) |
torch::jit::Function * | checkObjectSortSchema (const c10::ClassTypePtr &t, std::stringstream &why_not) |
IValueComparator | getLessThanComparator (const IValue &v) |
IValueComparator | getGreaterThanComparator (const IValue &v) |
std::ostream & | operator<< (std::ostream &stream, const Device &device) |
std::string | DeviceTypeName (DeviceType d, bool lower_case=false) |
bool | isValidDeviceType (DeviceType d) |
std::ostream & | operator<< (std::ostream &stream, DeviceType type) |
void | register_privateuse1_backend (std::string backend_name) |
std::string | get_privateuse1_backend (bool lower_case=true) |
template<typename To , typename From > | |
std::enable_if< std::is_same< From, bool >::value, bool >::type | overflows (From) |
template<typename To , typename From > | |
std::enable_if< std::is_integral< From >::value &&!std::is_same< From, bool >::value, bool >::type | overflows (From f) |
template<typename To , typename From > | |
std::enable_if< std::is_floating_point< From >::value, bool >::type | overflows (From f) |
template<typename To , typename From > | |
std::enable_if< is_complex< From >::value, bool >::type | overflows (From f) |
std::ostream & | operator<< (std::ostream &out, const Half &value) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, ArrayRef< T > list) |
bool | operator== (const OptionalIntArrayRef &a1, const IntArrayRef &other) |
bool | operator== (const c10::IntArrayRef &a1, const c10::OptionalIntArrayRef &a2) |
void | warn (const Warning &warning) |
std::string | GetExceptionString (const std::exception &e) |
template<class T > | |
constexpr T && | constexpr_forward (typename std::remove_reference< T >::type &t) noexcept |
template<class T > | |
constexpr T && | constexpr_forward (typename std::remove_reference< T >::type &&t) noexcept |
template<class T > | |
constexpr std::remove_reference< T >::type && | constexpr_move (T &&t) noexcept |
template<class T , class F > | |
constexpr T | value_or_else (const optional< T > &v, F &&func) |
template<class T , class F > | |
constexpr T | value_or_else (optional< T > &&v, F &&func) |
template<class T > | |
constexpr bool | operator== (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator!= (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator< (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator> (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator<= (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator>= (const optional< T > &x, const optional< T > &y) |
template<class T > | |
constexpr bool | operator== (const optional< T > &x, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator== (nullopt_t, const optional< T > &x) noexcept |
template<class T > | |
constexpr bool | operator!= (const optional< T > &x, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator!= (nullopt_t, const optional< T > &x) noexcept |
template<class T > | |
constexpr bool | operator< (const optional< T > &, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator< (nullopt_t, const optional< T > &x) noexcept |
template<class T > | |
constexpr bool | operator<= (const optional< T > &x, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator<= (nullopt_t, const optional< T > &) noexcept |
template<class T > | |
constexpr bool | operator> (const optional< T > &x, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator> (nullopt_t, const optional< T > &) noexcept |
template<class T > | |
constexpr bool | operator>= (const optional< T > &, nullopt_t) noexcept |
template<class T > | |
constexpr bool | operator>= (nullopt_t, const optional< T > &x) noexcept |
template<class T , class U > | |
constexpr bool | operator== (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator== (const U &v, const optional< T > &x) |
template<class T , class U > | |
constexpr bool | operator!= (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator!= (const U &v, const optional< T > &x) |
template<class T , class U > | |
constexpr bool | operator< (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator> (const U &v, const optional< T > &x) |
template<class T , class U > | |
constexpr bool | operator> (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator< (const U &v, const optional< T > &x) |
template<class T , class U > | |
constexpr bool | operator>= (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator<= (const U &v, const optional< T > &x) |
template<class T , class U > | |
constexpr bool | operator<= (const optional< T > &x, const U &v) |
template<class T , class U > | |
constexpr bool | operator>= (const U &v, const optional< T > &x) |
template<class T > | |
constexpr bool | operator== (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator== (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator!= (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator!= (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator< (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator> (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator> (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator< (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator>= (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator<= (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator<= (const optional< T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator>= (const T &v, const optional< T & > &x) |
template<class T > | |
constexpr bool | operator== (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator== (const T &v, const optional< const T & > &x) |
template<class T > | |
constexpr bool | operator!= (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator!= (const T &v, const optional< const T & > &x) |
template<class T > | |
constexpr bool | operator< (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator> (const T &v, const optional< const T & > &x) |
template<class T > | |
constexpr bool | operator> (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator< (const T &v, const optional< const T & > &x) |
template<class T > | |
constexpr bool | operator>= (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator<= (const T &v, const optional< const T & > &x) |
template<class T > | |
constexpr bool | operator<= (const optional< const T & > &x, const T &v) |
template<class T > | |
constexpr bool | operator>= (const T &v, const optional< const T & > &x) |
template<class T > | |
void | swap (optional< T > &x, optional< T > &y) noexcept(noexcept(x.swap(y))) |
template<class T > | |
constexpr optional< typename std::decay< T >::type > | make_optional (T &&v) |
template<class X > | |
constexpr optional< X & > | make_optional (std::reference_wrapper< X > v) |
Variables | |
constexpr DeviceType | kCPU = DeviceType::CPU |
constexpr DeviceType | kCUDA = DeviceType::CUDA |
constexpr DeviceType | kHIP = DeviceType::HIP |
constexpr DeviceType | kFPGA = DeviceType::FPGA |
constexpr DeviceType | kORT = DeviceType::ORT |
constexpr DeviceType | kXLA = DeviceType::XLA |
constexpr DeviceType | kMPS = DeviceType::MPS |
constexpr DeviceType | kMeta = DeviceType::Meta |
constexpr DeviceType | kVulkan = DeviceType::Vulkan |
constexpr DeviceType | kMetal = DeviceType::Metal |
constexpr DeviceType | kXPU = DeviceType::XPU |
constexpr DeviceType | kHPU = DeviceType::HPU |
constexpr DeviceType | kVE = DeviceType::VE |
constexpr DeviceType | kLazy = DeviceType::Lazy |
constexpr DeviceType | kIPU = DeviceType::IPU |
constexpr DeviceType | kMTIA = DeviceType::MTIA |
constexpr DeviceType | kPrivateUse1 = DeviceType::PrivateUse1 |
constexpr int | COMPILE_TIME_MAX_DEVICE_TYPES |
constexpr struct c10::trivial_init_t | trivial_init |
constexpr nullopt_t | nullopt {0} |
ArrayRef Convenience constructors | |
using | IntArrayRef = ArrayRef< int64_t > |
IntList | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const T &OneElt) |
Construct an ArrayRef from a single element. More... | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const T *data, size_t length) |
Construct an ArrayRef from a pointer and length. More... | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const T *begin, const T *end) |
Construct an ArrayRef from a range. More... | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const SmallVectorImpl< T > &Vec) |
Construct an ArrayRef from a SmallVector. More... | |
template<typename T , unsigned N> | |
ArrayRef< T > | makeArrayRef (const SmallVector< T, N > &Vec) |
Construct an ArrayRef from a SmallVector. More... | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const std::vector< T > &Vec) |
Construct an ArrayRef from a std::vector. More... | |
template<typename T , std::size_t N> | |
ArrayRef< T > | makeArrayRef (const std::array< T, N > &Arr) |
Construct an ArrayRef from a std::array. More... | |
template<typename T > | |
ArrayRef< T > | makeArrayRef (const ArrayRef< T > &Vec) |
Construct an ArrayRef from an ArrayRef (no-op) (const) More... | |
template<typename T > | |
ArrayRef< T > & | makeArrayRef (ArrayRef< T > &Vec) |
Construct an ArrayRef from an ArrayRef (no-op) More... | |
template<typename T , size_t N> | |
ArrayRef< T > | makeArrayRef (const T(&Arr)[N]) |
Construct an ArrayRef from a C array. More... | |
template<typename T > | |
bool | operator== (c10::ArrayRef< T > a1, c10::ArrayRef< T > a2) |
template<typename T > | |
bool | operator!= (c10::ArrayRef< T > a1, c10::ArrayRef< T > a2) |
template<typename T > | |
bool | operator== (const std::vector< T > &a1, c10::ArrayRef< T > a2) |
template<typename T > | |
bool | operator!= (const std::vector< T > &a1, c10::ArrayRef< T > a2) |
template<typename T > | |
bool | operator== (c10::ArrayRef< T > a1, const std::vector< T > &a2) |
template<typename T > | |
bool | operator!= (c10::ArrayRef< T > a1, const std::vector< T > &a2) |
using c10::ClassTypePtr = typedef std::shared_ptr<ClassType> |
using c10::DeprecationWarning = typedef Warning::DeprecationWarning |
using c10::DeviceIndex = typedef int8_t |
An index representing a specific device; e.g., the 1 in GPU 1.
A DeviceIndex is not independently meaningful without knowing the DeviceType it is associated; try to use Device rather than DeviceIndex directly.
using c10::IntArrayRef = typedef ArrayRef<int64_t> |
typedef std::function<bool(const IValue& a, const IValue& b)> c10::IValueComparator |
using c10::OptionalBase = typedef std::conditional_t< detail_::is_arrayref<T>::value, arrayref_optional_base<T>, std::conditional_t< std::is_trivially_destructible<T>::value && std::is_trivially_copyable< T >::value && std::is_copy_constructible< trivially_copyable_optimization_optional_base<T> >::value && std::is_copy_assignable< trivially_copyable_optimization_optional_base<T> >::value, trivially_copyable_optimization_optional_base<T>, std::conditional_t< std::is_trivially_destructible<T>::value, constexpr_optional_base<std::remove_const_t<T> >, optional_base<std::remove_const_t<T> >> >> |
using c10::OptionalIntArrayRef = typedef OptionalArrayRef<int64_t> |
using c10::UserWarning = typedef Warning::UserWarning |
|
strong |
We primarily have this for consistency, because Python does the same thing. This actually provokes user-visible changes in behavior due to quirks in torch: [tensor1] == [tensor1] -> True (because container equality will first compare identity) [tensor1] == [tensor1_copy] -> RuntimeError: Boolean value of Tensor with more than one value is ambiguous
torch::jit::Function * c10::checkObjectSortSchema | ( | const c10::ClassTypePtr & | t, |
std::stringstream & | why_not | ||
) |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
std::string c10::DeviceTypeName | ( | DeviceType | d, |
bool | lower_case = false |
||
) |
std::string c10::get_privateuse1_backend | ( | bool | lower_case = true | ) |
std::string c10::GetExceptionString | ( | const std::exception & | e | ) |
IValueComparator c10::getGreaterThanComparator | ( | const IValue & | v | ) |
IValueComparator c10::getLessThanComparator | ( | const IValue & | v | ) |
bool c10::isValidDeviceType | ( | DeviceType | d | ) |
|
constexpr |
|
constexpr |
ArrayRef< T > c10::makeArrayRef | ( | const SmallVector< T, N > & | Vec | ) |
Construct an ArrayRef from a SmallVector.
ArrayRef< T > c10::makeArrayRef | ( | const SmallVectorImpl< T > & | Vec | ) |
Construct an ArrayRef from a SmallVector.
ArrayRef< T > c10::makeArrayRef | ( | const std::array< T, N > & | Arr | ) |
Construct an ArrayRef from a std::array.
ArrayRef< T > c10::makeArrayRef | ( | const std::vector< T > & | Vec | ) |
Construct an ArrayRef from a std::vector.
ArrayRef< T > c10::makeArrayRef | ( | const T & | OneElt | ) |
Construct an ArrayRef from a single element.
ArrayRef< T > c10::makeArrayRef | ( | const T * | begin, |
const T * | end | ||
) |
Construct an ArrayRef from a range.
ArrayRef< T > c10::makeArrayRef | ( | const T * | data, |
size_t | length | ||
) |
Construct an ArrayRef from a pointer and length.
ArrayRef< T > c10::makeArrayRef | ( | const T(&) | Arr[N] | ) |
Construct an ArrayRef from a C array.
bool c10::operator!= | ( | c10::ArrayRef< T > | a1, |
c10::ArrayRef< T > | a2 | ||
) |
bool c10::operator!= | ( | c10::ArrayRef< T > | a1, |
const std::vector< T > & | a2 | ||
) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
bool c10::operator!= | ( | const std::vector< T > & | a1, |
c10::ArrayRef< T > | a2 | ||
) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
std::ostream & c10::operator<< | ( | std::ostream & | out, |
ArrayRef< T > | list | ||
) |
std::ostream & c10::operator<< | ( | std::ostream & | out, |
const Half & | value | ||
) |
std::ostream & c10::operator<< | ( | std::ostream & | stream, |
const Device & | device | ||
) |
std::ostream & c10::operator<< | ( | std::ostream & | stream, |
DeviceType | type | ||
) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
bool c10::operator== | ( | c10::ArrayRef< T > | a1, |
c10::ArrayRef< T > | a2 | ||
) |
bool c10::operator== | ( | c10::ArrayRef< T > | a1, |
const std::vector< T > & | a2 | ||
) |
|
inline |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
inline |
bool c10::operator== | ( | const std::vector< T > & | a1, |
c10::ArrayRef< T > | a2 | ||
) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |
std::enable_if< std::is_integral< From >::value &&!std::is_same< From, bool >::value, bool >::type c10::overflows | ( | From | f | ) |
std::enable_if< std::is_floating_point< From >::value, bool >::type c10::overflows | ( | From | f | ) |
std::enable_if< is_complex< From >::value, bool >::type c10::overflows | ( | From | f | ) |
std::enable_if< std::is_same< From, bool >::value, bool >::type c10::overflows | ( | From | ) |
void c10::register_privateuse1_backend | ( | std::string | backend_name | ) |
|
constexpr |
|
constexpr |
void c10::warn | ( | const Warning & | warning | ) |
|
constexpr |
c10::IntList |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
constexpr struct c10::trivial_init_t c10::trivial_init |