Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils-sfg
Commits
f2ad7231
Commit
f2ad7231
authored
4 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
more explanation in composer guide
parent
21c0ba7f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!24
Extend Support for CUDA and HIP kernel invocations
Pipeline
#75684
passed
4 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/usage/how_to_composer.md
+8
-1
8 additions, 1 deletion
docs/source/usage/how_to_composer.md
with
8 additions
and
1 deletion
docs/source/usage/how_to_composer.md
+
8
−
1
View file @
f2ad7231
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment