/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core
NameSizeModeActions
boxing/-0755rm
dispatch/-0755rm
op_registration/-0755rm
alias_info.h29860644editdlrm
Array.h7680644editdlrm
ATenGeneral.h450644editdlrm
ATenOpList.h2460644editdlrm
aten_interned_strings.h253890644editdlrm
Backtrace.h590644editdlrm
blob.h54220644editdlrm
builtin_function.h36490644editdlrm
DeprecatedTypeProperties.h37730644editdlrm
DeprecatedTypePropertiesRegistry.h7950644editdlrm
Dict.h131950644editdlrm
Dict_inl.h79960644editdlrm
Dimname.h11880644editdlrm
DimVector.h2470644editdlrm
DistributionsHelper.h125940644editdlrm
Formatting.h9590644editdlrm
function.h21450644editdlrm
functional.h14600644editdlrm
function_schema.h135770644editdlrm
function_schema_inl.h93190644editdlrm
Generator.h49350644editdlrm
grad_mode.h2100644editdlrm
interned_strings.h253320644editdlrm
interned_strings_class.h7700644editdlrm
ivalue.h388230644editdlrm
ivalue_inl.h599630644editdlrm
ivalue_to.h7560644editdlrm
jit_type.h759710644editdlrm
jit_type_base.h65080644editdlrm
LegacyTypeDispatch.h46260644editdlrm
List.h156670644editdlrm
List_inl.h110120644editdlrm
Macros.h440644editdlrm
MT19937RNGEngine.h64100644editdlrm
NamedTensor.h50500644editdlrm
operator_name.h30180644editdlrm
PhiloxRNGEngine.h64960644editdlrm
PythonModeTLS.h4030644editdlrm
qualified_name.h43580644editdlrm
QuantizerBase.h24430644editdlrm
Range.h4180644editdlrm
Reduction.h4610644editdlrm
rref_interface.h11440644editdlrm
Scalar.h290644editdlrm
ScalarType.h330644editdlrm
stack.h60340644editdlrm
Tensor.h17560644editdlrm
TensorAccessor.h102960644editdlrm
TensorBase.h327670644editdlrm
TensorBody.h2475550644editdlrm
TransformationHelper.h69110644editdlrm
typeid.h290644editdlrm
UndefinedTensorImpl.h420644editdlrm
UnsafeFromTH.h7080644editdlrm
VariableHooksInterface.h33120644editdlrm
Variadic.h22570644editdlrm
Vitals.h23050644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/VariableHooksInterface.h (3312B)
#pragma once #include #include // A little explanation about why this file exists at all. We have // a few methods on Tensor class which require access to reified access to // AutogradMeta. In open source, this isn't a big deal: we just access // torch/csrc/autograd/variable.h from aten/src/ATen/core/Tensor.cpp and // we can put the definitions inline. This is because everything gets balled // into a single dynamic library in the end. // // However, inside our Facebook internal version of our build system, we // have a split between aten and torch/csrc. So we cannot simply just // cross this boundary. "Now wait," you might say, "Why don't we just // merge the libraries inside Facebook". Well, the problem is that there // are some downstream applications which are at binary size limit, and // incorporating all of the extra code from libtorch would push them // over (admarket/adreview/service:adreviewservice, see also // https://github.com/pytorch/pytorch/pull/29299) So if you want to do that, // we have to fix all of the services like this. // // I didn't want to block eliminating Tensor-Variable on this work, so I // had to introduce another dynamic dispatch to get to the variable // implementations (which live in torch/csrc/autograd/variable.cpp, FYI). // // I also considered using our existing dynamic dispatch mechanism, c10 // dispatcher, to do this. However, (1) some of the functions on Tensor // have weird signatures that are not supported by autograd, and (2) // see this bug https://github.com/pytorch/pytorch/issues/30102 namespace torch { namespace autograd { struct Node; }} // namespace torch::autograd namespace at { namespace impl { struct TORCH_API VariableHooksInterface { virtual ~VariableHooksInterface() = default; virtual TensorBase tensor_data(const TensorBase&) const = 0; virtual TensorBase variable_data(const TensorBase&) const = 0; virtual const std::shared_ptr& grad_fn(const TensorBase&) const = 0; virtual unsigned _register_hook( const TensorBase&, std::function hook) const = 0; virtual void remove_hook(const TensorBase&, unsigned pos) const = 0; virtual bool is_view(const TensorBase&) const = 0; virtual const TensorBase& base(const TensorBase&) const = 0; virtual const std::string& name(const TensorBase&) const = 0; virtual bool is_leaf(const TensorBase&) const = 0; virtual int64_t output_nr(const TensorBase&) const = 0; virtual void set_data(const TensorBase&, const TensorBase&) const = 0; virtual TensorBase data(const TensorBase&) const = 0; virtual int64_t _version(const TensorBase&) const = 0; virtual void retain_grad(const TensorBase&) const = 0; virtual bool retains_grad(const TensorBase&) const = 0; virtual void _backward(const Tensor&, TensorList, const c10::optional&, c10::optional, bool) const = 0; virtual void requires_grad_(const TensorBase&, bool) const = 0; }; TORCH_API void SetVariableHooks(VariableHooksInterface* hooks); TORCH_API VariableHooksInterface* GetVariableHooks(); struct TORCH_API VariableHooksRegisterer { explicit VariableHooksRegisterer(VariableHooksInterface* hooks) { SetVariableHooks(hooks); } }; }} // namespace at::impl