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

extend matmul_int8 and support matmul_with_flatten_int8 #56827

Merged
merged 15 commits into from
Sep 14, 2023

Conversation

YSF-A
Copy link
Contributor

@YSF-A YSF-A commented Aug 31, 2023

PR types

New features

PR changes

Ops

Description

  • support transpose, broadcast and so on for matmul_int8
  • add matmul_with_flatten_int8

@paddle-bot
Copy link

paddle-bot bot commented Aug 31, 2023

你的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 contributor External developers label Aug 31, 2023
@CLAassistant
Copy link

CLAassistant commented Aug 31, 2023

CLA assistant check
All committers have signed the CLA.

@paddle-bot
Copy link

paddle-bot bot commented Aug 31, 2023

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@@ -43,3 +43,9 @@ PD_REGISTER_KERNEL(matmul_with_flatten,
double,
phi::dtype::bfloat16,
phi::dtype::float16) {}

Copy link
Contributor

Choose a reason for hiding this comment

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

期望不使用matmul_int8和matmul_with_flatten_int8独立于 matmul和matmul_with_flatten,而是通过增加数据类型的方式支持。之前的matmul_int8是一种非常临时的方式

Copy link
Contributor Author

Choose a reason for hiding this comment

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

目前修改了这个部分,按照上述这个方式进行了实现。

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM overall


#if defined(PADDLE_WITH_CUDA)
#if CUDA_VERSION >= 11060
REGISTER_OP_CUDA_KERNEL(
Copy link
Contributor

Choose a reason for hiding this comment

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

这个op已经废弃了吧,还需要更新它的实现吗?

Copy link
Contributor

Choose a reason for hiding this comment

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

动转静之后仍然走了这里的实现

Copy link
Contributor

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

LGTM for docs

Copy link
Contributor

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM for unittest.skip

Copy link
Collaborator

@phlrain phlrain left a comment

Choose a reason for hiding this comment

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

LGTM for check dygraph = false

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@carryyu carryyu merged commit 5b6594c into PaddlePaddle:develop Sep 14, 2023
risemeup1 added a commit that referenced this pull request Sep 14, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…#56827)

* add matmul_int8 and matmul_with_flatten_int8

* fix api of int8 matmul and matmul_with_flatten

* support dy2static

* fix static matmul build

* code refine

* add cuda version limitation in matmulflatten

* avoid rocm build error

* fix build error

* fix build errors: auto_tune and blaslt_impl

* fix inference ci error

* fix multidefinition error

* fix matmul with flatten error

* fix unit test

---------

Co-authored-by: RichardWooSJTU <37864677+RichardWooSJTU@users.noreply.github.com>
Co-authored-by: wufeisheng <wfs1997@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants