mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-26 10:00:33 +08:00
Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy into huawei
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user