diff --git a/docs/gui.rst b/docs/gui.rst index 5523ef9e35c7d..0e671d1d80ae2 100644 --- a/docs/gui.rst +++ b/docs/gui.rst @@ -170,7 +170,7 @@ Every event have a key and type. A *event filter* is a list combined of *key*, *type* and *(type, key)* tuple, e.g.: -.. code-block:: +.. code-block:: python # if ESC pressed or released: gui.get_event(ti.GUI.ESCAPE) diff --git a/docs/layout.rst b/docs/layout.rst index ab943f7963bcd..eb1216144e9ac 100644 --- a/docs/layout.rst +++ b/docs/layout.rst @@ -70,7 +70,7 @@ To specify which layout to use in Taichi: Both ``x`` and ``y`` have the same shape of ``(3, 2)``, and they can be accessed in the same manner, where ``0 <= i < 3 && 0 <= j < 2``. They can be accessed in the same manner: ``x[i, j]`` and ``y[i, j]``. However, they have a very different memory layouts: -.. code-block:: +.. code-block:: none # address low ........................... address high # x: x[0,0] x[0,1] x[0,2] | x[1,0] x[1,1] x[1,2] @@ -108,7 +108,7 @@ For example, this places two 1D tensors of size ``3`` (array of structure, AoS): Their memory layout: -.. code-block:: +.. code-block:: none # address low ............. address high # x[0] y[0] | x[1] y[1] | x[2] y[2] @@ -122,7 +122,7 @@ In contrast, this places two tensor placed separately (structure of array, SoA): Now, their memory layout: -.. code-block:: +.. code-block:: none # address low ............. address high # x[0] x[1] x[2] | y[0] y[1] y[2] diff --git a/docs/syntax.rst b/docs/syntax.rst index 6adab10e14b65..a387c0d546a8d 100644 --- a/docs/syntax.rst +++ b/docs/syntax.rst @@ -167,7 +167,7 @@ Debugging Debug your program with ``print(x)``. For example, if ``x`` is ``23``, then it prints -.. code-block:: +.. code-block:: none [debug] x = 23 diff --git a/docs/utilities.rst b/docs/utilities.rst index 69bf8692e82f6..b18290188fcd6 100644 --- a/docs/utilities.rst +++ b/docs/utilities.rst @@ -34,7 +34,7 @@ Benchmarking and Regression Tests For example, this is part of the output by ``ti regression`` after enabling constant folding optimization pass: -.. code-block:: +.. code-block:: none linalg__________________polar_decomp______________________________ codegen_offloaded_tasks 37 -> 39 +5.4% @@ -58,7 +58,7 @@ For example, this is part of the output by ``ti regression`` after enabling cons The suggested workflow for **the PR author** to run the regression tests is: * When a performance related PR is ready, checkout that PR locally. - + * Run ``ti benchmark && ti regression`` to obtain the result. * Decide wheater to approve or request change, depends on the result. @@ -80,7 +80,7 @@ The suggested workflow for **the PR author** to run the regression tests is: Trigger GDB when the program crashes -------------------------------------- -.. code-block:: +.. code-block:: none # Python ti.set_gdb_trigger(True)