ORT support UINT8 and INT8 input and output

This commit is contained in:
yunyaoXYY
2023-03-21 02:23:23 +00:00
parent 3cc72765dd
commit b3e16e9966
2 changed files with 14 additions and 2 deletions

View File

@@ -50,6 +50,10 @@ FDDataType GetFdDtype(const ONNXTensorElementDataType& ort_dtype) {
return FDDataType::INT64;
} else if (ort_dtype == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16) {
return FDDataType::FP16;
} else if (ort_dtype == ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8) {
return FDDataType::UINT8;
} else if (ort_dtype == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8) {
return FDDataType::INT8;
}
FDERROR << "Unrecognized ort data type:" << ort_dtype << "." << std::endl;
return FDDataType::FP32;