From 879ee872a994c4b220e7403a361ecc8c5361d102 Mon Sep 17 00:00:00 2001
From: Christoph Alt <christoph.alt@fau.de>
Date: Mon, 11 Sep 2023 14:55:38 +0200
Subject: [PATCH] removed the unused `cuda_block_size` for the
 `gpu.generate_benchmark` function. For now the only way to set the
 cuda_block_size size is to use pass it in the `ps.KernelConfig` to the
 generated kernel

---
 pystencils_benchmark/gpu/benchmark.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/pystencils_benchmark/gpu/benchmark.py b/pystencils_benchmark/gpu/benchmark.py
index 96fb58c..1e9ce37 100644
--- a/pystencils_benchmark/gpu/benchmark.py
+++ b/pystencils_benchmark/gpu/benchmark.py
@@ -32,7 +32,6 @@ def generate_benchmark(kernel_asts: Union[KernelFunction, List[KernelFunction]],
                        *,
                        compiler: Compiler = Compiler.NVCC,
                        timing: bool = True,
-                       cuda_block_size: tuple = (32, 1, 1),
                        launch_bounds: tuple = None,
                        ) -> None:
 
@@ -58,22 +57,19 @@ def generate_benchmark(kernel_asts: Union[KernelFunction, List[KernelFunction]],
             f.write(source)
 
     with open(src_path / 'main.cu', 'w+') as f:
-        f.write(kernel_main(kernel_asts,
-                            timing=timing,
-                            cuda_block_size=cuda_block_size))
+        f.write(kernel_main(kernel_asts, timing=timing))
 
     copy_static_files(path, source_file_suffix='.cu')
     compiler_toolchain(path, compiler, likwid=False)
 
 
-def kernel_main(kernels_ast: List[KernelFunction], *, timing: bool = True, cuda_block_size: tuple):
+def kernel_main(kernels_ast: List[KernelFunction], *, timing: bool = True):
     """
     Return C code of a benchmark program for the given kernel.
 
     Args:
         kernels_ast: A list of the pystencils AST object as returned by create_kernel for benchmarking
         timing: add timing output to the code, prints time per iteration to stdout
-        cuda_block_size: defines the cuda block grid
     Returns:
         C code as string
     """
-- 
GitLab