#include "testPch.h" #include "onnxruntime_cxx_api.h" namespace OrtValueHelpers { winml::ITensor LoadTensorFromOrtValue(Ort::Value& val); Ort::Value CreateOrtValueFromITensor(winml::ITensor winmlTensor); } // namespace OrtValueHelpers template struct ONNXTensorElementDataTypeToWinMLTensorKind { // Invalid ONNXTensorElementDataType to TensorKind static_assert(sizeof(T) == -1, "No WinML TensorKind mapped for given ONNX Tensor Element type!"); }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorFloat Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorUInt8Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorInt8Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorUInt16Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorInt16Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorInt32Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorInt64Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorString Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorBoolean Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorFloat16Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorDouble Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorUInt32Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorUInt64Bit Type; }; template <> struct ONNXTensorElementDataTypeToWinMLTensorKind { typedef winml::TensorFloat16Bit Type; };