In [1]:
from sklearn_benchmarks.reporting.hp_match import HpMatchReporting
from sklearn_benchmarks.utils import default_results_directory
from pathlib import Path
import pandas as pd
pd.set_option('display.max_colwidth', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

scikit-learn-intelex (Intel® oneAPI) vs. scikit-learn¶

In [2]:
results_dir = default_results_directory()
In [3]:
# Parameters
results_dir = "./results/local/20220314T110428/"
In [4]:
results_dir = Path(results_dir)
In [5]:
reporting = HpMatchReporting(other_library="sklearnex", config="config.yml", log_scale=True, results_dir=results_dir)
reporting.make_report()

We assume here there is a perfect match between the hyperparameters of both librairies. For a given set of parameters and a given dataset, we compute the speed-up time scikit-learn / time sklearnex. For instance, a speed-up of 2 means that sklearnex is twice as fast as scikit-learn for a given set of parameters and a given dataset.

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: algorithm=brute.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_jobs n_neighbors mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 100000 100000 100 1.521 0.022 0.053 0.0 -1 1 0.054 0.009 28.285 28.698 Download Download
3 fit 100000 100000 100 1.476 0.016 0.054 0.0 -1 5 0.050 0.000 29.275 29.275 Download Download
6 fit 100000 100000 100 1.465 0.020 0.055 0.0 1 100 0.051 0.000 28.607 28.608 Download Download
9 fit 100000 100000 100 1.485 0.018 0.054 0.0 -1 100 0.051 0.000 29.156 29.156 Download Download
12 fit 100000 100000 100 1.478 0.020 0.054 0.0 1 5 0.051 0.000 29.236 29.237 Download Download
15 fit 100000 100000 100 1.486 0.025 0.054 0.0 1 1 0.050 0.000 29.604 29.604 Download Download
18 fit 100000 100000 2 0.058 0.001 0.028 0.0 -1 1 0.010 0.000 5.699 5.700 Download Download
21 fit 100000 100000 2 0.058 0.001 0.028 0.0 -1 5 0.010 0.000 5.634 5.634 Download Download
24 fit 100000 100000 2 0.057 0.001 0.028 0.0 1 100 0.010 0.000 5.651 5.652 Download Download
27 fit 100000 100000 2 0.058 0.000 0.028 0.0 -1 100 0.010 0.000 5.742 5.743 Download Download
30 fit 100000 100000 2 0.058 0.001 0.027 0.0 1 5 0.010 0.000 5.812 5.814 Download Download
33 fit 100000 100000 2 0.057 0.000 0.028 0.0 1 1 0.010 0.000 5.637 5.637 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_jobs n_neighbors mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 100000 1000 100 2.589 0.291 0.000 0.003 -1 1 0.202 0.004 12.831 12.834 Download Download
2 predict 100000 1 100 0.026 0.003 0.000 0.026 -1 1 0.009 0.000 2.910 2.912 Download Download
4 predict 100000 1000 100 3.098 0.034 0.000 0.003 -1 5 0.203 0.003 15.295 15.296 Download Download
5 predict 100000 1 100 0.026 0.002 0.000 0.026 -1 5 0.009 0.000 2.951 2.951 Download Download
7 predict 100000 1000 100 2.160 0.006 0.000 0.002 1 100 0.252 0.004 8.586 8.587 Download Download
8 predict 100000 1 100 0.022 0.000 0.000 0.022 1 100 0.009 0.000 2.530 2.530 Download Download
10 predict 100000 1000 100 2.976 0.066 0.000 0.003 -1 100 0.247 0.002 12.058 12.058 Download Download
11 predict 100000 1 100 0.026 0.001 0.000 0.026 -1 100 0.009 0.000 2.905 2.905 Download Download
13 predict 100000 1000 100 2.166 0.013 0.000 0.002 1 5 0.201 0.002 10.758 10.758 Download Download
14 predict 100000 1 100 0.022 0.000 0.000 0.022 1 5 0.009 0.000 2.594 2.594 Download Download
16 predict 100000 1000 100 1.297 0.007 0.001 0.001 1 1 0.204 0.013 6.349 6.362 Download Download
17 predict 100000 1 100 0.025 0.006 0.000 0.025 1 1 0.009 0.000 2.842 2.843 Download Download
19 predict 100000 1000 2 1.846 0.023 0.000 0.002 -1 1 0.033 0.001 56.796 56.816 Download Download
20 predict 100000 1 2 0.005 0.001 0.000 0.005 -1 1 0.001 0.000 5.243 5.269 Download Download
22 predict 100000 1000 2 2.791 0.065 0.000 0.003 -1 5 0.033 0.000 83.582 83.584 Download Download
23 predict 100000 1 2 0.007 0.003 0.000 0.007 -1 5 0.001 0.000 7.490 7.517 Download Download
25 predict 100000 1000 2 2.113 0.009 0.000 0.002 1 100 0.075 0.001 28.106 28.107 Download Download
26 predict 100000 1 2 0.003 0.000 0.000 0.003 1 100 0.001 0.000 3.193 3.203 Download Download
28 predict 100000 1000 2 2.798 0.037 0.000 0.003 -1 100 0.074 0.001 37.553 37.554 Download Download
29 predict 100000 1 2 0.007 0.004 0.000 0.007 -1 100 0.001 0.000 7.342 7.362 Download Download
31 predict 100000 1000 2 2.112 0.023 0.000 0.002 1 5 0.033 0.000 63.472 63.474 Download Download
32 predict 100000 1 2 0.003 0.000 0.000 0.003 1 5 0.001 0.000 3.720 3.728 Download Download
34 predict 100000 1000 2 1.199 0.016 0.000 0.001 1 1 0.033 0.001 36.765 36.784 Download Download
35 predict 100000 1 2 0.003 0.001 0.000 0.003 1 1 0.001 0.000 3.028 3.037 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: algorithm=kd_tree.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_jobs n_neighbors mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000000 1000000 10 3.164 0.058 0.025 0.0 -1 1 0.802 0.015 3.944 3.944 Download Download
3 fit 1000000 1000000 10 3.277 0.047 0.024 0.0 -1 5 0.797 0.012 4.112 4.113 Download Download
6 fit 1000000 1000000 10 3.242 0.027 0.025 0.0 1 100 0.798 0.015 4.062 4.063 Download Download
9 fit 1000000 1000000 10 3.243 0.022 0.025 0.0 -1 100 0.796 0.005 4.076 4.076 Download Download
12 fit 1000000 1000000 10 3.238 0.014 0.025 0.0 1 5 0.808 0.015 4.006 4.006 Download Download
15 fit 1000000 1000000 10 3.224 0.031 0.025 0.0 1 1 0.803 0.015 4.015 4.016 Download Download
18 fit 1000 1000 2 0.001 0.000 0.026 0.0 -1 1 0.001 0.000 0.525 0.536 Download Download
21 fit 1000 1000 2 0.001 0.000 0.021 0.0 -1 5 0.001 0.000 0.748 0.749 Download Download
24 fit 1000 1000 2 0.001 0.000 0.021 0.0 1 100 0.001 0.000 0.717 0.718 Download Download
27 fit 1000 1000 2 0.001 0.000 0.027 0.0 -1 100 0.001 0.000 0.584 0.585 Download Download
30 fit 1000 1000 2 0.001 0.000 0.024 0.0 1 5 0.001 0.000 0.638 0.639 Download Download
33 fit 1000 1000 2 0.001 0.000 0.025 0.0 1 1 0.001 0.001 0.468 0.576 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_jobs n_neighbors mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 1000000 1000 10 0.463 0.003 0.000 0.000 -1 1 0.105 0.001 4.421 4.421 Download Download
2 predict 1000000 1 10 0.003 0.001 0.000 0.003 -1 1 0.000 0.000 9.379 9.593 Download Download
4 predict 1000000 1000 10 0.865 0.006 0.000 0.001 -1 5 0.190 0.003 4.541 4.542 Download Download
5 predict 1000000 1 10 0.003 0.001 0.000 0.003 -1 5 0.000 0.000 9.748 10.067 Download Download
7 predict 1000000 1000 10 4.840 0.017 0.000 0.005 1 100 0.570 0.003 8.492 8.492 Download Download
8 predict 1000000 1 10 0.003 0.001 0.000 0.003 1 100 0.001 0.000 4.308 4.431 Download Download
10 predict 1000000 1000 10 2.803 0.012 0.000 0.003 -1 100 0.576 0.007 4.865 4.865 Download Download
11 predict 1000000 1 10 0.005 0.001 0.000 0.005 -1 100 0.001 0.000 7.610 7.834 Download Download
13 predict 1000000 1000 10 1.450 0.007 0.000 0.001 1 5 0.190 0.001 7.650 7.650 Download Download
14 predict 1000000 1 10 0.001 0.000 0.000 0.001 1 5 0.000 0.000 3.948 4.113 Download Download
16 predict 1000000 1000 10 0.764 0.004 0.000 0.001 1 1 0.106 0.001 7.220 7.221 Download Download
17 predict 1000000 1 10 0.001 0.000 0.000 0.001 1 1 0.000 0.000 3.757 3.890 Download Download
19 predict 1000 1000 2 0.026 0.001 0.001 0.000 -1 1 0.001 0.000 32.511 32.650 Download Download
20 predict 1000 1 2 0.003 0.000 0.000 0.003 -1 1 0.000 0.000 17.592 18.047 Download Download
22 predict 1000 1000 2 0.028 0.001 0.001 0.000 -1 5 0.001 0.000 33.987 34.040 Download Download
23 predict 1000 1 2 0.003 0.001 0.000 0.003 -1 5 0.000 0.000 17.970 18.713 Download Download
25 predict 1000 1000 2 0.041 0.001 0.000 0.000 1 100 0.005 0.000 7.621 7.621 Download Download
26 predict 1000 1 2 0.001 0.000 0.000 0.001 1 100 0.000 0.000 4.070 4.187 Download Download
28 predict 1000 1000 2 0.041 0.001 0.000 0.000 -1 100 0.005 0.000 7.613 7.613 Download Download
29 predict 1000 1 2 0.002 0.000 0.000 0.002 -1 100 0.000 0.000 14.719 15.131 Download Download
31 predict 1000 1000 2 0.025 0.000 0.001 0.000 1 5 0.001 0.000 29.702 29.916 Download Download
32 predict 1000 1 2 0.001 0.000 0.000 0.001 1 5 0.000 0.000 4.504 4.625 Download Download
34 predict 1000 1000 2 0.023 0.000 0.001 0.000 1 1 0.001 0.000 43.907 44.064 Download Download
35 predict 1000 1 2 0.001 0.000 0.000 0.001 1 1 0.000 0.000 4.398 4.508 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: algorithm=full, n_clusters=3, max_iter=30, n_init=1, tol=1e-16.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter init mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000000 1000000 2 0.567 0.004 0.028 0.0 30 random 0.445 0.019 1.275 1.276 Download Download
3 fit 1000000 1000000 2 0.652 0.018 0.025 0.0 30 k-means++ 0.470 0.023 1.386 1.388 Download Download
6 fit 1000000 1000000 100 5.348 0.451 0.150 0.0 30 random 2.928 0.039 1.826 1.826 Download Download
9 fit 1000000 1000000 100 5.279 0.039 0.152 0.0 30 k-means++ 3.102 0.060 1.702 1.702 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter init mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 1000000 1000 2 0.000 0.0 0.061 0.0 30 random 0.0 0.0 1.065 1.141 Download Download
2 predict 1000000 1 2 0.000 0.0 0.000 0.0 30 random 0.0 0.0 1.291 1.338 Download Download
4 predict 1000000 1000 2 0.000 0.0 0.061 0.0 30 k-means++ 0.0 0.0 1.122 1.198 Download Download
5 predict 1000000 1 2 0.000 0.0 0.000 0.0 30 k-means++ 0.0 0.0 1.298 1.339 Download Download
7 predict 1000000 1000 100 0.001 0.0 1.465 0.0 30 random 0.0 0.0 1.434 1.510 Download Download
8 predict 1000000 1 100 0.000 0.0 0.004 0.0 30 random 0.0 0.0 1.042 1.067 Download Download
10 predict 1000000 1000 100 0.001 0.0 1.515 0.0 30 k-means++ 0.0 0.0 1.554 1.645 Download Download
11 predict 1000000 1 100 0.000 0.0 0.004 0.0 30 k-means++ 0.0 0.0 1.329 1.366 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: algorithm=full, n_clusters=300, max_iter=20, n_init=1, tol=1e-16.

Mismatches between validation scores¶

WARNING! Mismatch between validation scores for 2 predictions (25.0%).
The observed differences can be found in the diff_adjusted_rand_scores column.
The chosen difference threshold is 0.01 for adjusted_rand_score.
The biggest difference is 0.033 for adjusted_rand_score.
See details in the dataframe below.
estimator library diff_adjusted_rand_scores function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter algorithm init max_iter n_clusters n_init tol adjusted_rand_score_sklearn mean_duration_sklearnex std_duration_sklearnex adjusted_rand_score_sklearnex speedup std_speedup
7 sklearn_KMeans_short sklearn 0.032069 predict 10000 1000 100 0.001534 0.000096 0.521390 0.000002 20 full random 20 300 1 1.000000e-16 0.293414 0.001319 0.000107 0.325483 1.163342 1.167189
10 sklearn_KMeans_short sklearn 0.032656 predict 10000 1000 100 0.002627 0.002112 0.304549 0.000003 20 full k-means++ 20 300 1 1.000000e-16 0.283247 0.001299 0.000094 0.315903 2.022165 2.027442

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter init mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 10000 10000 2 0.095 0.002 0.002 0.0 20 random 0.041 0.001 2.330 2.330 Download Download
3 fit 10000 10000 2 0.235 0.002 0.001 0.0 20 k-means++ 0.106 0.002 2.213 2.214 Download Download
6 fit 10000 10000 100 0.231 0.004 0.035 0.0 20 random 0.155 0.002 1.487 1.488 Download Download
9 fit 10000 10000 100 0.657 0.007 0.012 0.0 20 k-means++ 0.372 0.002 1.763 1.763 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter init mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 10000 1000 2 0.001 0.000 0.021 0.0 20 random 0.001 0.0 1.087 1.089 Download Download
2 predict 10000 1 2 0.000 0.000 0.000 0.0 20 random 0.000 0.0 1.215 1.237 Download Download
4 predict 10000 1000 2 0.001 0.000 0.023 0.0 20 k-means++ 0.001 0.0 0.963 0.966 Download Download
5 predict 10000 1 2 0.000 0.000 0.000 0.0 20 k-means++ 0.000 0.0 1.340 1.370 Download Download
7 predict 10000 1000 100 0.002 0.000 0.521 0.0 20 random 0.001 0.0 1.163 1.167 Download Download
8 predict 10000 1 100 0.000 0.000 0.003 0.0 20 random 0.000 0.0 1.239 1.254 Download Download
10 predict 10000 1000 100 0.003 0.002 0.305 0.0 20 k-means++ 0.001 0.0 2.022 2.027 Download Download
11 predict 10000 1 100 0.000 0.000 0.003 0.0 20 k-means++ 0.000 0.0 1.216 1.231 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: penalty=l2, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1.0, class_weight=nan, random_state=nan, solver=lbfgs, max_iter=100, multi_class=auto, verbose=0, warm_start=False, n_jobs=nan, l1_ratio=nan.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000000 1000000 100 11.425 0.231 0.07 0.000 [20] 2.003 0.018 5.703 5.704 Download Download
3 fit 1000 1000 10000 0.797 0.036 0.10 0.001 [27] 0.760 0.032 1.049 1.050 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 1000000 1000 100 0.000 0.0 2.640 0.0 [20] 0.001 0.001 0.400 0.678 Download Download
2 predict 1000000 1 100 0.000 0.0 0.012 0.0 [20] 0.000 0.000 0.306 0.310 Download Download
4 predict 1000 100 10000 0.002 0.0 4.526 0.0 [27] 0.004 0.002 0.404 0.437 Download Download
5 predict 1000 1 10000 0.000 0.0 0.915 0.0 [27] 0.001 0.000 0.109 0.110 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters:

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency copy_X fit_intercept normalize positive mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000 1000 10000 1.413 0.004 0.057 0.001 True True deprecated False 1.616 0.004 0.875 0.875 Download Download
3 fit 1000000 1000000 100 8.471 0.752 0.094 0.000 True True deprecated False 0.210 0.004 40.266 40.275 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency copy_X fit_intercept normalize positive mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 1000 1000 10000 0.01 0.0 7.755 0.0 True True deprecated False 0.017 0.0 0.596 0.596 Download Download
2 predict 1000 10 10000 0.00 0.0 5.516 0.0 True True deprecated False 0.000 0.0 0.452 0.474 Download Download
4 predict 1000000 1000 100 0.00 0.0 5.335 0.0 True True deprecated False 0.001 0.0 0.291 0.324 Download Download
5 predict 1000000 10 100 0.00 0.0 0.134 0.0 True True deprecated False 0.000 0.0 0.371 0.382 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: alpha=1e-06.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000 1000 10000 0.187 0.002 0.429 0.0 0.194 0.001 0.960 0.960 Download Download
3 fit 1000000 1000000 100 1.133 0.004 0.706 0.0 0.249 0.001 4.544 4.544 Download Download

predict

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
1 predict 1000 1000 10000 0.01 0.0 7.745 0.0 0.017 0.000 0.592 0.593 Download Download
2 predict 1000 10 10000 0.00 0.0 5.214 0.0 0.001 0.001 0.301 0.456 Download Download
4 predict 1000000 1000 100 0.00 0.0 5.344 0.0 0.000 0.000 0.483 0.510 Download Download
5 predict 1000000 10 100 0.00 0.0 0.126 0.0 0.000 0.000 0.384 0.401 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters:

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency n_iter angle early_exaggeration init learning_rate method metric min_grad_norm n_components n_iter_without_progress perplexity square_distances verbose mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 1000 1000 3 4.122 0.228 0.0 0.004 1000 0.5 12.0 warn warn barnes_hut euclidean 0.0 2 300 30.0 legacy 0 4.249 0.377 0.97 0.974 Download Download

¶

scikit-learn-intelex (2021.20220207.123530) vs. scikit-learn (1.0.2)

Speedup barplots ¶

All estimators share the following parameters: n_components=10.

Raw results ¶

fit

function n_samples_train n_samples n_features mean_duration_sklearn std_duration_sklearn iteration_throughput latency mean_duration_sklearnex std_duration_sklearnex speedup std_speedup sklearn_profiling sklearnex_profiling
0 fit 100000 100000 100 0.476 0.004 0.168 0.0 0.031 0.005 15.282 15.508 Download Download
1 fit 10000 10000 1000 0.409 0.003 0.196 0.0 0.214 0.007 1.913 1.914 Download Download

Benchmark environment information¶

System¶

python 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07) [GCC 9.4.0]
executable /usr/share/miniconda/envs/sklbench/bin/python
machine Linux-5.11.0-1028-azure-x86_64-with-glibc2.10

Dependencies¶

version
pip 22.0.4
setuptools 60.9.3
sklearn 1.0.2
numpy 1.22.3
scipy 1.8.0
Cython None
pandas 1.4.1
matplotlib 3.5.1
joblib 1.1.0
threadpoolctl 3.1.0

Threadpool¶

user_api internal_api prefix filepath version threading_layer architecture num_threads
0 blas openblas libopenblas /usr/share/miniconda/envs/sklbench/lib/libopenblasp-r0.3.18.so 0.3.18 pthreads SkylakeX 2
1 openmp openmp libgomp /usr/share/miniconda/envs/sklbench/lib/libgomp.so.1.0.0 None NaN NaN 2

CPU count¶

cpu_count 2
physical_cpu_count 2