-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[xpu]: add matmul int8_t #9764
Conversation
Thanks for your contribution! |
aea77e4
to
30de989
Compare
lite/kernels/xpu/matmul_compute.cc
Outdated
} | ||
const float* xw_maxptr = | ||
param.enable_int8 ? reinterpret_cast<float*>(input_max_guard_->addr_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加x==y的条件, 才能共享maxptr
There was a problem hiding this comment.
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输入相同时才相同
lite/kernels/xpu/matmul_compute.cc
Outdated
mat_dim_a.width_, // k | ||
mat_dim_a.trans_, // x_trans | ||
mat_dim_b.trans_, // w_trans | ||
xw_maxptr, // x_maxptr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
变量分开命名
30de989
to
53db1c4
Compare
@@ -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 = |
There was a problem hiding this comment.
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之前的逻辑需要林伟改下。否则注册的这些还是使用不了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
No description provided.