From 3094c7ef7fd69d852e590c9274b429e40b8cebc0 Mon Sep 17 00:00:00 2001 From: Ludger Paehler Date: Sun, 29 Jan 2023 17:38:34 +0100 Subject: [PATCH] Initial seeding of the documentation. --- docs/Makefile | 16 ++++++++++++++++ docs/make.bat | 35 +++++++++++++++++++++++++++++++++++ docs/source/conf.py | 35 +++++++++++++++++++++++++++++++++++ docs/source/examples.rst | 4 ++++ docs/source/index.rst | 22 ++++++++++++++++++++++ docs/source/installation.rst | 4 ++++ docs/source/interfaces.rst | 4 ++++ docs/source/passbuilding.rst | 4 ++++ 8 files changed, 124 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/make.bat create mode 100644 docs/source/conf.py create mode 100644 docs/source/examples.rst create mode 100644 docs/source/index.rst create mode 100644 docs/source/installation.rst create mode 100644 docs/source/interfaces.rst create mode 100644 docs/source/passbuilding.rst diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000000..7f290d96391e --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,16 @@ +# Minimal makefile for Sphinx documentation +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 000000000000..9534b018135e --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 000000000000..e982a0972311 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. + +# -- Project information + +project = 'Hydrogym' +copyright = '2022, Hydrogym Developers' +author = 'tbd' + +release = '0.1' +version = '0.1.0' + +# -- General configuration + +extensions = [ + 'sphinx.ext.duration', + 'sphinx.ext.doctest', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', +] + +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), +} +intersphinx_disabled_domains = ['std'] + +templates_path = ['_templates'] + +# -- Options for HTML output + +html_theme = 'alabaster' + +# -- Options for EPUB output +epub_show_urls = 'footnote' diff --git a/docs/source/examples.rst b/docs/source/examples.rst new file mode 100644 index 000000000000..e75b80420d8f --- /dev/null +++ b/docs/source/examples.rst @@ -0,0 +1,4 @@ +How to Construct an Example for Enzyme-MLIR +=========================================== + +.. _examples: \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 000000000000..72a521a521d4 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,22 @@ +Enzyme MLIR Documentation +========================= + +**Enzyme-MLIR** is an Enzyme rewrite based on [MLIR](https://mlir.llvm.org) made to be easily madifiable to generate fast reverse-mode gradients for arbitrary dialects. + +.. note:: + + Enzyme-MLIR Reverse-mode is still under highly active development and should be considered as early-stage research software. + +.. toctree: + :maxdepth: 1 + :caption: Getting Started + + installation + +.. toctree: + :maxdepth: 1 + :caption: Developer's Documentation + + interfaces + examples + passbuilding \ No newline at end of file diff --git a/docs/source/installation.rst b/docs/source/installation.rst new file mode 100644 index 000000000000..00f91c59b6bd --- /dev/null +++ b/docs/source/installation.rst @@ -0,0 +1,4 @@ +Installing Enzyme-MLIR Reverse-Mode +=================================== + +.. _installation: \ No newline at end of file diff --git a/docs/source/interfaces.rst b/docs/source/interfaces.rst new file mode 100644 index 000000000000..bc2032d17a53 --- /dev/null +++ b/docs/source/interfaces.rst @@ -0,0 +1,4 @@ +How to Implement Interfaces +=========================== + +.. _interfaces: \ No newline at end of file diff --git a/docs/source/passbuilding.rst b/docs/source/passbuilding.rst new file mode 100644 index 000000000000..037e59de0523 --- /dev/null +++ b/docs/source/passbuilding.rst @@ -0,0 +1,4 @@ +How to Build a Pass +=================== + +.. _passes: \ No newline at end of file