/aosp_15_r20/external/pytorch/torch/csrc/autograd/ |
H A D | custom_function.cpp | 61 .base_.unsafeGetTensorImpl(), in _process_forward_mode_AD() 64 inputs_bases.emplace(inp.unsafeGetTensorImpl(), i); in _process_forward_mode_AD() 85 grad_impls[i] = fw_grad.unsafeGetTensorImpl(); in _process_forward_mode_AD() 117 auto out_tensor_impl = raw_outputs[i].value().unsafeGetTensorImpl(); in _process_forward_mode_AD() 151 out_grad.unsafeGetTensorImpl() == grad_impls[inp_idx], in _process_forward_mode_AD() 164 inputs_mapping.count(out.unsafeGetTensorImpl()) == 0); in _process_forward_mode_AD() 170 if (inputs_bases.count(out_view_info.base_.unsafeGetTensorImpl())) { in _process_forward_mode_AD() 174 inputs_bases[out_view_info.base_.unsafeGetTensorImpl()]; in _process_forward_mode_AD() 200 matching_input_grad_base.unsafeGetTensorImpl() == in _process_forward_mode_AD() 201 out_grad_base.unsafeGetTensorImpl(), in _process_forward_mode_AD() [all …]
|
H A D | variable.cpp | 59 backward_info_.value().base_.unsafeGetTensorImpl() != self_impl); in DifferentiableViewMeta() 97 if (base.unsafeGetTensorImpl()->support_as_strided()) { in chain() 174 auto p = self.unsafeGetTensorImpl(); in materialize_autograd_meta() 202 self.unsafeGetTensorImpl()->pyobj_slot()->pyobj_interpreter(); in update_tensor_hooks_on_new_gradfn() 204 (*interp)->reset_backward_hooks(self.unsafeGetTensorImpl()); in update_tensor_hooks_on_new_gradfn() 304 c10::raw::intrusive_ptr::incref(self.unsafeGetTensorImpl()); in grad_accumulator() 306 c10::intrusive_ptr<at::TensorImpl>::reclaim(self.unsafeGetTensorImpl()); in grad_accumulator() 358 self.unsafeGetTensorImpl()->set_version_counter(version_counter); in set_version_counter() 363 self.unsafeGetTensorImpl()->bump_version(); in bump_version() 369 return self.unsafeGetTensorImpl()->version_counter(); in version_counter() [all …]
|
H A D | python_variable.cpp | 271 var.unsafeGetTensorImpl()->pyobj_slot()->check_pyobj( in THPVariable_Wrap() 277 if (var.unsafeGetTensorImpl()->pyobj_slot()->owns_pyobj()) { in THPVariable_Wrap() 283 var.unsafeGetTensorImpl()->pyobj_slot()->set_owns_pyobj(false); in THPVariable_Wrap() 348 if (tensor.unsafeGetTensorImpl()->pyobj_slot()->check_pyobj( in isResurrectable() 372 !tensor.unsafeGetTensorImpl()->pyobj_slot()->owns_pyobj()); in THPVariable_tryResurrect() 374 c10::TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in THPVariable_tryResurrect() 456 tensor.unsafeGetTensorImpl()->pyobj_slot()->check_pyobj( in THPVariable_clear() 718 data.unsafeGetTensorImpl()->set_allow_tensor_metadata_change(true); in THPVariable_make_subclass() 722 data.unsafeGetTensorImpl()->set_python_custom_sizes_strides( in THPVariable_make_subclass() 726 data.unsafeGetTensorImpl()->set_python_custom_device(true); in THPVariable_make_subclass() [all …]
|
/aosp_15_r20/external/pytorch/aten/src/ATen/ |
H A D | FunctionalTensorWrapper.cpp | 48 version_counter_ = value_.unsafeGetTensorImpl()->version_counter(); in set_constructor_metadata() 230 …if (dtype() != value_.unsafeGetTensorImpl()->dtype() || layout() != value_.unsafeGetTensorImpl()->… in replace_() 285 …auto curr_storage_size = value_.unsafeGetTensorImpl()->unsafe_storage().unsafeGetStorageImpl()->sy… in storage_resize_() 488 return value_.unsafeGetTensorImpl()->device(); in device_custom() 491 return value_.unsafeGetTensorImpl()->sizes(); in sizes_custom() 494 return value_.unsafeGetTensorImpl()->strides(); in strides_custom() 497 return value_.unsafeGetTensorImpl()->dim(); in dim_custom() 500 return value_.unsafeGetTensorImpl()->numel(); in numel_custom() 503 return value_.unsafeGetTensorImpl()->is_contiguous(memory_format); in is_contiguous_custom() 506 return value_.unsafeGetTensorImpl()->sym_sizes(); in sym_sizes_custom() [all …]
|
H A D | MemoryOverlap.cpp | 9 return has_internal_overlap(tensor.unsafeGetTensorImpl()); in has_internal_overlap() 37 assert_no_internal_overlap(t.unsafeGetTensorImpl()); in assert_no_internal_overlap() 48 return get_overlap_status(a.unsafeGetTensorImpl(), b.unsafeGetTensorImpl()); in get_overlap_status() 83 assert_no_partial_overlap(a.unsafeGetTensorImpl(), b.unsafeGetTensorImpl()); in assert_no_partial_overlap() 94 assert_no_overlap(a.unsafeGetTensorImpl(), b.unsafeGetTensorImpl()); in assert_no_overlap()
|
H A D | NamedTensorUtils.h | 174 propagate_names(result.unsafeGetTensorImpl(), names, validate_names); 182 result.unsafeGetTensorImpl(), names, validate_names); 188 propagate_names(result.unsafeGetTensorImpl(), src.unsafeGetTensorImpl()); in propagate_names()
|
H A D | CachedTensorUtils.cpp | 24 return cached_tensorimpls.count(t.unsafeGetTensorImpl()); in is_cached_tensor() 30 cached_tensorimpls.emplace(t.unsafeGetTensorImpl(), weakref_type(t.getIntrusivePtr())); in add_cached_tensor() 36 cached_tensorimpls.erase(t.unsafeGetTensorImpl()); in remove_cached_tensor()
|
H A D | FunctionalStorageImpl.cpp | 78 if (value.unsafeGetTensorImpl()->has_symbolic_sizes_strides()) { in get_nbytes() 105 if (base.unsafeGetTensorImpl()->has_storage() && base.device().type() != c10::DeviceType::XLA) { 106 …original_storage_size_ = base.unsafeGetTensorImpl()->unsafe_storage().unsafeGetStorageImpl()->sym_…
|
H A D | NamedTensorUtils.cpp | 136 propagate_names_if_nonempty(result.unsafeGetTensorImpl(), maybe_name_list, validate_names); in propagate_names_if_present_and_nonempty() 143 propagate_names_if_nonempty(result.unsafeGetTensorImpl(), maybe_names, validate_names); in propagate_names_if_nonempty() 157 propagate_names(result.unsafeGetTensorImpl(), names, validate_names); in propagate_names() 219 propagate_names(result.unsafeGetTensorImpl(), src.unsafeGetTensorImpl()); in propagate_names()
|
/aosp_15_r20/external/pytorch/test/cpp_extensions/ |
H A D | open_registration_extension.cpp | 161 if (t.unsafeGetTensorImpl()->get_backend_meta_intrusive_ptr() == nullptr) { in for_serialization() 164 auto tmeta = dynamic_cast<CustomBackendMetadata*>(t.unsafeGetTensorImpl()->get_backend_meta()); in for_serialization() 184 t.unsafeGetTensorImpl()->set_backend_meta(new_tmeta); in for_deserialization() 195 if (t.unsafeGetTensorImpl()->get_backend_meta_intrusive_ptr()) { in check_backend_meta() 197 t.unsafeGetTensorImpl()->get_backend_meta()); in check_backend_meta() 211 t.unsafeGetTensorImpl()->set_backend_meta(new_tmeta); in custom_set_backend_meta() 340 c10::TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in unsafe_create_cpu_tensor_from_dummy_tensor() 399 result.unsafeGetTensorImpl()->set_storage_offset(0); in custom_set_source_Storage() 401 at::native::resize_impl_cpu_(result.unsafeGetTensorImpl(), in custom_set_source_Storage() 413 result.unsafeGetTensorImpl()->set_storage_offset(storage_offset); in custom_set_source_Storage_storage_offset() [all …]
|
/aosp_15_r20/external/pytorch/aten/src/ATen/functorch/ |
H A D | BatchedTensorImpl.h | 115 return tensor.unsafeGetTensorImpl()->key_set().has(DispatchKey::FuncTorchBatched) || in isBatchedTensor() 116 tensor.unsafeGetTensorImpl()->key_set().has(DispatchKey::BatchedNestedTensor); in isBatchedTensor() 122 return static_cast<BatchedTensorImpl*>(tensor.unsafeGetTensorImpl()); in unsafeGetBatchedImpl() 165 auto key_set = tensor.unsafeGetTensorImpl()->key_set();
|
/aosp_15_r20/external/pytorch/test/cpp/api/ |
H A D | inference_mode.cpp | 537 t.unsafeGetTensorImpl()->version_counter().current_version(), in TEST() 539 t.unsafeGetTensorImpl()->bump_version(); in TEST() 542 t.unsafeGetTensorImpl()->version_counter().current_version(), in TEST() 545 t.unsafeGetTensorImpl()->bump_version(), in TEST() 549 uint32_t v = c.unsafeGetTensorImpl()->version_counter().current_version(); in TEST() 550 c.unsafeGetTensorImpl()->bump_version(); in TEST() 552 c.unsafeGetTensorImpl()->version_counter().current_version(), v + 1); in TEST()
|
/aosp_15_r20/external/executorch/extension/training/optimizer/ |
H A D | sgd.cpp | 107 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 132 state_[p.unsafeGetTensorImpl()] = std::move(state); in step() 159 free(state_tensor.momentum_buffer().unsafeGetTensorImpl()->mutable_data()); in ~SGD() 161 delete state_tensor.momentum_buffer().unsafeGetTensorImpl(); in ~SGD()
|
/aosp_15_r20/external/executorch/runtime/core/exec_aten/util/ |
H A D | tensor_util_aten.cpp | 124 t_dst.unsafeGetTensorImpl()->unsafe_storage().unsafeGetStorageImpl(); in share_tensor_data() 146 void* dst_data_ptr = t_dst.unsafeGetTensorImpl() in copy_tensor_data() 185 t.unsafeGetTensorImpl()->unsafe_storage().set_data_ptr( in set_tensor_data() 191 auto impl = tensor.unsafeGetTensorImpl(); in reset_data_ptr()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/mps/ |
H A D | TensorFactory.cpp | 101 resize_impl_mps_(t.unsafeGetTensorImpl(), size, stride); in empty_strided_mps() 112 auto* self_ = self.unsafeGetTensorImpl(); in resize_mps_() 146 result.unsafeGetTensorImpl()->set_storage_offset(storage_offset); in set_storage_mps_() 149 at::native::resize_impl_mps_(result.unsafeGetTensorImpl(), size, stride_opt); in set_storage_mps_()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/templates/ |
H A D | TensorMethods.cpp | 25 return this->unsafeGetTensorImpl()->data_ptr_impl<T>(); \ 31 return this->unsafeGetTensorImpl()->data_ptr_impl<std::remove_const_t<T>>(); \ 37 return this->unsafeGetTensorImpl()->mutable_data_ptr_impl<T>(); \
|
/aosp_15_r20/external/pytorch/torch/csrc/api/src/optim/ |
H A D | rmsprop.cpp | 88 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 102 state_[p.unsafeGetTensorImpl()] = std::move(state); in step() 106 static_cast<RMSpropParamState&>(*state_[p.unsafeGetTensorImpl()]); in step() 177 state_[params[idx].unsafeGetTensorImpl()] = std::move(state); in load()
|
H A D | adam.cpp | 87 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 102 state_[p.unsafeGetTensorImpl()] = std::move(state); in step() 106 static_cast<AdamParamState&>(*state_[p.unsafeGetTensorImpl()]); in step() 180 state_[params.at(idx).unsafeGetTensorImpl()] = std::move(state); in load()
|
H A D | adamw.cpp | 87 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 107 state_[p.unsafeGetTensorImpl()] = std::move(state); in step() 111 static_cast<AdamWParamState&>(*state_[p.unsafeGetTensorImpl()]); in step() 181 state_[params.at(idx).unsafeGetTensorImpl()] = std::move(state); in load()
|
H A D | sgd.cpp | 86 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 91 state_[p.unsafeGetTensorImpl()] = std::move(state); in step() 130 state_[params[idx].unsafeGetTensorImpl()] = std::move(state); in load()
|
/aosp_15_r20/external/pytorch/torch/csrc/functorch/ |
H A D | init.cpp | 59 unwrapped.unsafeGetTensorImpl() == wrapped_inner.unsafeGetTensorImpl()) in _assert_wrapped_functional() 78 if (unwrapped.unsafeGetTensorImpl() == wrapped_inner.unsafeGetTensorImpl()) { in _propagate_functional_input_mutation() 309 return tensor.unsafeGetTensorImpl()->key_set().has(DispatchKey::Batched); in is_legacy_batchedtensor() 318 return tensor.unsafeGetTensorImpl()->key_set().has( in is_functionaltensor()
|
/aosp_15_r20/external/pytorch/torch/csrc/jit/mobile/train/optim/ |
H A D | sgd.cpp | 62 state_.count(p.unsafeGetTensorImpl()) == 0, in add_param_group() 103 auto param_state = state_.find(p.unsafeGetTensorImpl()); in step() 108 state_[p.unsafeGetTensorImpl()] = std::move(state); in step()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/core/ |
H A D | TensorBase.h | 187 TensorImpl * unsafeGetTensorImpl() const { in unsafeGetTensorImpl() function 253 return impl::get_opt_names(unsafeGetTensorImpl()); in opt_names() 257 return impl::get_names(unsafeGetTensorImpl()); in names() 561 return impl::has_names(unsafeGetTensorImpl()); in has_names() 582 return this->unsafeGetTensorImpl()->data(); in const_data_ptr() 586 return this->unsafeGetTensorImpl()->mutable_data(); in mutable_data_ptr()
|
H A D | NamedTensor.cpp | 20 impl::internal_set_names_inplace(tensor.unsafeGetTensorImpl(), names, /*validate_names=*/true); in internal_set_names_inplace() 25 impl::internal_set_names_inplace(tensor.unsafeGetTensorImpl(), std::move(names), validate_names); in internal_set_names_inplace() 52 return impl::check_names_valid_for(tensor.unsafeGetTensorImpl(), names); in check_names_valid_for()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/ |
H A D | SparseTensorUtils.h | 30 return static_cast<SparseTensorImpl*>(self.unsafeGetTensorImpl()); in get_sparse_impl() 57 return lhs.unsafeGetTensorImpl() == rhs.unsafeGetTensorImpl(); in is_same_tensor()
|