1 #pragma once 2 3 #include <memory> 4 5 #include <torch/csrc/jit/ir/ir.h> 6 #include <optional> 7 8 namespace torch::jit { 9 10 const int ONNX_OPSET_9 = 9; 11 const int ONNX_OPSET_10 = 10; 12 const int ONNX_OPSET_11 = 11; 13 const int ONNX_OPSET_12 = 12; 14 const int ONNX_OPSET_13 = 13; 15 const int ONNX_OPSET_14 = 14; 16 17 namespace onnx_constant_fold { 18 19 at::Tensor IntToTensor(int64_t value); 20 21 std::optional<at::Tensor> runTorchBackendForOnnx( 22 const Node* node, 23 std::vector<at::Tensor>& inputTensorValues, 24 int opset_version); 25 } // namespace onnx_constant_fold 26 27 void ConstantFoldONNX( 28 std::shared_ptr<Graph>& g, 29 std::map<std::string, IValue>& paramDict, 30 int opset_version); 31 32 } // namespace torch::jit 33