From 59973fb6e27b6eb59d48ecf73ce28514950fd9d3 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Mon, 15 Jul 2024 09:52:45 +0200 Subject: [PATCH] Fix CUTLASS Python documentation build (#91) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify problematic docstring and instructions to fix build of CUTLASS Python documentation. - Docstring: missing newline starting code-block and wrong keyword - `ipykernel` missing lead to error on Jupyter notebooks - `docutils>=0.21` drops a member Sphinx is using. Next versions of Sphinx will fix this by dropping the usage. Signed-off-by: Víctor Pérez --- python/README.md | 4 ++++ python/cutlass/epilogue/epilogue.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/README.md b/python/README.md index 4c89ec892f..0a130c2677 100644 --- a/python/README.md +++ b/python/README.md @@ -152,6 +152,10 @@ Building the documentation requires additional packages. The following commands ```bash sudo apt-get install pandoc pip install --upgrade Sphinx furo pandoc myst-parser sphinx-copybutton nbsphinx nbsphinx-link sphinx-inline-tabs +# Needed for jupyter notebooks +pip install ipykernel +# Needed as latest versions are not compatible with Sphinx as of now. +pip install docutils~=0.20.0 ``` To build documentation, you must first have installed the CUTLASS Python interface via the diff --git a/python/cutlass/epilogue/epilogue.py b/python/cutlass/epilogue/epilogue.py index 3f512d2403..f37d3ae1b0 100644 --- a/python/cutlass/epilogue/epilogue.py +++ b/python/cutlass/epilogue/epilogue.py @@ -122,8 +122,9 @@ def trace(fn, example_tensors, **kwargs): :param example_tensors: example inputs for fn :type example_tensors: dict - .. hightlight:: python + .. highlight:: python .. code-block:: python + import cutlass.backend.evt # Define epilogue function as Python callable