Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
423 Discussions

Not Seeing Expected Intel SciPy Optimizations

Nikki-Tyagi
Beginner
3,240 Views

Hello,

I am trying to use SciPy for signal processing and expected optimizations using Intel Python versus the stock, but actually I was seeing consistently slower times for the Intel Distribution. My understanding is the the SciPy should be accelerated out-of-the-box and no changes are required to see this. As background, the datapoints are signals made of 800,000 int8 values, and I have tried varying sizes for the dataset. I am currently using 3 SciPy functions. I have attached the benchmarks as reference and also the configuration files I used to set up the stock and Intel conda environments.

0 Kudos
13 Replies
JananiC_Intel
Moderator
3,190 Views

Hi,


Thanks for posting in Intel forum.


In order to reproduce this issue, we need a sample reproducer consisting exact steps and a sample code which is similar to your code and not the exact code. Once you share this we will try from our end and will let you know our observations .


Regards,

Janani Chandran


0 Kudos
Nikki-Tyagi
Beginner
3,179 Views

Hi Janani,

 

Thanks for getting back to me. I'm attaching a simple instructions file to get the sample data to be able to run the code and am also attaching a compressed python file. If there are any issues or any instructions was unclear, please let me know and I'll reply back with clarification.

 

Thanks,

Nikki

0 Kudos
JananiC_Intel
Moderator
3,134 Views

Hi,

 

Thanks for the reproducer.

 

We tried from our end with your sample reproducer and we couldn't find any major difference between the stock and Intel. Please find the attached screenshots for reference.

stock.PNG

 

intel_python.PNG

Also could you share your results ?

 

Regards,

Janani Chandran

 

0 Kudos
Nikki-Tyagi
Beginner
3,119 Views

Hi Janani,

 

I'm glad you were able to get the data and code working. My results are attached in the very initial post, the benchmarks.png file. It is just organized by parameter but it has the times for stock vs. Intel for different sizes and tunings, all showing that there is no speedup with Intel. So I believe that is a problem since Intel Python should be optimizing SciPy correct? How am I supposed to get the Intel optimization for SciPy?

 

Thanks,

Nikki

0 Kudos
JananiC_Intel
Moderator
3,106 Views

Hi,

 

Thanks for the update.

 

We tried from our end and we are getting the below results.

bench.PNG

 

Could you share your versions of both stock and intel python?

 

Regards,

Janani Chandran

 

0 Kudos
Nikki-Tyagi
Beginner
3,080 Views

Hi Janani,

 

Do you mean the configurations I have? Because those are also in the first post as screenshots. I believe it's Python 3.9 in both. Let me know if you meant for something else.

 

Thanks,

Nikki

0 Kudos
Nikki-Tyagi
Beginner
3,070 Views

I also want to add that the SciPy version in both environments are 1.7.3. Not sure if that's what the issue is, that possibly Intel optimizations are already included in stock SciPy after a certain version. I just wanted to include this in case this is what you were asking for.

Thanks,

Nikki

0 Kudos
Nikki-Tyagi
Beginner
3,045 Views

Hi Janani,

 

I just wanted to check in and see if there had been any progress on your front about why I'm not seeing the expected optimizations. Or if there's anything else you need from me or if I should clarify, please just let me know!

 

Thank you,

Nikki

0 Kudos
IntelSupport
Community Manager
2,938 Views

Hi Nikki,


This is Jeff. I am working with Janani on your issue.

I can reproduce your issue on my local lab machine. The intel optimized scipy does show lower performance on this case. I already escalated this issue to our dev team. I will keep you updated once there is any new progress.

Currently you can conda uninstall scipy , then pip install scipy in the environment of Intel Distribution for Python. The Scipy from pypi channel provide same performance as in the stock_python environment.


Thank you so much for your information, it is much appreciated!


Best

Jeff


0 Kudos
Nikki-Tyagi
Beginner
2,926 Views

Hi Jeff,

 

Thanks for the update. Look forward to figuring out the solution!

 

Thanks,

Nikki

0 Kudos
JeffLi
Employee
2,685 Views

Hi Nikki,

 

I had a discussion with our developing team and confirmed this is a problem. Right now we need time to finetune and fix it. Please keep using stock scipy with this task as a workaround in short term.

In long term, we will fix this problem in future releases. Please periodically visit our website and check release notes

https://www.intel.com/content/www/us/en/developer/articles/release-notes/distribution-for-python-release-notes.html

 

Best

Jeff

 

0 Kudos
Nikki-Tyagi
Beginner
2,630 Views

Hi Jeff,

 

Thanks for this response, I will discuss this with my team. I'm assuming since Scipy is built on top of Numpy, it is the same reason for seeing inconsistent optimizations with NumPy using Intel Python?

 

Thanks,

Nikki

0 Kudos
JeffLi
Employee
2,601 Views

Hi Nikki,

Yes. Intel Numpy and Scipy may show lower performance due to similar reason, as Intel built them both via classic compiler. They may show better performance on vectorization but be weaker at some functions.


Best

Jeff


0 Kudos
Reply