1 #pragma once 2 #include <ATen/core/List.h> 3 #include <ATen/core/functional.h> 4 #include <ATen/core/ivalue.h> 5 #include <ATen/core/jit_type.h> 6 #include <ATen/core/stack.h> 7 8 namespace torch::jit { 9 10 void tupleUnpack(Stack& stack); 11 12 void format(Stack& stack, size_t num_inputs); 13 14 void einsum(Stack& stack, size_t num_inputs); 15 16 void percentFormat(Stack& stack, size_t num_inputs); 17 18 void listUnpack(Stack& stack, size_t num_outputs); 19 20 void tupleConstruct(Stack& stack, size_t num_inputs); 21 22 void namedTupleConstruct(Stack& stack, c10::TypePtr type, size_t num_inputs); 23 24 void listConstruct(Stack& stack, const c10::Type& list_type, size_t num_inputs); 25 26 void dictConstruct(Stack& stack, const c10::Type& type, size_t num_inputs); 27 28 // as weak_ref will create a Object with a non-owning CompilationUnit reference, 29 // for use as a constant in the Graph to avoid a reference cycle 30 void createObject( 31 Stack& stack, 32 const at::ClassTypePtr& type, 33 bool as_weak_ref = false); 34 35 void isinstance(Stack& stack, at::ArrayRef<at::TypePtr> types); 36 37 void tupleSlice(Stack& stack, size_t begin, size_t end); 38 39 void dequantize(Stack& stack); 40 41 } // namespace torch::jit 42