onnxruntime
2102b8f6 - Avoid duplicate symbol error between ONNX and ORT for ostream operator<< with TensorShapeProto (#12651)

Commit
3 years ago
Avoid duplicate symbol error between ONNX and ORT for ostream operator<< with TensorShapeProto (#12651) * Remove ostream operator<< definitions for TensorShapeProto and TensorProto as they clash with ONNX definitions in onnx/defs/printer.h/cc. Currently printer.h (unnecessarily) pulls in a number of other ONNX headers which causes naming clashes with parts of ORT. It is also excluded in a minimal build. Instead convert the onnx::TensorShapeProto to onnxruntime::TensorShape so we use the existing ostream operator<< for TensorShape. Make GetTensorShapeFromTensorProto consistent with GetTensorShapeFromTensorShapeProto so both return a TensorShape (as the name implies).
Author
Parents
Loading