Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy into huawei

This commit is contained in:
yunyaoXYY
2022-12-07 02:34:52 +00:00
77 changed files with 1377 additions and 1085 deletions

View File

@@ -72,7 +72,7 @@ void LiteBackend::BuildOption(const LiteBackendOption& option) {
}
}
}
if(option_.enable_timvx){
if(option_.enable_timvx) {
config_.set_nnadapter_device_names({"verisilicon_timvx"});
valid_places.push_back(
paddle::lite_api::Place{TARGET(kNNAdapter), PRECISION(kInt8)});
@@ -231,6 +231,14 @@ bool LiteBackend::Infer(std::vector<FDTensor>& inputs,
tensor->CopyFromCpu<uint8_t, paddle::lite_api::TargetType::kARM>(
reinterpret_cast<const uint8_t*>(const_cast<void*>(
inputs[i].CpuData())));
} else if (inputs[i].dtype == FDDataType::INT64) {
#ifdef __aarch64__
tensor->CopyFromCpu<int64_t, paddle::lite_api::TargetType::kARM>(
reinterpret_cast<const int64_t*>(const_cast<void*>(
inputs[i].CpuData())));
#else
FDASSERT(false, "FDDataType::INT64 is not support for Arm v7 now!");
#endif
} else {
FDASSERT(false, "Unexpected data type of %d.", inputs[i].dtype);
}