1 #pragma once 2 3 #include <torch/csrc/jit/ir/ir.h> 4 5 namespace torch::jit { 6 7 // Prepare division ops for ONNX export. This is necessary for and only used 8 // by ONNX export. 9 // 10 // The pass corrects the following: 11 // 12 // - aten::div(int, int) -> float is the python truediv operator. This doesn't 13 // exist in ONNX so we cast the ints to FloatTensors 14 // 15 TORCH_API void PrepareDivisionForONNX(const std::shared_ptr<Graph>& graph); 16 17 } // namespace torch::jit 18