<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic May I bring some more in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179860#M29249</link>
    <description>&lt;P&gt;May I bring some more information.&lt;/P&gt;

&lt;P&gt;The intel precompiled python runs well in my computer with multicores.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And the numpy I built can also do matrix product using multicores, but for element-wise product only one core is going to use (intel python will use at least 3).&lt;/P&gt;

&lt;P&gt;Any suggestions? Thanks.&lt;/P&gt;</description>
    <pubDate>Sat, 05 May 2018 09:16:52 GMT</pubDate>
    <dc:creator>xiao__yuanzheng</dc:creator>
    <dc:date>2018-05-05T09:16:52Z</dc:date>
    <item>
      <title>Numpy + MKL only using 1 core of cpu on Ubuntu 16.04</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179859#M29248</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using Ubuntu 16.04 on my pc with "&lt;SPAN style="font-size: 13.008px;"&gt;Intel® Core™ i7-7700K CPU @ 4.20GHz × 8".&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My numpy and scipy only use one cpu&amp;nbsp;&lt;/STRONG&gt;when I try to do some element calculation for my numpy ndarray.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Something like:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;numpy.power(matrix, 1.5)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I compiled the numpy and scipy following &lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl?page=1" target="_blank"&gt;https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl?page=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;The numpy configurations are as following.&lt;/SPAN&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;blas_opt_info:&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; include_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/include']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; library_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/lib/intel64']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; libraries = ['mkl_rt', 'pthread']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;lapack_opt_info:&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; include_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/include']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; library_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/lib/intel64']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; libraries = ['mkl_rt', 'pthread']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;blas_mkl_info:&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; include_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/include']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; library_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/lib/intel64']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; libraries = ['mkl_rt', 'pthread']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;lapack_mkl_info:&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; include_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/include']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; library_dirs = ['/opt/intel/compilers_and_libraries_2018/linux/mkl/lib/intel64']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; libraries = ['mkl_rt', 'pthread']&lt;/SPAN&gt;&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I tried to modify environment variables like MKL_NUM_THREADS, OMP_NUM_THREADS, MKL_DOMAIN_NUM_THREADS, MKL_DYNAMIC, but they do nothing to my situation.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 07:33:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179859#M29248</guid>
      <dc:creator>xiao__yuanzheng</dc:creator>
      <dc:date>2018-05-05T07:33:24Z</dc:date>
    </item>
    <item>
      <title>May I bring some more</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179860#M29249</link>
      <description>&lt;P&gt;May I bring some more information.&lt;/P&gt;

&lt;P&gt;The intel precompiled python runs well in my computer with multicores.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And the numpy I built can also do matrix product using multicores, but for element-wise product only one core is going to use (intel python will use at least 3).&lt;/P&gt;

&lt;P&gt;Any suggestions? Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 09:16:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179860#M29249</guid>
      <dc:creator>xiao__yuanzheng</dc:creator>
      <dc:date>2018-05-05T09:16:52Z</dc:date>
    </item>
    <item>
      <title>Hi Yuanzheng,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179861#M29250</link>
      <description>&lt;P&gt;Hi Yuanzheng,&lt;BR /&gt;
	&lt;BR /&gt;
	​Your&amp;nbsp;observation give&amp;nbsp;the hint for the&amp;nbsp;answer of your question&amp;nbsp;:)&amp;nbsp;&lt;BR /&gt;
	​The build Numpy, Scipy&amp;nbsp;with MKL is&amp;nbsp;&amp;nbsp;based on&amp;nbsp;&amp;nbsp;configuration:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;BR /&gt;
	&lt;BR /&gt;
	So it adopts&amp;nbsp;&amp;nbsp;part of MKL,&amp;nbsp;&amp;nbsp;&amp;nbsp;here&amp;nbsp;CBLAS function&amp;nbsp; &lt;A href="http://www.netlib.org/blas/​" target="_blank"&gt;http://www.netlib.org/blas/​&lt;/A&gt;, which only have functions like matrix product gemm, matrix*vector etc.&amp;nbsp;It don't include element-wise functions.&amp;nbsp; So you can't see MKL acceleration or multi-core for such operation in your build.&lt;/P&gt;

&lt;P&gt;And Intel distributed Python did&amp;nbsp;more optimization,&amp;nbsp; including MKL, DAAL,&amp;nbsp;vector math, multithreading etc.&amp;nbsp;&amp;nbsp;So you will see more performance benefits&amp;nbsp;.&lt;/P&gt;

&lt;P&gt;Best Regards&lt;BR /&gt;
	​Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 06:01:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179861#M29250</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-05-08T06:01:58Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179862#M29251</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Do you have any suggestions for how to build numpy/scipy with those optimization functions?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 02:29:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179862#M29251</guid>
      <dc:creator>xiao__yuanzheng</dc:creator>
      <dc:date>2018-05-10T02:29:40Z</dc:date>
    </item>
    <item>
      <title>Hi Yuanzheng,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179863#M29252</link>
      <description>&lt;P&gt;Hi Yuanzheng,&lt;BR /&gt;
	&lt;BR /&gt;
	​What i can suggest,&lt;/P&gt;

&lt;P&gt;maybe easier way , to use Intel distributed Python, which is free and compatible with other conda package.&lt;/P&gt;

&lt;P&gt;second way, do change the numpy/scipy source code manually , for example change their Vector implementation with MKL VML function etc. As Intel python developer did.&lt;BR /&gt;
	&lt;BR /&gt;
	​third way, specific for your project,&amp;nbsp; for example, evaluate the hot functions list&amp;nbsp;you will use, then manually optimize them by your function to replace the numpy/scipy implementation.&lt;BR /&gt;
	&lt;BR /&gt;
	​Best Regards,&lt;BR /&gt;
	​Ying&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 05:10:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Numpy-MKL-only-using-1-core-of-cpu-on-Ubuntu-16-04/m-p/1179863#M29252</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-05-10T05:10:07Z</dc:date>
    </item>
  </channel>
</rss>

