-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
how to add MKL Packed interface #6612
Comments
As MKL Packed optimization on RNN are totally different with MKLDNN, and is compiled only when
I have another option: when MKL Packed optimization on RNN, in cpu mode and @hedaoyuan How do you think about it ? Any suggestion is appreciated. |
About this suggestion. In CPU mode, default compiling is
I think this is my option one, just default set |
This will make both develops and users confused. As original Paddle c++ code uses MKL library as well, |
OK, I get your point. It seems option one is better, at least we can separate them. |
Discussed with @hedaoyuan , python api (both v2 and v1) can default use MKL packed C++ codes after testing. |
OK, Thx. I see. |
Need discuss about the python interface how to use mkl packed implements.
As this issue is long, I summarize the key points in Chinese as first:
intel对GRU等layer优化(还是使用MKL库,非MKLDNN库)完并通过测试后,python api封装时,cpu模式(同时开启with_mkl=on),python端是否可以默认调用优化过后的c++ layer?
Background
We plan to add MKL Packed implements for RNN layers,(Recurrent Layer, LSTM, and GRU). related #6512 and #6506 .
They are total different with MKLDNN, and they will be compiled only if
WITH_MKL=ON
,Then we got a problem about how to use it from python side?
Solutions
There are two options:
Add one more flag:
use_mkl_packed
just likeuse_mkldnn
. This would make things flexible but complex. If user want to use both. They should add bothuse_mkldnn=True
anduse_mkl_packed=True
.Change
use_mkldnn
==>use_mkl
, and makeuse_mkl
cover both. This can make users happy, Justuse_mkl=True
is enough, do not need care which one to choose. But it's not flexible enough.Which one we should choose? Any suggestion is appreciated.
@wangkuiyi @luotao1
The text was updated successfully, but these errors were encountered: