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

[oneDNN]elementwise_add and elementwise_mul int8 support #24984

Merged
merged 8 commits into from
Jun 18, 2020

Conversation

jczaja
Copy link
Contributor

@jczaja jczaja commented Jun 9, 2020

PR types

New features

PR changes

Ops

Describe

This PR introduced unified implementation of oneDNN elementwise ops. elementwise_add & elementwise_mul int8 oneDNN kernels were added. it is build on PR #24812 , but some fix to unit tests were added.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 9, 2020

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 9, 2020

❌This PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@jczaja jczaja added the Intel label Jun 9, 2020
@jczaja
Copy link
Contributor Author

jczaja commented Jun 9, 2020

@luotao1 I have overtaken work on #24812 . This PR contains #24812 and small fix in oneDNN integration to fix UT. To pass CI (PR_CI_CPU_Py2) it is needed to have approve from engineers of your team. Could you please approve that one?

The second favour to ask is that I cannot see logs of PR_Windows_CI (I can see PR_CI_CPU_Py2). Could you please show the error of Windows CI builds?

@jczaja jczaja changed the title Prv elementwise int8 [oneDNN]elementwise_add and elementwise_mul int8 support Jun 9, 2020
@jczaja jczaja requested a review from wojtuss June 9, 2020 12:54
@luotao1
Copy link
Contributor

luotao1 commented Jun 9, 2020

To pass CI (PR_CI_CPU_Py2) it is needed to have approve from engineers of your team. Could you please approve that one?

It's hard to understand why the document of tensor API changes. @lelelelelez Could you help see it?

The second favour to ask is that I cannot see logs of PR_Windows_CI (I can see PR_CI_CPU_Py2). Could you please show the error of Windows CI builds?

Windows machine has some problem, and it may not upload the CI log. I have rerun the windows
CI. @lelelelelez Please take a look about it.

wojtuss
wojtuss previously approved these changes Jun 10, 2020
Copy link

@wojtuss wojtuss left a comment

Choose a reason for hiding this comment

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

LGTM

@jczaja
Copy link
Contributor Author

jczaja commented Jun 10, 2020

@luotao1 Could you please provide log (or part of it) for PR_Windows_CI (or just restart if random failure) ?

@luotao1
Copy link
Contributor

luotao1 commented Jun 10, 2020

I rerun it.

@jczaja
Copy link
Contributor Author

jczaja commented Jun 10, 2020

@luotao1 Thanks for reruning windows CI. So currently the only errors are due to lack of approval. Can you advice what can I do to have this PR approved?

Copy link
Contributor

@arlesniak arlesniak left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1
Copy link
Contributor

luotao1 commented Jun 11, 2020

@jczaja

So currently the only errors are due to lack of approval.

It's hard to understand why the document of tensor API changes.

We will see how to fix it at first.

@lelelelelez
Copy link
Contributor

lelelelelez commented Jun 11, 2020

@jczaja @luotao1

It's hard to understand why the document of tensor API changes.

The reason is that this PR AddAttr in elementwise_op.h, but these attributes and comments should not be shown to users. Thus, you should add these attributes in skip_attrs_set In python/paddle/tensor/math.py and python/paddle/fluid/layers/nn.py
Please refer to 549d02c
In addition, you can re-edit your PR description to retrigger CheckPRTemplate CI.

@jczaja
Copy link
Contributor Author

jczaja commented Jun 15, 2020

@lelelelelez Thanks for pointing a solution to problem. Still there are approvals needed to two other issues. could you advice on those as well ?

@jczaja
Copy link
Contributor Author

jczaja commented Jun 15, 2020

@luotao1 Could you please help / rerun Windows CI build?

test=develop

- fixes to compilation

- fix

- fix

- Lint fixes

test=develop
@lidanqing-intel
Copy link
Contributor

@luotao1 Could you please help rerun Windows_CI? This PR is important because other models speed -up is relying on this PR. Thanks!

Copy link

@wojtuss wojtuss left a comment

Choose a reason for hiding this comment

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

LGTM

@jczaja
Copy link
Contributor Author

jczaja commented Jun 17, 2020

@luotao1 , @lelelelelez Please continue with your reviews

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1
Copy link
Contributor

luotao1 commented Jun 17, 2020


[13:34:23][Step 1/1] 0. Developers are not allowed to set the check_dygraph field directly, which is set to True by default. If you need to change the check_dygraph field, you must have one RD (phlrain (Recommend) or lanxianghit) review and approve. 
[13:34:23][Step 1/1] The code that do not meet the specification are as follows:
[13:34:23][Step 1/1]  python/paddle/fluid/tests/unittests/mkldnn/test_elementwise_add_mkldnn_op.py : 
[13:34:23][Step 1/1] +        self.check_output(check_dygraph=(self.use_mkldnn == False))
[13:34:23][Step 1/1] +            check_dygraph=(self.use_mkldnn == False), atol=int_atol) 
[13:34:23][Step 1/1]  python/paddle/fluid/tests/unittests/mkldnn/test_elementwise_mul_mkldnn_op.py : 
[13:34:23][Step 1/1] +        self.check_output(check_dygraph=(self.use_mkldnn == False))
[13:34:23][Step 1/1] +            check_dygraph=(self.use_mkldnn == False), atol=int_atol) 

@phlrain Please have a review!

Copy link
Contributor

@arlesniak arlesniak left a comment

Choose a reason for hiding this comment

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

LGTM

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 dygraph = False

@jczaja
Copy link
Contributor Author

jczaja commented Jun 18, 2020

@phlrain thanks very much for approving this PR

@luotao1 could you please restart PR_CI_CPU_Py2 ?

@luotao1
Copy link
Contributor

luotao1 commented Jun 18, 2020

could you please restart PR_CI_CPU_Py2 ?

I rerun it several times, but all fail by network problems. I will rerun it again after the network connect.

@luotao1 luotao1 merged commit a794490 into PaddlePaddle:develop Jun 18, 2020
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.

8 participants