Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Anton_M_Intel
Employee
658 Views

TBB module: Unleash parallel performance of Python programs

Dear users of Intel Distribution for Python, let me introduce TBB module which enables additional performance for multi-threaded Python programs!

Please follow this link in order to read the blog article.

// Anton

0 Kudos
6 Replies
sergio_r_
Novice
658 Views

 

Hi Anton, I was able to successfully run your code. The test results are as follows:

$ python3 bench.py
25.36649799346924

$ python3 -m TBB bench.py
22.13143277168274

$ python3 bench.py
26.60333490371704

$ python3 -m TBB bench.py
21.826074361801147

Not sure how to make a proper interpretation of them.

Is there a performance test suite available for this python beta (2017) distribution?

Sergio

 

 

Andrew_D_3
Beginner
658 Views

Anton, 

may be worth mentioning that TBB will only offload to the Phi card if you install the latest version of Intel Python (l_python27_bu_2017.0.018). The version that was available when you posted the article does not work. 

Anton_M_Intel
Employee
658 Views

Hi Sergio,

sergio r. wrote:

Hi Anton, I was able to successfully run your code. The test results are as follows:
...

Not sure how to make a proper interpretation of them.

Is there a performance test suite available for this python beta (2017) distribution?

Thank you a lot for getting back to me with your results! If the numbers represent a time unit (my bench from the blog prints time), it is easy to interpret it as TBB helps with this benchmark on your machine. Do you have any other concerns or more questions here?

We don't have other benchmarks except we published in blogs. You can use publicly available/standard python benchmarks.

Regards,
Anton

Anton_M_Intel
Employee
658 Views

Andrew D. wrote:

may be worth mentioning that TBB will only offload to the Phi card if you install the latest version of Intel Python (l_python27_bu_2017.0.018). The version that was available when you posted the article does not work. 

Andrew, TBB does nothing w.r.t. offloading. It is only about managing threads within the same process where it is enabled.

But you are right that offloading was enabled for MKL in Intel Distribution for Python 2017 Beta Update 1.

658 Views

Hi,

I am working on an OpenCV DNN CAFFE code for detecting humans in CCTV cameras, Can you please let me know, if I can use TBB to parallelize Python.

Anton_M_Intel
Employee
658 Views

Mounagurusamy, Guruvishnuvardan wrote:

I am working on an OpenCV DNN CAFFE code for detecting humans in CCTV cameras, Can you please let me know, if I can use TBB to parallelize Python.

Short answer: no, TBB is not for making interpreted Python code parallel.

Please use regular approaches to parallelism in Python like multiprocessing.pool, Joblin, Dask, Ray, etc. TBB for Python helps to compose them better, without exposing it's C++ parallel programming model to Python.

Reply