Skip to content

Commit

Permalink
[Bug Fix] add __aarch64__ to limit int64 in armv8 (PaddlePaddle#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
DefTruth authored Dec 5, 2022
1 parent cdae9f0 commit ffea55e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fastdeploy/backends/lite/lite_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,13 @@ bool LiteBackend::Infer(std::vector<FDTensor>& inputs,
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);
}
Expand Down

0 comments on commit ffea55e

Please sign in to comment.