#pragma once #include #include #include #include #include #include #include namespace torch::jit { struct Instruction; struct Upgrader { int min_version; int max_version; std::string upgrader_name; int index; }; // From operator_versions.yaml TORCH_API const std::unordered_map> getOperatorVersionMapForMobile(); struct OperatorString { const std::string name; const std::string overload_name; const std::optional num_specified_args; }; struct ByteCodeFunctionWithOperator { mobile::Function& function; std::vector operators; }; TORCH_API const std::vector& getUpgraderBytecodeList(); } // namespace torch::jit