From fae8ffc08418437bdb273c77e8ae9a00fb28e80b Mon Sep 17 00:00:00 2001 From: jeanfeydy Date: Tue, 23 Mar 2021 14:10:16 +0000 Subject: [PATCH] Update the number of loops in the benchmarks. --- pykeops/benchmarks/benchmark_utils.py | 8 ++------ pykeops/benchmarks/plot_accuracy.py | 1 + pykeops/benchmarks/plot_benchmark_convolutions.py | 2 +- pykeops/benchmarks/plot_benchmark_grad1convolutions.py | 1 + pykeops/benchmarks/plot_benchmark_high_dimension.py | 1 + pykeops/benchmarks/plot_benchmark_invkernel.py | 1 + pykeops/benchmarks/plot_benchmarks_convolutions_3D.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pykeops/benchmarks/benchmark_utils.py b/pykeops/benchmarks/benchmark_utils.py index b6b5c9c8c..746b26f56 100644 --- a/pykeops/benchmarks/benchmark_utils.py +++ b/pykeops/benchmarks/benchmark_utils.py @@ -292,11 +292,7 @@ def benchmark( # Actual benchmark: elapsed = benchmark_loop(N, loops, routine, max_time, args, kwargs) - - if True: - return elapsed - else: - q.put(elapsed) + return elapsed def bench_config( @@ -332,7 +328,7 @@ def bench_config( times.append(elapsed) if (nloops * elapsed > max_time) or ( - nloops * elapsed > red_time / 10 and len(Nloops) > 0 + nloops * elapsed > red_time and len(Nloops) > 0 ): nloops = Nloops.pop(0) diff --git a/pykeops/benchmarks/plot_accuracy.py b/pykeops/benchmarks/plot_accuracy.py index 2570a1e62..287ce70e0 100644 --- a/pykeops/benchmarks/plot_accuracy.py +++ b/pykeops/benchmarks/plot_accuracy.py @@ -4,6 +4,7 @@ We test various options of KeOps regarding accuracy of computations. + """ diff --git a/pykeops/benchmarks/plot_benchmark_convolutions.py b/pykeops/benchmarks/plot_benchmark_convolutions.py index 255d0245d..8d7c7a19e 100644 --- a/pykeops/benchmarks/plot_benchmark_convolutions.py +++ b/pykeops/benchmarks/plot_benchmark_convolutions.py @@ -11,7 +11,7 @@ where :math:`f` is a Gauss or Cauchy or Laplace or inverse multiquadric kernel. See e.g. `wikipedia `_ - + """ ##################################################################### diff --git a/pykeops/benchmarks/plot_benchmark_grad1convolutions.py b/pykeops/benchmarks/plot_benchmark_grad1convolutions.py index 43c092873..8efb3cb4f 100644 --- a/pykeops/benchmarks/plot_benchmark_grad1convolutions.py +++ b/pykeops/benchmarks/plot_benchmark_grad1convolutions.py @@ -12,6 +12,7 @@ where :math:`f` is a Gauss or Cauchy or Laplace or inverse multiquadric kernel. See e.g. `wikipedia `_ + """ ##################################################################### diff --git a/pykeops/benchmarks/plot_benchmark_high_dimension.py b/pykeops/benchmarks/plot_benchmark_high_dimension.py index 373963a2a..23fd21f16 100644 --- a/pykeops/benchmarks/plot_benchmark_high_dimension.py +++ b/pykeops/benchmarks/plot_benchmark_high_dimension.py @@ -6,6 +6,7 @@ simple Gaussian RBF kernel products, as the dimension grows. + """ diff --git a/pykeops/benchmarks/plot_benchmark_invkernel.py b/pykeops/benchmarks/plot_benchmark_invkernel.py index 9472b7a7b..cc1873fbf 100644 --- a/pykeops/benchmarks/plot_benchmark_invkernel.py +++ b/pykeops/benchmarks/plot_benchmark_invkernel.py @@ -25,6 +25,7 @@ and `Falkon `_ libraries, which rely on a KeOps backend whenever relevant. + """ ##################################################################### diff --git a/pykeops/benchmarks/plot_benchmarks_convolutions_3D.py b/pykeops/benchmarks/plot_benchmarks_convolutions_3D.py index 0a4818e68..4e9d53f3b 100644 --- a/pykeops/benchmarks/plot_benchmarks_convolutions_3D.py +++ b/pykeops/benchmarks/plot_benchmarks_convolutions_3D.py @@ -13,7 +13,7 @@ First support for these approximation schemes is scheduled for May-June 2021. - + """