Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Petros
Beginner
340 Views

Cython with Intel compiler and MKL

Hi,

I've been playing around with Intel Python and I'm impressed with the performance. Could you provide a small example of using Cython code with Intel Compiler (I have Intel Parallel Studio both on Windows and Linux). Mainly I'm interested in the MKL and OpenMP features of the Intel compiler which I find constantly faster than the native and GNU alternatives.

In the past (a year ago) I tried to blend Cython from Anaconda with Intel compiler but failed. I ended up using the MS compiler in Windows and GNU in Linux.

Thanks in advance !

0 Kudos
5 Replies
340 Views

Hello p3tris,

Thank you for the suggestion.  Yes, we plan on posting an example of using Cython with the Intel compiler and MKL shortly.  I will send you the link when it is ready.

Thanks,

Chris

gaston-hillar
Black Belt
340 Views

Hi p3tris,

The following article, written by Nguyen, Loc Q, provides an example of thread parallelism in Cython: https://software.intel.com/en-us/articles/thread-parallelism-in-cython

 

Anat_H_Intel
Employee
340 Views

Christopher H. (Intel) wrote:

Hello p3tris,

Thank you for the suggestion.  Yes, we plan on posting an example of using Cython with the Intel compiler and MKL shortly.  I will send you the link when it is ready.

Thanks,

Chris

Hi Chris, I came across this thread as I'm exploring options to use Cython with Intel compiler and optimization libraries such as MKL. Are ther updates on the topic?

 

Thanks,

Anat

 

Rohit_J_Intel
Employee
340 Views

Hi Anat,
 
 
Thanks,
Rohit
Knapp__Jacob
Beginner
340 Views

Hello,

While the information in https://software.intel.com/en-us/articles/thread-parallelism-in-cython is all well and good, and the instructions are useful on Unix/Unix-like systems, I have the question:

How do I do the same thing on windows?

Instead of the Linux

$ LDSHARED="icc -shared" CC=icc python setup.py build_ext –-inplace

I would use... what? (I normally have 

python setup.py build_ext -i

-Again, in Windows.)

The github link is also well and good, but it is also clearly meant for non-Windows (seemingly Linux in particular) systems, so it still doesn't answer how I do it with the straightforward setup.py script and setting the compiler (which I can set to explicitly use a compiler, I normally set it to msvc so it knows to use that, but other options are bcpp, cygwin, mingw32, and unix).

Again: how do I, on a WINDOWS system, compile Cython using the Intel C/C++ compiler, in the same overall manner as I do when compiling with the MSVC compiler?

 

Thanks!