[Backend]Update sophgo_backend.cc for FP16 data type (#2161)

This commit is contained in:
ChaoII
2023-08-16 14:12:58 +08:00
committed by GitHub
parent 4e9bcc3718
commit 771dcf4b91

View File

@@ -248,7 +248,7 @@ bool SophgoBackend::Infer(std::vector<FDTensor>& inputs,
***************************************************************/ ***************************************************************/
FDDataType SophgoBackend::SophgoTensorTypeToFDDataType(bm_data_type_t type) { FDDataType SophgoBackend::SophgoTensorTypeToFDDataType(bm_data_type_t type) {
if (type == BM_FLOAT16) { if (type == BM_FLOAT16) {
return FDDataType::FP32; return FDDataType::FP16;
} }
if (type == BM_FLOAT32) { if (type == BM_FLOAT32) {
return FDDataType::FP32; return FDDataType::FP32;