Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
Model registry
Operate
Environments
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
Commits
c6e2ec20
Commit
c6e2ec20
authored
5 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
update codegen module docs
parent
a9ce0ab8
No related branches found
No related tags found
1 merge request
!433
Consolidate codegen and JIT modules.
Pipeline
#71133
passed
5 months ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/Makefile
+1
-6
1 addition, 6 deletions
docs/Makefile
docs/source/api/codegen.rst
+18
-3
18 additions, 3 deletions
docs/source/api/codegen.rst
src/pystencils/codegen/driver.py
+15
-0
15 additions, 0 deletions
src/pystencils/codegen/driver.py
with
34 additions
and
9 deletions
docs/Makefile
+
1
−
6
View file @
c6e2ec20
...
...
@@ -12,12 +12,7 @@ BUILDDIR = build
help
:
@$(
SPHINXBUILD
)
-M
help
"
$(
SOURCEDIR
)
"
"
$(
BUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
clean
:
rm
-rf
source
/reference/generated
rm
-rf
source
/backend/generated
@$(
SPHINXBUILD
)
-M
clean
"
$(
SOURCEDIR
)
"
"
$(
BUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
.PHONY
:
help clean Makefile
.PHONY
:
help html clean
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
...
...
This diff is collapsed.
Click to expand it.
docs/source/api/codegen.rst
+
18
−
3
View file @
c6e2ec20
...
...
@@ -3,15 +3,14 @@ pystencils.codegen
.. module:: pystencils.codegen
Kernel Creation Driver
----------
------------
Invocation
----------
.. autosummary::
:toctree: generated
:nosignatures:
create_kernel
get_driver
Configuration
-------------
...
...
@@ -43,6 +42,22 @@ Target Specification
Target
Code Generation Drivers
-----------------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: autosummary/entire_class.rst
driver.DefaultKernelCreationDriver
.. autosummary::
:toctree: generated
:nosignatures:
get_driver
Output Code Objects
-------------------
...
...
This diff is collapsed.
Click to expand it.
src/pystencils/codegen/driver.py
+
15
−
0
View file @
c6e2ec20
...
...
@@ -81,10 +81,25 @@ def create_kernel(
def
get_driver
(
cfg
:
CreateKernelConfig
,
*
,
retain_intermediates
:
bool
=
False
):
"""
Create a code generation driver object from the given configuration.
Args:
cfg: Configuration for the code generator
retain_intermediates: If `True`, instructs the driver to keep copies of
the intermediate results of its stages for later inspection.
"""
return
DefaultKernelCreationDriver
(
cfg
,
retain_intermediates
)
class
DefaultKernelCreationDriver
:
"""
Drives the default kernel creation sequence.
Args:
cfg: Configuration for the code generator
retain_intermediates: If `True`, instructs the driver to keep copies of
the intermediate results of its stages for later inspection.
"""
def
__init__
(
self
,
cfg
:
CreateKernelConfig
,
retain_intermediates
:
bool
=
False
):
self
.
_cfg
=
cfg
...
...
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