Skip to content

Conversation

@houj04
Copy link
Contributor

@houj04 houj04 commented Mar 3, 2025

PR Category

Custom Device

PR Types

New features

Description

增加XPU下面的quantize_linear以及dequantize_linear算子。受执行器的某些特殊限制,参考GPU和CPU的实现,增加了两个辅助的没有什么实际意义的算子。

当前算子会忽略qminbit_length等等参数。其原因有若干个,例如,python/paddle/nn/quant/format.py的调用入口只传了较少的参数,以及参考GPU和CPU的代码,中间若干层的调用中,会把这些参数逐渐都扔掉(即,不往下传)。此外,经过和业务方讨论,only_observerround_type也只支持了默认值。

此外,不支持!is_test的情况,等以后有需求了再考虑补充。

@paddle-bot
Copy link

paddle-bot bot commented Mar 4, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the XPU label Mar 4, 2025
Copy link
Contributor

@dynamicheart dynamicheart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@skywalker2012
Copy link
Contributor

LGTM

@houj04 houj04 merged commit 2f2d2bf into PaddlePaddle:develop Mar 6, 2025
31 checks passed
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
* [XPU] add quantize_linear and dequantize_linear op

* update xhpc version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants