_functionalization.pyi 566 B

12345678910111213141516
  1. from torch import Tensor
  2. from torch.types import _bool
  3. # Defined in torch/csrc/functionalization/Module.cpp
  4. class ViewMeta:
  5. has_symbolic_inputs: _bool
  6. # Returns the list of ViewMeta instances of the given functional tensor.
  7. #
  8. # Although we do have python bindings for their types, we won't
  9. # expose them here, since they should not be used by users.
  10. def get_view_meta_sequence(tensor: Tensor) -> list[ViewMeta]: ...
  11. # Applies the ViewMeta sequence on top of the given base.
  12. def apply_view_meta_sequence(base: Tensor, sequence: list[ViewMeta]) -> Tensor: ...