-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add mkldnn related unit-tests #15615
Comments
We reproduced your results with coverage testing tool.
We will add missing tests. |
@luotao1 Whether it is possible to run more than 1 iteration in a single unit test for forward and backward phases ? We need to cover the part of the code responsible for reuse MKL-DNN primitives in backward (e.g. activation_mkldnn_op.cc::eltwise_grad function line 276-287). We have to run more than one iteration to enter this section of code. |
I think it's OK to run more than 1 iterations in elementwise_xxx_mkldnn unit-tests. However, if you add many more iterations, does the elasped time of unit-tests become larger? |
Not many, 2 iterations will be enough. Is there any unit test in PaddlePaddle which more than 1 iteration is started ? |
@kbinias There is no 2 iterations unitest using |
@luotao1 Thanks for you answer. What do you think about creating new test based on |
@kbinias I think it's OK. |
@luotao1 What do you think about closing this PR ? The problem with function coverage is IMO related to lcov tool. |
The Functions coverage is less than 80% in |
@luotao1 Coverage feature in GCC doesn't support virtual destructors correctly. There is no way to cover tests in 100% if test uses Inheritance. You can find out more details below with good explanation: One of potential workaround might be post-processing and remove all destructors from tests, we could consider that it’s a noise. The destructors should not be a part of final calculation. |
Got it. Both @tensor-tang and I think destructors are normal. |
我们的结果完全不一样,lrn应该是100%的,您可以用下面的编译指令重新生成一下吗 @luotao1 谢谢 |
我是CI上的结果。 |
Could you please tell how to reproduce it with commands ? It seems we have different procedure... 请问怎么reproduce呢,可以有什么指令吗? 非常感谢! |
We are checking build log, hope we could find something. Thanks. If you have any further information, please inform us. Thanks |
Macro REGISTER_OP_KERNEL is not able to set correct handle for all grad functions such TouchOpKernelRegistrar_transpose_grad_MKLDNN_DEFAULT_TYPE(). |
@luotao1 What do you think about above problem ? |
do you mean paddle can't register some kernel or paddle can't select some registered kernels? can you search REGISTER_OP_KERNEL_WITH_CUSTOM_TYPE and see if it works for you? |
@shanyi15 Could you help to update How to add new op to introduce so many different REGISTER MACRO? |
@luotao1 About batch_norm_mkldnn and lrn_mkldnn line coverages, I have some idea and made some fix locally. I could build and make with docker[latest-dev], but I don't know what is the building and testing script. Something like ./paddle_build_cov.sh. I also don't know what main cov means in the build log on TeamCity. Could you share build script with me? This will speed up the work. Thank you! |
@lidanqing-intel The different between
@kolinwei will update |
Thank you! |
please see #16324 |
The point it that Register_Op_kernel consist of Register_op_Kernel_with_custom_type.
To better understand what I’m trying to tell is a simple example below.
So we got two functions, only first one will be executed – I expect both of them.
|
Hi, @luotao1 Both batch_norm_mkldnn and lrn_mkldnn failed because of timeout and it passed with good line coverage in our machines, without docker and tests are run in serial. I just update the progress with you. And similar problems happened before so I put comment here. I consider to set in cmake/generic.cmake, in line 394 and line 721 We also found the unit tests are run in parallel, while timeout limit is set 600 strictly. We consider setting mkldnn unit test to run in the serial way as in PR #16233 . |
@lidanqing-intel GOT it, Thanks very much for your analysis!
Could you give the line coverage here? |
As in krzysztof's comment. |
@kbinias I close this issue due to #15615 (comment) |
To improve the code (line+function) coverage, please add mkldnn related unit-tests:
http://ce.paddlepaddle.org:8080/viewLog.html?buildId=21110&buildTypeId=PaddlePaddleFramework_TestCoverage_TestCoverage&tab=report_project15_C___Coverage
The text was updated successfully, but these errors were encountered: