Tflite Quant 推理比 Intel CPU 上的 TFlite float32 慢

问题描述 投票:0回答:2

我使用默认优化 (Float32) 设置将网络转换为 TFlite,其推理速度约为 25 fps。当我转换为 TFlite INT8 Quantized 时使用相同的网络,其推理速度在 INTEL 8 核 Intel Core i9 2.3 GHz 上约为 2 fps。这是在 CPU 上预期的吗?请有人解释是什么原因导致 INT8 推理缓慢。

tensorflow tensorflow2.0 quantization tensorflow-lite
2个回答
1
投票

你能提供更多模型的细节吗?

量化模型肯定比float32模型小

对于在移动 CPU 上部署,量化模型通常可能更快。但是,可能无法保证英特尔台式机/笔记本电脑 CPU。


0
投票

与第 10 代以下英特尔 CPU 上的 Float32 相比,您不会看到 INT8 模型提升。这是因为 Intel CPU < 10th gen don't have Intel DLBoost, a specific instruction set (ISA) architecture designed to improve performance of INT8 DL models. This ISA is present in Intel chips from 10th gen onwards. Most certainly, without a specific INT8 ISA the operations get upsampled to Float32.

© www.soinside.com 2019 - 2024. All rights reserved.