From 162649c715739dae0f040adef529100d6a69db1c Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 21:38:00 -0500 Subject: [PATCH 01/14] Fix DeviceProperties documentation by using cyclass.rst template DeviceProperties is a Cython cdef class, but was being documented without specifying the cyclass.rst template. This caused Sphinx to use the default class template which uses autoproperty, which doesn't work correctly with Cython extension types. The cyclass.rst template uses autoattribute instead, which properly documents the properties of Cython classes. Fixes #1215 --- cuda_core/docs/source/api_private.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cuda_core/docs/source/api_private.rst b/cuda_core/docs/source/api_private.rst index 392290ee0e..84a635fca1 100644 --- a/cuda_core/docs/source/api_private.rst +++ b/cuda_core/docs/source/api_private.rst @@ -22,7 +22,6 @@ CUDA runtime _memory._virtual_memory_resource.VirtualMemoryGranularityT _memory._virtual_memory_resource.VirtualMemoryAccessTypeT _memory._virtual_memory_resource.VirtualMemoryHandleTypeT - _device.DeviceProperties _memory._ipc.IPCAllocationHandle _memory._ipc.IPCBufferDescriptor _module.KernelAttributes @@ -30,6 +29,10 @@ CUDA runtime _module.ParamInfo _module.MaxPotentialBlockSizeOccupancyResult + :template: autosummary/cyclass.rst + + _device.DeviceProperties + CUDA protocols -------------- From 1317c5672e7f084b23bdf5b0546f61b32a8fd392 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 22:12:36 -0500 Subject: [PATCH 02/14] Enable object entries in table of contents for sidebar navigation Add toc_object_entries=True to all conf.py files to include object descriptions (methods, attributes, etc.) in the table of contents. This is a Sphinx 5.1+ feature that should enable the 'On This Page' sidebar to show class methods and properties. Also set toc_object_entries_show_parents='hide' for cleaner display without redundant parent class names. Partially addresses #1100 --- cuda_bindings/docs/source/conf.py | 6 ++++++ cuda_core/docs/source/conf.py | 6 ++++++ cuda_pathfinder/docs/source/conf.py | 6 ++++++ cuda_python/docs/source/conf.py | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index b05ff9d0de..7c827379fc 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -53,6 +53,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "hide" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index e5136e040a..5e83cff255 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -51,6 +51,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "hide" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/cuda_pathfinder/docs/source/conf.py b/cuda_pathfinder/docs/source/conf.py index 151e86b284..91de703efa 100644 --- a/cuda_pathfinder/docs/source/conf.py +++ b/cuda_pathfinder/docs/source/conf.py @@ -54,6 +54,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "hide" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 7f3571c32d..199b3d999f 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -47,6 +47,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "hide" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for From 04c8a1e0e744cff3ddc7f58791a28f85bf895211 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 22:22:50 -0500 Subject: [PATCH 03/14] List class members directly without separate sections in autosummary templates Update autosummary templates (class.rst, cyclass.rst, protocol.rst) to list methods and attributes directly under the class without separate section headings. Methods are listed first, followed by attributes. Combined with toc_object_entries=True in conf.py, individual methods and attributes will appear directly in the 'On This Page' sidebar, providing navigation similar to what was available in older versions with the furo theme. Fixes #1100 --- .../source/_templates/autosummary/class.rst | 37 +++++++++---------- .../source/_templates/autosummary/cyclass.rst | 29 +++++++-------- .../_templates/autosummary/protocol.rst | 37 +++++++++---------- 3 files changed, 48 insertions(+), 55 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 070cccdfd1..fdbe685db2 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -7,23 +7,20 @@ .. autoclass:: {{ objname }} - {% block methods %} - {% if methods %} - .. rubric:: {{ _('Methods') }} - - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} - - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ _('Attributes') }} - - {% for item in attributes %} - .. autoproperty:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} +{% block methods %} +{% if methods %} +{% for item in methods %} +.. automethod:: {{ objname }}.{{ item }} + +{%- endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +.. autoproperty:: {{ objname }}.{{ item }} + +{%- endfor %} +{% endif %} +{% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 8728ab53ef..63710b3c8a 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -7,21 +7,20 @@ .. autoclass:: {{ objname }} - {% block attributes %} - {% if attributes %} - {% for item in attributes %} - .. autoattribute:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} +{% block methods %} +{% if methods %} +{% for item in methods %} +.. automethod:: {{ objname }}.{{ item }} - {% block methods %} - {% if methods %} - .. rubric:: {{ _('Methods') }} +{%- endfor %} +{% endif %} +{% endblock %} - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +.. autoattribute:: {{ objname }}.{{ item }} - {% endif %} - {% endblock %} +{%- endfor %} +{% endif %} +{% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 03b1822ca6..02f9fe30dd 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -7,23 +7,20 @@ .. autoprotocol:: {{ objname }} - {% block methods %} - {% if methods %} - .. rubric:: {{ _('Methods') }} - - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} - - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ _('Attributes') }} - - {% for item in attributes %} - .. autoproperty:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} +{% block methods %} +{% if methods %} +{% for item in methods %} +.. automethod:: {{ objname }}.{{ item }} + +{%- endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +.. autoproperty:: {{ objname }}.{{ item }} + +{%- endfor %} +{% endif %} +{% endblock %} From bdf35a62d2ba0341e96922568cd89a116895682b Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 23:00:52 -0500 Subject: [PATCH 04/14] Show class prefix in sidebar TOC, plain names in main docs Change toc_object_entries_show_parents from 'hide' to 'domain' so that the sidebar TOC shows class-prefixed names (e.g., Device.allocate()) while the main documentation shows just the method/attribute names. Fixed template indentation to ensure automethod/autoattribute directives are properly nested inside the autoclass block. --- cuda_bindings/docs/source/conf.py | 2 +- .../source/_templates/autosummary/class.rst | 30 +++++++++---------- .../source/_templates/autosummary/cyclass.rst | 30 +++++++++---------- .../_templates/autosummary/protocol.rst | 30 +++++++++---------- cuda_core/docs/source/conf.py | 2 +- cuda_pathfinder/docs/source/conf.py | 2 +- cuda_python/docs/source/conf.py | 2 +- 7 files changed, 46 insertions(+), 52 deletions(-) diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index 7c827379fc..d82e3d970c 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -57,7 +57,7 @@ # This enables the "On This Page" sidebar to show class methods and properties # Requires Sphinx 5.1+ toc_object_entries = True -toc_object_entries_show_parents = "hide" +toc_object_entries_show_parents = "domain" # -- Options for HTML output ------------------------------------------------- diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index fdbe685db2..25023efc83 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -7,20 +7,18 @@ .. autoclass:: {{ objname }} -{% block methods %} -{% if methods %} -{% for item in methods %} -.. automethod:: {{ objname }}.{{ item }} + {% block methods %} + {% if methods %} + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} -{%- endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -.. autoproperty:: {{ objname }}.{{ item }} - -{%- endfor %} -{% endif %} -{% endblock %} + {% block attributes %} + {% if attributes %} + {% for item in attributes %} + .. autoproperty:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 63710b3c8a..5baec674bf 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -7,20 +7,18 @@ .. autoclass:: {{ objname }} -{% block methods %} -{% if methods %} -{% for item in methods %} -.. automethod:: {{ objname }}.{{ item }} + {% block methods %} + {% if methods %} + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} -{%- endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -.. autoattribute:: {{ objname }}.{{ item }} - -{%- endfor %} -{% endif %} -{% endblock %} + {% block attributes %} + {% if attributes %} + {% for item in attributes %} + .. autoattribute:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 02f9fe30dd..ec3f76a415 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -7,20 +7,18 @@ .. autoprotocol:: {{ objname }} -{% block methods %} -{% if methods %} -{% for item in methods %} -.. automethod:: {{ objname }}.{{ item }} + {% block methods %} + {% if methods %} + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} -{%- endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -.. autoproperty:: {{ objname }}.{{ item }} - -{%- endfor %} -{% endif %} -{% endblock %} + {% block attributes %} + {% if attributes %} + {% for item in attributes %} + .. autoproperty:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index 5e83cff255..50f3f92295 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -55,7 +55,7 @@ # This enables the "On This Page" sidebar to show class methods and properties # Requires Sphinx 5.1+ toc_object_entries = True -toc_object_entries_show_parents = "hide" +toc_object_entries_show_parents = "domain" # -- Options for HTML output ------------------------------------------------- diff --git a/cuda_pathfinder/docs/source/conf.py b/cuda_pathfinder/docs/source/conf.py index 91de703efa..17c5d7e4cb 100644 --- a/cuda_pathfinder/docs/source/conf.py +++ b/cuda_pathfinder/docs/source/conf.py @@ -58,7 +58,7 @@ # This enables the "On This Page" sidebar to show class methods and properties # Requires Sphinx 5.1+ toc_object_entries = True -toc_object_entries_show_parents = "hide" +toc_object_entries_show_parents = "domain" # -- Options for HTML output ------------------------------------------------- diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 199b3d999f..50c7f7ff6d 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -51,7 +51,7 @@ # This enables the "On This Page" sidebar to show class methods and properties # Requires Sphinx 5.1+ toc_object_entries = True -toc_object_entries_show_parents = "hide" +toc_object_entries_show_parents = "domain" # -- Options for HTML output ------------------------------------------------- From d5c730edc4ccfcef1ce27cf070d5c2e65384d398 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 23:32:14 -0500 Subject: [PATCH 05/14] Use autoclass :members: option for automatic member documentation --- .../source/_templates/autosummary/class.rst | 19 +++---------------- .../source/_templates/autosummary/cyclass.rst | 19 +++---------------- .../_templates/autosummary/protocol.rst | 19 +++---------------- 3 files changed, 9 insertions(+), 48 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 25023efc83..003c576b7a 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -6,19 +6,6 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - - {% block methods %} - {% if methods %} - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - {% for item in attributes %} - .. autoproperty:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} + :members: + :undoc-members: + :show-inheritance: diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 5baec674bf..003c576b7a 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -6,19 +6,6 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - - {% block methods %} - {% if methods %} - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - {% for item in attributes %} - .. autoattribute:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} + :members: + :undoc-members: + :show-inheritance: diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index ec3f76a415..5bdce168ce 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -6,19 +6,6 @@ .. currentmodule:: {{ module }} .. autoprotocol:: {{ objname }} - - {% block methods %} - {% if methods %} - {% for item in methods %} - .. automethod:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - {% for item in attributes %} - .. autoproperty:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} + :members: + :undoc-members: + :show-inheritance: From 69d9055fda350facb1331f777f008236c00c0f36 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 8 Jan 2026 23:51:18 -0500 Subject: [PATCH 06/14] Use section headings for methods/attributes to appear in sidebar TOC --- .../source/_templates/autosummary/class.rst | 27 ++++++++++++++++--- .../source/_templates/autosummary/cyclass.rst | 27 ++++++++++++++++--- .../_templates/autosummary/protocol.rst | 27 ++++++++++++++++--- 3 files changed, 72 insertions(+), 9 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 003c576b7a..8ed800e09e 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -6,6 +6,27 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :members: - :undoc-members: - :show-inheritance: + +{% block methods %} +{% if methods %} +{% for item in methods %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. automethod:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. autoproperty:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 003c576b7a..fdb11213fc 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -6,6 +6,27 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :members: - :undoc-members: - :show-inheritance: + +{% block methods %} +{% if methods %} +{% for item in methods %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. automethod:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. autoattribute:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 5bdce168ce..0acf221a9e 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -6,6 +6,27 @@ .. currentmodule:: {{ module }} .. autoprotocol:: {{ objname }} - :members: - :undoc-members: - :show-inheritance: + +{% block methods %} +{% if methods %} +{% for item in methods %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. automethod:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} + +{% block attributes %} +{% if attributes %} +{% for item in attributes %} +{{ objname }}.{{ item }} +{{ "-" * (objname|length + 1 + item|length) }} + +.. autoproperty:: {{ item }} + +{% endfor %} +{% endif %} +{% endblock %} From 972ed624ee9ce8a70a382a5b989c0d2d1446f38a Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:05:45 -0500 Subject: [PATCH 07/14] Fix autodoc directives to use fully qualified names --- cuda_core/docs/source/_templates/autosummary/class.rst | 4 ++-- cuda_core/docs/source/_templates/autosummary/cyclass.rst | 4 ++-- cuda_core/docs/source/_templates/autosummary/protocol.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 8ed800e09e..6667108f6a 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -13,7 +13,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. automethod:: {{ item }} +.. automethod:: {{ objname }}.{{ item }} {% endfor %} {% endif %} @@ -25,7 +25,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. autoproperty:: {{ item }} +.. autoproperty:: {{ objname }}.{{ item }} {% endfor %} {% endif %} diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index fdb11213fc..814d573eb4 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -13,7 +13,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. automethod:: {{ item }} +.. automethod:: {{ objname }}.{{ item }} {% endfor %} {% endif %} @@ -25,7 +25,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. autoattribute:: {{ item }} +.. autoattribute:: {{ objname }}.{{ item }} {% endfor %} {% endif %} diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 0acf221a9e..82cd3ca271 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -13,7 +13,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. automethod:: {{ item }} +.. automethod:: {{ objname }}.{{ item }} {% endfor %} {% endif %} @@ -25,7 +25,7 @@ {{ objname }}.{{ item }} {{ "-" * (objname|length + 1 + item|length) }} -.. autoproperty:: {{ item }} +.. autoproperty:: {{ objname }}.{{ item }} {% endfor %} {% endif %} From 284df91993b35dc44219989449fd982c75e3e745 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:21:48 -0500 Subject: [PATCH 08/14] Use autoclass :members: with toc_object_entries for sidebar --- .../source/_templates/autosummary/class.rst | 28 +++---------------- .../source/_templates/autosummary/cyclass.rst | 28 +++---------------- .../_templates/autosummary/protocol.rst | 28 +++---------------- 3 files changed, 12 insertions(+), 72 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 6667108f6a..2a25706080 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -6,27 +6,7 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - -{% block methods %} -{% if methods %} -{% for item in methods %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. automethod:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. autoproperty:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} + :members: + :undoc-members: + :inherited-members: + :show-inheritance: diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 814d573eb4..2a25706080 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -6,27 +6,7 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - -{% block methods %} -{% if methods %} -{% for item in methods %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. automethod:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. autoattribute:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} + :members: + :undoc-members: + :inherited-members: + :show-inheritance: diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 82cd3ca271..25a1110eba 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -6,27 +6,7 @@ .. currentmodule:: {{ module }} .. autoprotocol:: {{ objname }} - -{% block methods %} -{% if methods %} -{% for item in methods %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. automethod:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} - -{% block attributes %} -{% if attributes %} -{% for item in attributes %} -{{ objname }}.{{ item }} -{{ "-" * (objname|length + 1 + item|length) }} - -.. autoproperty:: {{ objname }}.{{ item }} - -{% endfor %} -{% endif %} -{% endblock %} + :members: + :undoc-members: + :inherited-members: + :show-inheritance: From a125fbd717624ea54b3b9526476a321fc66bb736 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:25:29 -0500 Subject: [PATCH 09/14] Restore original template structure with rubrics This restores the original template formatting where Methods and Attributes are organized under rubric headings (which don't appear in TOC). Note: pydata-sphinx-theme's secondary sidebar only shows document headings, not autodoc entries. Methods/attributes won't appear in the sidebar without using actual section headings, which would add extra headers to the main body. --- .../source/_templates/autosummary/cyclass.rst | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 2a25706080..81d045a6b0 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -6,7 +6,24 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :members: - :undoc-members: - :inherited-members: - :show-inheritance: + + {% block methods %} + {% if methods %} + .. rubric:: {{ _('Methods') }} + + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + {% for item in attributes %} + .. autoattribute:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} From c5ea511335243ecc7ac69aa0a2e6fe46eaf7f322 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:34:04 -0500 Subject: [PATCH 10/14] Configure pydata-sphinx-theme secondary sidebar for autodoc entries - Add secondary_sidebar_items with page-toc and sourcelink - Set show_toc_level: 3 to show more TOC levels by default - Keep toc_object_entries = True for Sphinx to add object entries to TOC This should make autodoc entries appear in the secondary sidebar if Sphinx's toc_object_entries properly populates the page TOC. --- cuda_bindings/docs/source/conf.py | 4 +++ .../source/_templates/autosummary/class.rst | 25 ++++++++++++++++--- .../_templates/autosummary/protocol.rst | 25 ++++++++++++++++--- cuda_core/docs/source/conf.py | 4 +++ cuda_pathfinder/docs/source/conf.py | 4 +++ cuda_python/docs/source/conf.py | 4 +++ 6 files changed, 58 insertions(+), 8 deletions(-) diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index d82e3d970c..ece7109f87 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -75,6 +75,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc", "sourcelink"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_core/docs/source/_templates/autosummary/class.rst b/cuda_core/docs/source/_templates/autosummary/class.rst index 2a25706080..070cccdfd1 100644 --- a/cuda_core/docs/source/_templates/autosummary/class.rst +++ b/cuda_core/docs/source/_templates/autosummary/class.rst @@ -6,7 +6,24 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :members: - :undoc-members: - :inherited-members: - :show-inheritance: + + {% block methods %} + {% if methods %} + .. rubric:: {{ _('Methods') }} + + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + {% for item in attributes %} + .. autoproperty:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/_templates/autosummary/protocol.rst b/cuda_core/docs/source/_templates/autosummary/protocol.rst index 25a1110eba..03b1822ca6 100644 --- a/cuda_core/docs/source/_templates/autosummary/protocol.rst +++ b/cuda_core/docs/source/_templates/autosummary/protocol.rst @@ -6,7 +6,24 @@ .. currentmodule:: {{ module }} .. autoprotocol:: {{ objname }} - :members: - :undoc-members: - :inherited-members: - :show-inheritance: + + {% block methods %} + {% if methods %} + .. rubric:: {{ _('Methods') }} + + {% for item in methods %} + .. automethod:: {{ item }} + {%- endfor %} + + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + {% for item in attributes %} + .. autoproperty:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index 50f3f92295..42da501dd5 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -73,6 +73,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc", "sourcelink"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_pathfinder/docs/source/conf.py b/cuda_pathfinder/docs/source/conf.py index 17c5d7e4cb..5b8df7fb40 100644 --- a/cuda_pathfinder/docs/source/conf.py +++ b/cuda_pathfinder/docs/source/conf.py @@ -76,6 +76,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc", "sourcelink"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 50c7f7ff6d..a19be56582 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -69,6 +69,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc", "sourcelink"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): From 37cc6567177f884960c421fc77b27f904c69ca4b Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:51:17 -0500 Subject: [PATCH 11/14] Remove sourcelink from secondary sidebar --- cuda_bindings/docs/source/conf.py | 2 +- cuda_core/docs/source/conf.py | 2 +- cuda_pathfinder/docs/source/conf.py | 2 +- cuda_python/docs/source/conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index ece7109f87..b55396376f 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -76,7 +76,7 @@ "navbar-nav", ], # Use custom secondary sidebar that includes autodoc entries - "secondary_sidebar_items": ["page-toc", "sourcelink"], + "secondary_sidebar_items": ["page-toc"], # Show more TOC levels by default "show_toc_level": 3, } diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index 42da501dd5..eaf18be925 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -74,7 +74,7 @@ "navbar-nav", ], # Use custom secondary sidebar that includes autodoc entries - "secondary_sidebar_items": ["page-toc", "sourcelink"], + "secondary_sidebar_items": ["page-toc"], # Show more TOC levels by default "show_toc_level": 3, } diff --git a/cuda_pathfinder/docs/source/conf.py b/cuda_pathfinder/docs/source/conf.py index 5b8df7fb40..ac795ff368 100644 --- a/cuda_pathfinder/docs/source/conf.py +++ b/cuda_pathfinder/docs/source/conf.py @@ -77,7 +77,7 @@ "navbar-nav", ], # Use custom secondary sidebar that includes autodoc entries - "secondary_sidebar_items": ["page-toc", "sourcelink"], + "secondary_sidebar_items": ["page-toc"], # Show more TOC levels by default "show_toc_level": 3, } diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index a19be56582..b01cf6b2e0 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -70,7 +70,7 @@ "navbar-nav", ], # Use custom secondary sidebar that includes autodoc entries - "secondary_sidebar_items": ["page-toc", "sourcelink"], + "secondary_sidebar_items": ["page-toc"], # Show more TOC levels by default "show_toc_level": 3, } From c2c0979d3c3756cc0dcbd4ca8e0fdf56befaf986 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 00:55:50 -0500 Subject: [PATCH 12/14] Apply cyclass.rst template to all Cython cdef classes Public API Cython classes now using cyclass.rst: - Buffer, MemoryResource - Stream, StreamOptions - Event, EventOptions - DeviceMemoryResource, DeviceMemoryResourceOptions - PinnedMemoryResource, PinnedMemoryResourceOptions - ManagedMemoryResource, ManagedMemoryResourceOptions - LaunchConfig Private API Cython classes now using cyclass.rst: - IPCAllocationHandle, IPCBufferDescriptor - DeviceProperties (already was) --- cuda_core/docs/source/api.rst | 21 ++++++++++++--------- cuda_core/docs/source/api_private.rst | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cuda_core/docs/source/api.rst b/cuda_core/docs/source/api.rst index 13e1f43a2f..b7ed5f301b 100644 --- a/cuda_core/docs/source/api.rst +++ b/cuda_core/docs/source/api.rst @@ -23,27 +23,30 @@ CUDA runtime Graph GraphBuilder launch + GraphMemoryResource + LegacyPinnedMemoryResource + VirtualMemoryResource + + :template: autosummary/cyclass.rst + Buffer Stream Event MemoryResource DeviceMemoryResource - GraphMemoryResource PinnedMemoryResource ManagedMemoryResource - LegacyPinnedMemoryResource - VirtualMemoryResource - - :template: dataclass.rst - + StreamOptions + EventOptions DeviceMemoryResourceOptions PinnedMemoryResourceOptions ManagedMemoryResourceOptions - EventOptions + LaunchConfig + + :template: dataclass.rst + GraphCompleteOptions GraphDebugPrintOptions - StreamOptions - LaunchConfig VirtualMemoryResourceOptions diff --git a/cuda_core/docs/source/api_private.rst b/cuda_core/docs/source/api_private.rst index 84a635fca1..0aa88d1d64 100644 --- a/cuda_core/docs/source/api_private.rst +++ b/cuda_core/docs/source/api_private.rst @@ -22,8 +22,6 @@ CUDA runtime _memory._virtual_memory_resource.VirtualMemoryGranularityT _memory._virtual_memory_resource.VirtualMemoryAccessTypeT _memory._virtual_memory_resource.VirtualMemoryHandleTypeT - _memory._ipc.IPCAllocationHandle - _memory._ipc.IPCBufferDescriptor _module.KernelAttributes _module.KernelOccupancy _module.ParamInfo @@ -32,6 +30,8 @@ CUDA runtime :template: autosummary/cyclass.rst _device.DeviceProperties + _memory._ipc.IPCAllocationHandle + _memory._ipc.IPCBufferDescriptor CUDA protocols From e1e7df14737d600c2d8deda6ee0f679a05dd56ab Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 01:24:14 -0500 Subject: [PATCH 13/14] Fix template assignments: dataclasses stay under dataclass.rst - Cython dataclasses (StreamOptions, EventOptions, *ResourceOptions) stay under dataclass.rst template - Pure Cython cdef classes (Buffer, Stream, Event, MemoryResource, LaunchConfig) use cyclass.rst template - Classes inheriting from Cython (GraphMemoryResource, LegacyPinnedMemoryResource, VirtualMemoryResource) use cyclass.rst - Restored original ordering --- cuda_core/docs/source/api.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cuda_core/docs/source/api.rst b/cuda_core/docs/source/api.rst index b7ed5f301b..ab9a78a31d 100644 --- a/cuda_core/docs/source/api.rst +++ b/cuda_core/docs/source/api.rst @@ -23,9 +23,6 @@ CUDA runtime Graph GraphBuilder launch - GraphMemoryResource - LegacyPinnedMemoryResource - VirtualMemoryResource :template: autosummary/cyclass.rst @@ -34,19 +31,22 @@ CUDA runtime Event MemoryResource DeviceMemoryResource + GraphMemoryResource PinnedMemoryResource ManagedMemoryResource - StreamOptions - EventOptions - DeviceMemoryResourceOptions - PinnedMemoryResourceOptions - ManagedMemoryResourceOptions + LegacyPinnedMemoryResource + VirtualMemoryResource LaunchConfig :template: dataclass.rst + DeviceMemoryResourceOptions + PinnedMemoryResourceOptions + ManagedMemoryResourceOptions + EventOptions GraphCompleteOptions GraphDebugPrintOptions + StreamOptions VirtualMemoryResourceOptions From 0ad1a8a24c76e0cfc0e33320b3fdf9da7032056b Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Fri, 9 Jan 2026 01:27:42 -0500 Subject: [PATCH 14/14] Move LaunchConfig to dataclass template - Device, Graph, GraphBuilder are regular Python classes (use default) - LaunchConfig uses dataclass template per project convention --- cuda_core/docs/source/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_core/docs/source/api.rst b/cuda_core/docs/source/api.rst index ab9a78a31d..a0bda7e64a 100644 --- a/cuda_core/docs/source/api.rst +++ b/cuda_core/docs/source/api.rst @@ -36,7 +36,6 @@ CUDA runtime ManagedMemoryResource LegacyPinnedMemoryResource VirtualMemoryResource - LaunchConfig :template: dataclass.rst @@ -47,6 +46,7 @@ CUDA runtime GraphCompleteOptions GraphDebugPrintOptions StreamOptions + LaunchConfig VirtualMemoryResourceOptions