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 ...@@ -12,12 +12,7 @@ BUILDDIR = build
help: help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clean: .PHONY: help html clean
rm -rf source/reference/generated
rm -rf source/backend/generated
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help clean Makefile
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
......
...@@ -3,15 +3,14 @@ pystencils.codegen ...@@ -3,15 +3,14 @@ pystencils.codegen
.. module:: pystencils.codegen .. module:: pystencils.codegen
Kernel Creation Driver Invocation
---------------------- ----------
.. autosummary:: .. autosummary::
:toctree: generated :toctree: generated
:nosignatures: :nosignatures:
create_kernel create_kernel
get_driver
Configuration Configuration
------------- -------------
...@@ -43,6 +42,22 @@ Target Specification ...@@ -43,6 +42,22 @@ Target Specification
Target Target
Code Generation Drivers
-----------------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: autosummary/entire_class.rst
driver.DefaultKernelCreationDriver
.. autosummary::
:toctree: generated
:nosignatures:
get_driver
Output Code Objects Output Code Objects
------------------- -------------------
......
...@@ -81,10 +81,25 @@ def create_kernel( ...@@ -81,10 +81,25 @@ def create_kernel(
def get_driver(cfg: CreateKernelConfig, *, retain_intermediates: bool = False): 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) return DefaultKernelCreationDriver(cfg, retain_intermediates)
class DefaultKernelCreationDriver: 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): def __init__(self, cfg: CreateKernelConfig, retain_intermediates: bool = False):
self._cfg = cfg self._cfg = cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment