<?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 @vasci in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141074#M26303</link>
    <description>&lt;P&gt;@vasci&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;I would go back and experiment with a simple C program that makes BLAS calls (say one from the MKL examples ) and tries to do what you are attempting. I assume that would be linking against MKL, but then setting LD_PRELOAD to try and force nvblas to be used.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I am not a C programmer. My use case is very simple. I use INTEL MKL as an alternative&amp;nbsp; cpu blas for R and python. That works so the linking is not an issue. But to use nvblas with python requires numpy be compiled against MKL (done) and it is used as a fall back cpu blas as nvblas only works for so called level 3 operations (matrix to matrix). See &lt;A href="http://scelementary.com/2015/04/09/nvidia-nvblas-in-numpy.html"&gt;http://scelementary.com/2015/04/09/nvidia-nvblas-in-numpy.html&lt;/A&gt;&lt;BR /&gt;
	Since this is a very specific issue I don't think running some generic C examples would produce any insight (and as I said I am no C programmer)&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;It's also possible to turn on LD debugging at runtime to see where BLAS symbols are being resolved.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How do you do that?&lt;/P&gt;

&lt;P&gt;FWIW I have also created an issue on Nvidia's forums. &lt;A href="https://devtalk.nvidia.com/default/topic/1042752/cuda-setup-and-installation/nvblas-numpy-intelmkl-gt-2018-3-not-work-/"&gt;Here &lt;/A&gt;it is.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Oct 2018 19:11:00 GMT</pubDate>
    <dc:creator>kkamm1</dc:creator>
    <dc:date>2018-10-12T19:11:00Z</dc:date>
    <item>
      <title>MKL &gt; 2018.3 doesn't work with NVIDIA nvblas</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141070#M26299</link>
      <description>&lt;P&gt;Platform is Ubuntu 16.04.5. GPU NVIDIA1070 cuda-9.2 python3.5&lt;/P&gt;

&lt;P&gt;I use python with nvblas support by compiling numpy against intel MKL. It works with 2018.1 and 2018.2 but GPU is not used for MKL 2018.3 and 2019.0&lt;/P&gt;

&lt;P&gt;Here is the experiment (have tried with different versions of numpy same issue)&lt;/P&gt;

&lt;P&gt;LD_PRELOAD=/usr/local/cuda/targets/x86_64-linux/lib/libnvblas.so python3&lt;/P&gt;

&lt;P&gt;NVBLAS_CONFIG_FILE environment variable is set to '/home/bernard/.config/nvblas.conf'&lt;/P&gt;

&lt;P&gt;Python 3.5.2 (default, Nov 23 2017, 16:37:01)&lt;/P&gt;

&lt;P&gt;[GCC 5.4.0 20160609] on linux&lt;/P&gt;

&lt;P&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; np.__version__ '1.15.2'&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; np.show_config()&lt;/P&gt;

&lt;P&gt;lapack_opt_info: define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/P&gt;

&lt;P&gt;library_dirs = ['/opt/intel/mkl/lib/intel64/']&lt;/P&gt;

&lt;P&gt;include_dirs = ['/opt/intel/mkl/include']&lt;/P&gt;

&lt;P&gt;libraries = ['mkl_rt', 'pthread'] blas_mkl_info: define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/P&gt;

&lt;P&gt;library_dirs = ['/opt/intel/mkl/lib/intel64/']&lt;/P&gt;

&lt;P&gt;include_dirs = ['/opt/intel/mkl/include']&lt;/P&gt;

&lt;P&gt;libraries = ['mkl_rt', 'pthread']&lt;/P&gt;

&lt;P&gt;lapack_mkl_info: define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/P&gt;

&lt;P&gt;library_dirs = ['/opt/intel/mkl/lib/intel64/']&lt;/P&gt;

&lt;P&gt;include_dirs = ['/opt/intel/mkl/include']&lt;/P&gt;

&lt;P&gt;libraries = ['mkl_rt', 'pthread'] blas_opt_info: define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]&lt;/P&gt;

&lt;P&gt;library_dirs = ['/opt/intel/mkl/lib/intel64/']&lt;/P&gt;

&lt;P&gt;include_dirs = ['/opt/intel/mkl/include'] libraries = ['mkl_rt', 'pthread']&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; a = np.random.rand(10000, 10000)&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; b = np.random.rand(10000, 10000)&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; a@b&lt;/P&gt;

&lt;P&gt;now check with the command: nvidia-smi&lt;/P&gt;

&lt;P&gt;For MKL &amp;lt;= 2018.3 you can see the gpu is being used 100%, with MKL &amp;gt; 2018.3 it is 0% so the gpu is not used,&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:07:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141070#M26299</guid>
      <dc:creator>kkamm1</dc:creator>
      <dc:date>2018-10-08T22:07:30Z</dc:date>
    </item>
    <item>
      <title>here is the link to the MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141071#M26300</link>
      <description>&lt;P&gt;here is the link to the MKL 2018 System Requirements -&amp;nbsp;https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-2018-system-requirements&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:55:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141071#M26300</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2018-10-09T14:55:31Z</dc:date>
    </item>
    <item>
      <title>Quote:Gennady F. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141072#M26301</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gennady F. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;here is the link to the MKL 2018 System Requirements -&amp;nbsp;&lt;A href="https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-2018-system-requirements"&gt;https://software.intel.com/en-us/articles/intel-math-kernel-library-inte...&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	Not sure what this has to do with my post.The system requirement is certainly met and it works. The only thing that doesn't work is Nvidia's nvblas with numpy compiled against MKL (only for MKL version &amp;gt;= 2018.3, it works for 2018.2 and before)&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:11:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141072#M26301</guid>
      <dc:creator>kkamm1</dc:creator>
      <dc:date>2018-10-09T15:11:00Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141073#M26302</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I would go back and experiment with a simple C program that makes BLAS calls (say one from the MKL examples ) and tries to do what you are attempting. I assume that would be linking against MKL, but then setting LD_PRELOAD to try and force nvblas to be used.&lt;/P&gt;

&lt;P&gt;It's also possible to turn on LD debugging at runtime to see where BLAS symbols are being resolved.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:39:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141073#M26302</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2018-10-09T20:39:30Z</dc:date>
    </item>
    <item>
      <title>@vasci</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141074#M26303</link>
      <description>&lt;P&gt;@vasci&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;I would go back and experiment with a simple C program that makes BLAS calls (say one from the MKL examples ) and tries to do what you are attempting. I assume that would be linking against MKL, but then setting LD_PRELOAD to try and force nvblas to be used.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I am not a C programmer. My use case is very simple. I use INTEL MKL as an alternative&amp;nbsp; cpu blas for R and python. That works so the linking is not an issue. But to use nvblas with python requires numpy be compiled against MKL (done) and it is used as a fall back cpu blas as nvblas only works for so called level 3 operations (matrix to matrix). See &lt;A href="http://scelementary.com/2015/04/09/nvidia-nvblas-in-numpy.html"&gt;http://scelementary.com/2015/04/09/nvidia-nvblas-in-numpy.html&lt;/A&gt;&lt;BR /&gt;
	Since this is a very specific issue I don't think running some generic C examples would produce any insight (and as I said I am no C programmer)&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;It's also possible to turn on LD debugging at runtime to see where BLAS symbols are being resolved.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How do you do that?&lt;/P&gt;

&lt;P&gt;FWIW I have also created an issue on Nvidia's forums. &lt;A href="https://devtalk.nvidia.com/default/topic/1042752/cuda-setup-and-installation/nvblas-numpy-intelmkl-gt-2018-3-not-work-/"&gt;Here &lt;/A&gt;it is.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 19:11:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-gt-2018-3-doesn-t-work-with-NVIDIA-nvblas/m-p/1141074#M26303</guid>
      <dc:creator>kkamm1</dc:creator>
      <dc:date>2018-10-12T19:11:00Z</dc:date>
    </item>
  </channel>
</rss>

