From f2ad7231a50c375fbc3bbee9f27fbff7cde704c5 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Tue, 11 Mar 2025 11:35:06 +0100 Subject: [PATCH] more explanation in composer guide --- docs/source/usage/how_to_composer.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/source/usage/how_to_composer.md b/docs/source/usage/how_to_composer.md index 4610d07..d21d46f 100644 --- a/docs/source/usage/how_to_composer.md +++ b/docs/source/usage/how_to_composer.md @@ -379,9 +379,16 @@ with SourceFileGenerator(sfg_config) as sfg: sfg.function("kernel_wrapper")( sfg.gpu_invoke(khandle) ) - ``` +In this snippet, we used the [generator configuration](#how_to_generator_scripts_config) +to change the suffix of the generated implementation file to `.cu`. + +When investigating the generated `.cu` file, you can see that the GPU launch configuration parameters +*grid size* and *block size* are being computed automatically from the array sizes. +This behavior can be changed by modifying options in the {any}`gpu <pystencils.codegen.config.GpuOptions>` +category of the `CreateKernelConfig`. + #### Mapping Fields to Data Structures Pystencils kernels operate on n-dimensional contiguous or strided arrays, -- GitLab