Skip to content
Snippets Groups Projects
Commit f2ad7231 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

more explanation in composer guide

parent 21c0ba7f
Branches fma
1 merge request!24Extend Support for CUDA and HIP kernel invocations
Pipeline #75684 passed with stages
in 3 minutes and 30 seconds
...@@ -379,9 +379,16 @@ with SourceFileGenerator(sfg_config) as sfg: ...@@ -379,9 +379,16 @@ with SourceFileGenerator(sfg_config) as sfg:
sfg.function("kernel_wrapper")( sfg.function("kernel_wrapper")(
sfg.gpu_invoke(khandle) 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 #### Mapping Fields to Data Structures
Pystencils kernels operate on n-dimensional contiguous or strided arrays, Pystencils kernels operate on n-dimensional contiguous or strided arrays,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment