Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Device 如何支持量化 #61516

Closed
Rruown opened this issue Feb 3, 2024 · 1 comment
Closed

Custom Device 如何支持量化 #61516

Rruown opened this issue Feb 3, 2024 · 1 comment
Labels
framework status/close 已关闭 type/question 用户提问 预测 原名Inference,包含Capi预测问题等

Comments

@Rruown
Copy link

Rruown commented Feb 3, 2024

请提出你的问题 Please ask your question

Paddle2.6和最新的develop分支目前开放的关于量化的phi kernel有weight_quantize, weight_dequantize,dequantize, dequantize_linear。尤其疑惑是quantize_linear_kernel.h中只有一个dequantize_linear kernel。我使用PaddleSlim的静态图离线量化功能导出了一个量化模型,默认使用onnex的量化格式(dequantize_linear ,quantize_linear ),但是框架只开放了dequantize_linear kernel该如何支持对激活变量的量化?
image

@vivienfanghuagood
Copy link
Contributor

你好,paddle目前支持了相关的int8的matmul / Linear计算,具体可以参考这个PR:
#57852
目前Paddle通过pass将散的q/dq op融合成quant_linear,具体可以参考这个PR:
#58637

@vivienfanghuagood vivienfanghuagood added 预测 原名Inference,包含Capi预测问题等 status/developed 开发完成 status/complete labels Feb 5, 2024
@paddle-bot paddle-bot bot closed this as completed Feb 5, 2024
@paddle-bot paddle-bot bot added the status/close 已关闭 label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework status/close 已关闭 type/question 用户提问 预测 原名Inference,包含Capi预测问题等
Projects
None yet
Development

No branches or pull requests

2 participants