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

[xpu]: add matmul int8_t #9764

Merged
merged 1 commit into from
Dec 1, 2022
Merged

Conversation

gitliuyf
Copy link
Contributor

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented Nov 25, 2022

Thanks for your contribution!

}
const float* xw_maxptr =
param.enable_int8 ? reinterpret_cast<float*>(input_max_guard_->addr_)
Copy link
Collaborator

Choose a reason for hiding this comment

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

增加x==y的条件, 才能共享maxptr

Copy link
Collaborator

Choose a reason for hiding this comment

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

x_maxptr跟w_maxptr分2个变量, 值在满足量化和x/y输入相同时才相同

mat_dim_a.width_, // k
mat_dim_a.trans_, // x_trans
mat_dim_b.trans_, // w_trans
xw_maxptr, // x_maxptr
Copy link
Collaborator

Choose a reason for hiding this comment

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

变量分开命名

@@ -237,6 +237,15 @@ using XPUFC_Int8_FP32_FP32 =
using XPUFC_FP32_LOCAL_QUANT =
xpu::XPUFcCompute<float, float, float, float, PRECISION(kFloat)>;

using XPUFC_Int8_Int8_FP32 =
Copy link
Contributor

Choose a reason for hiding this comment

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

fc注册了int8和fp32的输入输出,kernel pick之前的逻辑需要林伟改下。否则注册的这些还是使用不了。

Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@newway
Copy link
Collaborator

newway commented Dec 1, 2022

LGTM

@hong19860320 hong19860320 merged commit 89a7f4a into PaddlePaddle:develop Dec 1, 2022
newway pushed a commit to newway/Paddle-Lite that referenced this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants