Skip to content

Commit

Permalink
Do not confusely display 'numpy' as a compute runtime (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharras authored Oct 24, 2023
1 parent 617fcfa commit 6101c27
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions benchmarks/kmeans/results.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Benchmark id,Dtype,Nb data samples,Nb data features,Nb clusters,Init type,Data sample weights,Walltime,Backend provider,Compute device,Compute runtime,Nb cpus,Cpu name,Gpu name,RAM (GB),Platform,Platform architecture,Platform release,Run date,Version info,Comment,Result nb iterations,Result inertia,Data random state,Solver random state
d100dd1c,float32,50000000,14,127,random,None,5.36,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,267392288.0,123,123
d100dd1c,float32,50000000,14,127,random,None,8.32,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,267392260.0,123,123
d100dd1c,float32,50000000,14,127,random,None,8.32,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,267392260.0,123,123
d100dd1c,float32,50000000,14,127,random,None,9.05,cuml,gpu,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,cuml 23.8.0,TODO: check it runs Lloyd ?,101,267388064.0,123,123
d100dd1c,float32,50000000,14,127,random,None,12.4,kmeans-dpcpp,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-09,dev,,100,267392256.0,123,123
d100dd1c,float32,50000000,14,127,random,None,28.2,sklearn-pytorch-engine,cuda,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,267392288.0,123,123
Expand All @@ -19,7 +19,7 @@ d100dd1c,float32,50000000,14,127,random,None,966,sklearn-pytorch-engine,cpu,,64,
8a3b498a,float32,50000000,14,127,random,random,186,kmeans-dpcpp,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-09,dev,,100,133726376.0,123,123
8a3b498a,float32,50000000,14,127,random,random,542,sklearn-numba-dpex,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,Not optimized for CPU.,100,429838976.0,123,123
8a3b498a,float32,50000000,14,127,random,random,977,sklearn-pytorch-engine,cpu,,64,AMD EPYC 7742 64-Core Processor,,1007,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-14,sklearn-pytorch-engine dev; torch 2.1.0,,100,133726048.0,123,123
e8a8e807,float32,50000000,14,127,k-means++,None,13,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,267389460.0,123,123
e8a8e807,float32,50000000,14,127,k-means++,None,13,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,267389460.0,123,123
e8a8e807,float32,50000000,14,127,k-means++,None,37.8,sklearn-pytorch-engine,cuda,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,267390224.0,123,123
e8a8e807,float32,50000000,14,127,k-means++,None,177,sklearn-pytorch-engine,xpu,,224,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-13,sklearn-pytorch-engine dev; torch 1.13.0a0+git6c9b55e; ipex 1.13.120+xpu,,100,267388976.0,123,123
e8a8e807,float32,50000000,14,127,k-means++,None,214,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,267531648.0,123,123
Expand All @@ -32,7 +32,7 @@ e8a8e807,float32,50000000,14,127,k-means++,None,1220,sklearn-pytorch-engine,cpu,
9920bee3,float32,50000000,14,127,k-means++,random,771,scikit-learn,,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn 1.3.0,,100,133709264.0,123,123
9920bee3,float32,50000000,14,127,k-means++,random,799,sklearn-numba-dpex,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,Not optimized for CPU.,100,519604800.0,123,123
9920bee3,float32,50000000,14,127,k-means++,random,1210,sklearn-pytorch-engine,cpu,,64,AMD EPYC 7742 64-Core Processor,,1007,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-14,sklearn-pytorch-engine dev; torch 2.1.0,,100,133700056.0,123,123
d3535c07,float32,10000000,14,127,random,None,1.66,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,53474024.0,123,123
d3535c07,float32,10000000,14,127,random,None,1.66,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,53474024.0,123,123
d3535c07,float32,10000000,14,127,random,None,1.98,cuml,gpu,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,cuml 23.8.0,TODO: check it runs Lloyd ?,101,53473156.0,123,123
d3535c07,float32,10000000,14,127,random,None,3.59,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,53474008.0,123,123
d3535c07,float32,10000000,14,127,random,None,4.64,kmeans-dpcpp,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-09,dev,,100,53474032.0,123,123
Expand All @@ -52,7 +52,7 @@ e9fb2542,float32,10000000,14,127,random,random,22.4,sklearn-pytorch-engine,xpu,,
e9fb2542,float32,10000000,14,127,random,random,43.4,kmeans-dpcpp,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-09,dev,,100,26728440.0,123,123
e9fb2542,float32,10000000,14,127,random,random,121,sklearn-numba-dpex,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,Not optimized for CPU.,100,104161736.0,123,123
e9fb2542,float32,10000000,14,127,random,random,196,sklearn-pytorch-engine,cpu,,64,AMD EPYC 7742 64-Core Processor,,1007,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-14,sklearn-pytorch-engine dev; torch 2.1.0,,100,26728460.0,123,123
5b29b557,float32,10000000,14,127,k-means++,None,2.63,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,53468250.0,123,123
5b29b557,float32,10000000,14,127,k-means++,None,2.63,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,53468250.0,123,123
5b29b557,float32,10000000,14,127,k-means++,None,7.32,sklearn-pytorch-engine,cuda,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,53476752.0,123,123
5b29b557,float32,10000000,14,127,k-means++,None,34,sklearn-pytorch-engine,xpu,,224,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-13,sklearn-pytorch-engine dev; torch 1.13.0a0+git6c9b55e; ipex 1.13.120+xpu,,100,53466160.0,123,123
5b29b557,float32,10000000,14,127,k-means++,None,49.1,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,53482060.0,123,123
Expand All @@ -66,7 +66,7 @@ e9fb2542,float32,10000000,14,127,random,random,196,sklearn-pytorch-engine,cpu,,6
00047a47,float32,10000000,14,127,k-means++,random,153,sklearn-numba-dpex,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,Not optimized for CPU.,100,169065104.0,123,123
00047a47,float32,10000000,14,127,k-means++,random,241,sklearn-pytorch-engine,cpu,,64,AMD EPYC 7742 64-Core Processor,,1007,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-14,sklearn-pytorch-engine dev; torch 2.1.0,,100,26729392.0,123,123
9a20a3a6,float32,1000000,14,127,random,None,0.189,cuml,gpu,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,cuml 23.8.0,TODO: check it runs Lloyd ?,101,5345060.0,123,123
9a20a3a6,float32,1000000,14,127,random,None,0.198,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,5345163.5,123,123
9a20a3a6,float32,1000000,14,127,random,None,0.198,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,5345163.5,123,123
9a20a3a6,float32,1000000,14,127,random,None,0.594,sklearn-pytorch-engine,cuda,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,5345148.0,123,123
9a20a3a6,float32,1000000,14,127,random,None,0.856,scikit-learn,,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn 1.3.0,,100,5345157.0,123,123
9a20a3a6,float32,1000000,14,127,random,None,1.69,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,5345147.5,123,123
Expand All @@ -91,7 +91,7 @@ e9fb2542,float32,10000000,14,127,random,random,196,sklearn-pytorch-engine,cpu,,6
7c25e932,float32,1000000,14,127,random,random,19.8,sklearn-numba-dpex,cpu,opencl,64,Intel(R) Xeon(R) Platinum 8480L,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,Not optimized for CPU.,100,9888284.0,123,123
7c25e932,float32,1000000,14,127,random,random,23.2,sklearn-pytorch-engine,cpu,,64,AMD EPYC 7742 64-Core Processor,,1007,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-14,sklearn-pytorch-engine dev; torch 2.1.0,,100,2671355.25,123,123
7c25e932,float32,1000000,14,127,random,random,151,sklearn-pytorch-engine,mps,,8,Apple M1,Apple M1,16,Darwin,arm64,23.0.0,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,2671363.5,123,123
d93db8bf,float32,1000000,14,127,k-means++,None,0.275,scikit-learn-intelex,cpu,numpy,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,5345824.0,123,123
d93db8bf,float32,1000000,14,127,k-means++,None,0.275,scikit-learn-intelex,cpu,,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-12,scikit-learn-intelex 2023.2.1,,100,5345824.0,123,123
d93db8bf,float32,1000000,14,127,k-means++,None,0.774,sklearn-pytorch-engine,cuda,,2,Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz,NVIDIA A100-PCIE-40GB,377,Linux,x86_64,4.18.0-394.el8.x86_64,2023-10-11,sklearn-pytorch-engine dev; torch 2.1.0,,100,5345201.5,123,123
d93db8bf,float32,1000000,14,127,k-means++,None,3.08,sklearn-pytorch-engine,xpu,,224,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-88-generic,2023-10-13,sklearn-pytorch-engine dev; torch 1.13.0a0+git6c9b55e; ipex 1.13.120+xpu,,100,5344330.0,123,123
d93db8bf,float32,1000000,14,127,k-means++,None,6.2,sklearn-numba-dpex,gpu,level_zero,64,Intel(R) Xeon(R) Platinum 8480+,Intel(R) Data Center GPU Max 1100 (x4),504,Linux,x86_64,5.15.0-83-generic,2023-10-08,sklearn-numba-dpex dev; numba-dpex 0.22.0.dev0+2.g511241f1,,100,5344455.0,123,123
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/kmeans/solvers/scikit_learn_intelex.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class Solver(BaseSolver):

parameters = {
"device, runtime": [
("cpu", "numpy"),
("cpu", None), # TODO: replace "None" with "opencl" if relevant
("gpu", "level_zero"),
]
}

stopping_criterion = SingleRunCriterion(1)

def skip(self, **objective_dict):
if self.runtime != "numpy":
if self.runtime is not None:
try:
device = dpctl.SyclDevice(f"{self.runtime}:{self.device}")
except Exception:
Expand Down Expand Up @@ -90,7 +90,7 @@ def set_objective(
# issue at
# https://github.com/intel/scikit-learn-intelex/issues/1534#issuecomment-1766266299 # noqa

# if self.runtime != "numpy":
# if self.runtime is not None:
# device = device = dpctl.SyclDevice(f"{self.runtime}:{self.device}")
# self.X = dpt.asarray(X, copy=True, device=device)

Expand Down Expand Up @@ -138,7 +138,7 @@ def warm_up(self):
).fit(self.X, y=None, sample_weight=self.sample_weight)

def run(self, _):
with nullcontext() if (self.runtime == "numpy") else config_context(
with nullcontext() if (self.runtime is None) else config_context(
target_offload=f"{self.runtime}:{self.device}"
):
estimator = KMeans(
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/pca/solvers/scikit_learn_intelex.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Solver(BaseSolver):

parameters = {
"device, runtime": [
("cpu", "numpy"),
("cpu", None), # TODO: replace "None" with "opencl" if relevant
("gpu", "level_zero"),
],
"svd_solver, power_iteration_normalizer": [
Expand All @@ -38,7 +38,7 @@ class Solver(BaseSolver):
stopping_criterion = SingleRunCriterion(1)

def skip(self, **objective_dict):
if self.runtime != "numpy":
if self.runtime is not None:
try:
device = dpctl.SyclDevice(f"{self.runtime}:{self.device}")
except Exception:
Expand Down Expand Up @@ -106,7 +106,7 @@ def run(self, _):
if power_iteration_normalizer is None:
power_iteration_normalizer = "auto"

with nullcontext() if (self.runtime == "numpy") else config_context(
with nullcontext() if (self.runtime is None) else config_context(
target_offload=f"{self.runtime}:{self.device}"
):
estimator = PCA(
Expand Down

0 comments on commit 6101c27

Please sign in to comment.