mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Bug Fix] fix lite int64 datatype convert (#892)
Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -249,12 +249,12 @@ 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__
|
||||
#if (defined(__aarch64__) || defined(__x86_64__) || defined(_M_X64) || defined(_M_ARM64))
|
||||
tensor->CopyFromCpu<int64_t, paddle::lite_api::TargetType::kHost>(
|
||||
reinterpret_cast<const int64_t*>(const_cast<void*>(
|
||||
inputs[i].CpuData())));
|
||||
#else
|
||||
FDASSERT(false, "FDDataType::INT64 is not support for Arm v7 now!");
|
||||
FDASSERT(false, "FDDataType::INT64 is not support for x86/armv7 now!");
|
||||
#endif
|
||||
} else {
|
||||
FDASSERT(false, "Unexpected data type of %d.", inputs[i].dtype);
|
||||
|
Reference in New Issue
Block a user