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

update codegen module docs

parent a9ce0ab8
No related branches found
No related tags found
1 merge request!433Consolidate codegen and JIT modules.
Pipeline #71133 passed
......@@ -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).
......
......@@ -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
-------------------
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment