Home
last modified time | relevance | path

Searched refs:BackendComponent (Results 1 – 12 of 12) sorted by relevance

/external/pytorch/c10/core/
DDispatchKey.cpp8 const char* toString(BackendComponent t) { in toString()
10 case BackendComponent::CPUBit: in toString()
12 case BackendComponent::CUDABit: in toString()
14 case BackendComponent::HIPBit: in toString()
16 case BackendComponent::XLABit: in toString()
18 case BackendComponent::LazyBit: in toString()
20 case BackendComponent::MetaBit: in toString()
22 case BackendComponent::XPUBit: in toString()
24 case BackendComponent::IPUBit: in toString()
26 case BackendComponent::MPSBit: in toString()
[all …]
DDispatchKeySet.h196 constexpr explicit DispatchKeySet(BackendComponent k) { in DispatchKeySet()
197 if (k == BackendComponent::InvalidBit) { in DispatchKeySet()
237 uint64_t backend_val = backend_k == BackendComponent::InvalidBit in DispatchKeySet()
259 std::initializer_list<BackendComponent> ks) { in backend_bits_to_repr()
270 explicit constexpr DispatchKeySet(std::initializer_list<BackendComponent> ks) in DispatchKeySet()
282 constexpr bool has_backend(BackendComponent t) const { in has_backend()
390 constexpr DispatchKeySet remove_backend(BackendComponent b) const { in remove_backend()
417 BackendComponent highestBackendKey() const { in highestBackendKey()
423 return BackendComponent::InvalidBit; in highestBackendKey()
424 return static_cast<BackendComponent>(backend_idx); in highestBackendKey()
[all …]
DDispatchKey.h64 enum class BackendComponent : uint8_t { enum
524 (static_cast<uint8_t>(BackendComponent::EndOfBackendKeys) +
566 static_cast<uint8_t>(BackendComponent::EndOfBackendKeys);
572 static_cast<uint8_t>(BackendComponent::EndOfBackendKeys) <= 16,
598 C10_API const char* toString(BackendComponent);
600 C10_API std::ostream& operator<<(std::ostream&, BackendComponent);
602 C10_API DispatchKey getAutogradKeyFromBackend(BackendComponent k);
619 constexpr BackendComponent toBackendComponent(DispatchKey k) { in toBackendComponent()
622 return static_cast<BackendComponent>( in toBackendComponent()
628 return static_cast<BackendComponent>( in toBackendComponent()
[all …]
DDispatchKeySet.cpp31 .remove_backend(BackendComponent::XLABit)
32 .remove_backend(BackendComponent::LazyBit);
DTensorImpl.h2032 {BackendComponent::CPUBit, in has_compatible_shallow_copy_type()
2033 BackendComponent::CUDABit, in has_compatible_shallow_copy_type()
2034 BackendComponent::MPSBit, in has_compatible_shallow_copy_type()
2035 BackendComponent::HIPBit, in has_compatible_shallow_copy_type()
2036 BackendComponent::XPUBit, in has_compatible_shallow_copy_type()
2037 BackendComponent::HPUBit}); in has_compatible_shallow_copy_type()
2043 {BackendComponent::CPUBit, in has_compatible_shallow_copy_type()
2044 BackendComponent::CUDABit, in has_compatible_shallow_copy_type()
2045 BackendComponent::HIPBit, in has_compatible_shallow_copy_type()
2046 BackendComponent::XPUBit}); in has_compatible_shallow_copy_type()
DTensorImpl.cpp188 BackendComponent new_backend = toBackendComponent(device.type()); in _change_backend_component_keys()
189 BackendComponent old_backend = key_set_.highestBackendKey(); in _change_backend_component_keys()
/external/pytorch/c10/test/core/
DDispatchKeySet_test.cpp21 ASSERT_TRUE(dense_cpu_set.has_backend(BackendComponent::CPUBit)); in TEST()
26 ASSERT_TRUE(dense_lazy_set.has_backend(BackendComponent::LazyBit)); in TEST()
32 DispatchKeySet(BackendComponent::CPUBit); in TEST()
34 ASSERT_TRUE(dense_cpu_set.has_backend(BackendComponent::CPUBit)); in TEST()
42 ASSERT_TRUE(autograd_cuda.has_backend(BackendComponent::CUDABit)); in TEST()
55 ASSERT_TRUE(autograd_dense_cpu_cuda.has_backend(BackendComponent::CUDABit)); in TEST()
56 ASSERT_TRUE(autograd_dense_cpu_cuda.has_backend(BackendComponent::CPUBit)); in TEST()
107 auto mixed_keyset = DispatchKeySet(BackendComponent::CPUBit) | in TEST()
359 DispatchKeySet({BackendComponent::CPUBit, BackendComponent::CUDABit}) | in TEST()
400 i <= static_cast<int64_t>(BackendComponent::EndOfBackendKeys); in TEST()
[all …]
/external/pytorch/aten/src/ATen/
DTensorSubclassLikeUtils.h48 DispatchKeySet(BackendComponent::MetaBit);
/external/pytorch/aten/src/ATen/native/
DOnehot.cpp21 if (self.key_set().has_all(DispatchKeySet(BackendComponent::MetaBit)) || in one_hot()
DCPUFallback.cpp92 TORCH_CHECK(c10::BackendComponent::CPUBit == c10::toBackendComponent(cpu_dispatch_key), in cpu_fallback()
/external/pytorch/torch/csrc/dynamo/
Dguards.h31 override_dispatch_key_set(c10::BackendComponent::InvalidBit), in LocalState()
/external/pytorch/torch/csrc/
DModule.cpp2248 local_keyset.included_.remove_backend(c10::BackendComponent::MetaBit); in initModule()
2255 return local_keyset.included_.has_backend(c10::BackendComponent::MetaBit); in initModule()