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/20220313T221146/"
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.187 0.014 0.067 0.0 -1 1 0.038 0.006 30.883 31.207 Download Download
3 fit 100000 100000 100 1.152 0.010 0.069 0.0 -1 5 0.037 0.000 31.476 31.477 Download Download
6 fit 100000 100000 100 1.167 0.014 0.069 0.0 1 100 0.037 0.001 31.479 31.482 Download Download
9 fit 100000 100000 100 1.156 0.011 0.069 0.0 -1 100 0.037 0.001 31.073 31.078 Download Download
12 fit 100000 100000 100 1.144 0.015 0.070 0.0 1 5 0.037 0.001 30.964 30.967 Download Download
15 fit 100000 100000 100 1.154 0.015 0.069 0.0 1 1 0.037 0.001 31.455 31.458 Download Download
18 fit 100000 100000 2 0.046 0.001 0.035 0.0 -1 1 0.008 0.000 5.704 5.709 Download Download
21 fit 100000 100000 2 0.045 0.000 0.035 0.0 -1 5 0.008 0.000 5.598 5.599 Download Download
24 fit 100000 100000 2 0.046 0.000 0.035 0.0 1 100 0.008 0.000 5.633 5.633 Download Download
27 fit 100000 100000 2 0.045 0.000 0.035 0.0 -1 100 0.008 0.000 5.607 5.608 Download Download
30 fit 100000 100000 2 0.046 0.000 0.035 0.0 1 5 0.008 0.000 5.649 5.650 Download Download
33 fit 100000 100000 2 0.045 0.000 0.035 0.0 1 1 0.008 0.000 5.579 5.580 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 1.711 0.261 0.000 0.002 -1 1 0.191 0.004 8.951 8.953 Download Download
2 predict 100000 1 100 0.018 0.001 0.000 0.018 -1 1 0.006 0.000 2.993 2.997 Download Download
4 predict 100000 1000 100 2.444 0.026 0.000 0.002 -1 5 0.192 0.001 12.745 12.745 Download Download
5 predict 100000 1 100 0.020 0.001 0.000 0.020 -1 5 0.006 0.000 3.184 3.187 Download Download
7 predict 100000 1000 100 1.960 0.003 0.000 0.002 1 100 0.231 0.007 8.470 8.473 Download Download
8 predict 100000 1 100 0.017 0.000 0.000 0.017 1 100 0.006 0.000 2.724 2.724 Download Download
10 predict 100000 1000 100 2.436 0.023 0.000 0.002 -1 100 0.229 0.001 10.645 10.645 Download Download
11 predict 100000 1 100 0.019 0.001 0.000 0.019 -1 100 0.006 0.000 2.944 2.945 Download Download
13 predict 100000 1000 100 1.941 0.011 0.000 0.002 1 5 0.191 0.000 10.160 10.160 Download Download
14 predict 100000 1 100 0.016 0.000 0.000 0.016 1 5 0.006 0.000 2.637 2.638 Download Download
16 predict 100000 1000 100 1.088 0.003 0.001 0.001 1 1 0.190 0.000 5.730 5.730 Download Download
17 predict 100000 1 100 0.017 0.002 0.000 0.017 1 1 0.006 0.000 2.750 2.751 Download Download
19 predict 100000 1000 2 1.412 0.015 0.000 0.001 -1 1 0.029 0.001 49.064 49.088 Download Download
20 predict 100000 1 2 0.004 0.001 0.000 0.004 -1 1 0.001 0.000 5.663 5.688 Download Download
22 predict 100000 1000 2 2.323 0.024 0.000 0.002 -1 5 0.030 0.000 78.304 78.304 Download Download
23 predict 100000 1 2 0.006 0.003 0.000 0.006 -1 5 0.001 0.000 7.492 7.638 Download Download
25 predict 100000 1000 2 1.899 0.005 0.000 0.002 1 100 0.066 0.000 28.667 28.667 Download Download
26 predict 100000 1 2 0.003 0.000 0.000 0.003 1 100 0.001 0.000 3.740 3.758 Download Download
28 predict 100000 1000 2 2.331 0.026 0.000 0.002 -1 100 0.066 0.000 35.192 35.193 Download Download
29 predict 100000 1 2 0.005 0.001 0.000 0.005 -1 100 0.001 0.000 6.306 6.348 Download Download
31 predict 100000 1000 2 1.884 0.002 0.000 0.002 1 5 0.030 0.000 63.323 63.323 Download Download
32 predict 100000 1 2 0.003 0.000 0.000 0.003 1 5 0.001 0.000 4.154 4.180 Download Download
34 predict 100000 1000 2 0.961 0.004 0.000 0.001 1 1 0.029 0.000 33.703 33.704 Download Download
35 predict 100000 1 2 0.002 0.000 0.000 0.002 1 1 0.001 0.000 2.626 2.640 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 2.102 0.032 0.038 0.0 -1 1 0.629 0.020 3.341 3.343 Download Download
3 fit 1000000 1000000 10 2.085 0.029 0.038 0.0 -1 5 0.651 0.026 3.202 3.205 Download Download
6 fit 1000000 1000000 10 2.096 0.011 0.038 0.0 1 100 0.615 0.008 3.409 3.409 Download Download
9 fit 1000000 1000000 10 2.087 0.011 0.038 0.0 -1 100 0.632 0.026 3.303 3.306 Download Download
12 fit 1000000 1000000 10 2.090 0.030 0.038 0.0 1 5 0.633 0.030 3.303 3.307 Download Download
15 fit 1000000 1000000 10 2.085 0.023 0.038 0.0 1 1 0.618 0.015 3.374 3.375 Download Download
18 fit 1000 1000 2 0.000 0.000 0.033 0.0 -1 1 0.001 0.000 0.588 0.590 Download Download
21 fit 1000 1000 2 0.000 0.000 0.034 0.0 -1 5 0.001 0.000 0.605 0.606 Download Download
24 fit 1000 1000 2 0.000 0.000 0.033 0.0 1 100 0.001 0.000 0.609 0.611 Download Download
27 fit 1000 1000 2 0.000 0.000 0.033 0.0 -1 100 0.001 0.000 0.609 0.610 Download Download
30 fit 1000 1000 2 0.000 0.000 0.032 0.0 1 5 0.001 0.000 0.606 0.607 Download Download
33 fit 1000 1000 2 0.000 0.000 0.033 0.0 1 1 0.001 0.000 0.600 0.601 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.361 0.003 0.000 0.000 -1 1 0.074 0.000 4.876 4.877 Download Download
2 predict 1000000 1 10 0.002 0.000 0.000 0.002 -1 1 0.000 0.000 9.754 10.107 Download Download
4 predict 1000000 1000 10 0.675 0.004 0.000 0.001 -1 5 0.133 0.002 5.074 5.075 Download Download
5 predict 1000000 1 10 0.002 0.000 0.000 0.002 -1 5 0.000 0.000 9.016 9.327 Download Download
7 predict 1000000 1000 10 3.688 0.040 0.000 0.004 1 100 0.404 0.004 9.139 9.139 Download Download
8 predict 1000000 1 10 0.002 0.000 0.000 0.002 1 100 0.001 0.000 4.402 4.469 Download Download
10 predict 1000000 1000 10 2.212 0.008 0.000 0.002 -1 100 0.405 0.003 5.466 5.467 Download Download
11 predict 1000000 1 10 0.004 0.001 0.000 0.004 -1 100 0.001 0.000 6.949 7.068 Download Download
13 predict 1000000 1000 10 1.105 0.012 0.000 0.001 1 5 0.133 0.002 8.317 8.318 Download Download
14 predict 1000000 1 10 0.001 0.000 0.000 0.001 1 5 0.000 0.000 3.927 4.119 Download Download
16 predict 1000000 1000 10 0.596 0.009 0.000 0.001 1 1 0.073 0.001 8.172 8.172 Download Download
17 predict 1000000 1 10 0.001 0.000 0.000 0.001 1 1 0.000 0.000 3.895 4.124 Download Download
19 predict 1000 1000 2 0.019 0.000 0.001 0.000 -1 1 0.001 0.000 35.637 35.778 Download Download
20 predict 1000 1 2 0.002 0.000 0.000 0.002 -1 1 0.000 0.000 16.615 17.193 Download Download
22 predict 1000 1000 2 0.020 0.000 0.001 0.000 -1 5 0.001 0.000 30.024 30.130 Download Download
23 predict 1000 1 2 0.002 0.000 0.000 0.002 -1 5 0.000 0.000 16.313 16.820 Download Download
25 predict 1000 1000 2 0.032 0.000 0.000 0.000 1 100 0.005 0.000 6.569 6.569 Download Download
26 predict 1000 1 2 0.001 0.000 0.000 0.001 1 100 0.000 0.000 4.132 4.245 Download Download
28 predict 1000 1000 2 0.032 0.000 0.001 0.000 -1 100 0.005 0.000 6.551 6.551 Download Download
29 predict 1000 1 2 0.002 0.000 0.000 0.002 -1 100 0.000 0.000 16.266 16.888 Download Download
31 predict 1000 1000 2 0.019 0.000 0.001 0.000 1 5 0.001 0.000 28.384 28.560 Download Download
32 predict 1000 1 2 0.000 0.000 0.000 0.000 1 5 0.000 0.000 4.452 4.622 Download Download
34 predict 1000 1000 2 0.018 0.000 0.001 0.000 1 1 0.000 0.000 44.023 44.673 Download Download
35 predict 1000 1 2 0.000 0.000 0.000 0.000 1 1 0.000 0.000 4.464 4.633 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.457 0.002 0.035 0.0 30 random 0.426 0.020 1.072 1.073 Download Download
3 fit 1000000 1000000 2 0.531 0.015 0.030 0.0 30 k-means++ 0.460 0.023 1.154 1.155 Download Download
6 fit 1000000 1000000 100 4.370 0.383 0.183 0.0 30 random 2.293 0.007 1.905 1.905 Download Download
9 fit 1000000 1000000 100 4.256 0.016 0.188 0.0 30 k-means++ 2.458 0.011 1.731 1.731 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.0 0.0 0.085 0.0 30 random 0.0 0.0 1.271 1.402 Download Download
2 predict 1000000 1 2 0.0 0.0 0.000 0.0 30 random 0.0 0.0 1.230 1.269 Download Download
4 predict 1000000 1000 2 0.0 0.0 0.085 0.0 30 k-means++ 0.0 0.0 1.277 1.415 Download Download
5 predict 1000000 1 2 0.0 0.0 0.000 0.0 30 k-means++ 0.0 0.0 1.244 1.287 Download Download
7 predict 1000000 1000 100 0.0 0.0 2.148 0.0 30 random 0.0 0.0 1.455 1.533 Download Download
8 predict 1000000 1 100 0.0 0.0 0.005 0.0 30 random 0.0 0.0 1.214 1.246 Download Download
10 predict 1000000 1000 100 0.0 0.0 2.187 0.0 30 k-means++ 0.0 0.0 1.393 1.469 Download Download
11 predict 1000000 1 100 0.0 0.0 0.005 0.0 30 k-means++ 0.0 0.0 1.244 1.279 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.001574 0.000448 0.508115 0.000002 20 full random 20 300 1 1.000000e-16 0.293414 0.001060 0.000076 0.325483 1.485241 1.489065
10 sklearn_KMeans_short sklearn 0.032656 predict 10000 1000 100 0.001472 0.000134 0.543638 0.000001 20 full k-means++ 20 300 1 1.000000e-16 0.283247 0.001096 0.000141 0.315903 1.342217 1.353242

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.115 0.009 0.001 0.0 20 random 0.030 0.002 3.812 3.819 Download Download
3 fit 10000 10000 2 0.233 0.002 0.001 0.0 20 k-means++ 0.085 0.001 2.743 2.743 Download Download
6 fit 10000 10000 100 0.242 0.002 0.033 0.0 20 random 0.146 0.001 1.659 1.659 Download Download
9 fit 10000 10000 100 0.631 0.013 0.013 0.0 20 k-means++ 0.423 0.002 1.489 1.489 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.0 0.023 0.0 20 random 0.001 0.0 1.266 1.267 Download Download
2 predict 10000 1 2 0.000 0.0 0.000 0.0 20 random 0.000 0.0 1.240 1.273 Download Download
4 predict 10000 1000 2 0.001 0.0 0.023 0.0 20 k-means++ 0.001 0.0 1.193 1.197 Download Download
5 predict 10000 1 2 0.000 0.0 0.000 0.0 20 k-means++ 0.000 0.0 1.208 1.243 Download Download
7 predict 10000 1000 100 0.002 0.0 0.508 0.0 20 random 0.001 0.0 1.485 1.489 Download Download
8 predict 10000 1 100 0.000 0.0 0.004 0.0 20 random 0.000 0.0 1.315 1.344 Download Download
10 predict 10000 1000 100 0.001 0.0 0.544 0.0 20 k-means++ 0.001 0.0 1.342 1.353 Download Download
11 predict 10000 1 100 0.000 0.0 0.004 0.0 20 k-means++ 0.000 0.0 1.276 1.314 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 9.448 0.139 0.085 0.000 [20] 1.636 0.009 5.774 5.774 Download Download
3 fit 1000 1000 10000 0.658 0.026 0.122 0.001 [27] 0.526 0.040 1.252 1.255 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 3.452 0.0 [20] 0.001 0.001 0.398 0.717 Download Download
2 predict 1000000 1 100 0.000 0.0 0.015 0.0 [20] 0.000 0.000 0.333 0.345 Download Download
4 predict 1000 100 10000 0.001 0.0 5.510 0.0 [27] 0.004 0.000 0.368 0.369 Download Download
5 predict 1000 1 10000 0.000 0.0 1.242 0.0 [27] 0.001 0.000 0.113 0.113 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.100 0.007 0.073 0.001 True True deprecated False 1.101 0.005 0.999 0.999 Download Download
3 fit 1000000 1000000 100 6.196 0.415 0.129 0.000 True True deprecated False 0.198 0.004 31.288 31.294 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.008 0.0 10.371 0.0 True True deprecated False 0.013 0.0 0.609 0.609 Download Download
2 predict 1000 10 10000 0.000 0.0 6.555 0.0 True True deprecated False 0.000 0.0 0.484 0.496 Download Download
4 predict 1000000 1000 100 0.000 0.0 7.024 0.0 True True deprecated False 0.000 0.0 0.289 0.324 Download Download
5 predict 1000000 10 100 0.000 0.0 0.161 0.0 True True deprecated False 0.000 0.0 0.373 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.168 0.005 0.478 0.0 0.170 0.001 0.986 0.986 Download Download
3 fit 1000000 1000000 100 0.883 0.007 0.906 0.0 0.226 0.003 3.909 3.909 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.008 0.0 10.365 0.0 0.013 0.000 0.598 0.598 Download Download
2 predict 1000 10 10000 0.000 0.0 6.954 0.0 0.001 0.001 0.169 0.332 Download Download
4 predict 1000000 1000 100 0.000 0.0 7.067 0.0 0.000 0.000 0.439 0.467 Download Download
5 predict 1000000 10 100 0.000 0.0 0.164 0.0 0.000 0.000 0.358 0.368 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 3.277 0.147 0.0 0.003 1000 0.5 12.0 warn warn barnes_hut euclidean 0.0 2 300 30.0 legacy 0 3.381 0.297 0.969 0.973 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.373 0.009 0.214 0.0 0.025 0.004 14.667 14.870 Download Download
1 fit 10000 10000 1000 0.325 0.007 0.246 0.0 0.192 0.003 1.687 1.688 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