torch/csrc/jit/export.cpp
// export_raw_ir will export IR ops without turning them into ONNX ops.
// The output will use the ONNX protobuf format, but the ops will not
// conform to the ONNX op specification. Thus, the output will not
// be interpretable by a ONNX-compatible framework. However, PyTorch or
// libtorch will be able to import the IR and play it back.
export_raw_ir will export IR ops without turning them into ONNX ops.
The output will use the ONNX protobuf format, but the ops will not
conform to the ONNX op specification. Thus, the output will not
be interpretable by a ONNX-compatible framework. However, PyTorch or
libtorch will be able to import the IR and play it back.
export_raw_ir will export IR ops without turning them into ONNX ops . The output will use the ONNX protobuf format but the ops will not conform to the ONNX op specification . Thus the output will not be interpretable by a ONNX - compatible framework . However PyTorch or libtorch will be able to import the IR and play it back .
std::tuple<std::string, RawDataExportMap> ExportGraph(
                        const std::shared_ptr<Graph>& graph,
                        const std::vector<at::Tensor> & initializers,
                        int64_t onnx_opset_version,
                        bool defer_weight_export,
                        ::torch::onnx::OperatorExportTypes operator_export_type) {
  ::ONNX_NAMESPACE::ModelProto model_proto;
  auto graph_encoder = GraphEncoder(
    &model_proto, graph, onnx_opset_version, operator_export_type, initializers, defer_weight_export);
  return std::make_tuple(model_proto.SerializeAsString(), graph_encoder.get_raw_data_export_map());
}
std :: tuple < std :: string , RawDataExportMap > ExportGraph ( const std :: shared_ptr < Graph > & graph , const std :: vector < at :: Tensor > & initializers , int64_t onnx_opset_version , bool defer_weight_export , :: torch :: onnx :: OperatorExportTypes operator_export_type ) { :: ONNX_NAMESPACE :: ModelProto model_proto ; auto graph_encoder = GraphEncoder ( & model_proto , graph , onnx_opset_version , operator_export_type , initializers , defer_weight_export ) ; return std :: make_tuple ( model_proto . SerializeAsString ( ) , graph_encoder . get_raw_data_export_map ( ) ) ; }
export_raw_ir will export IR ops without turning them into ONNX ops.
export_raw_ir will export IR ops without turning them into ONNX ops .