Skip to content

[DOC] Restore tensor method docs (ndim, numel, size, is_contiguous) - #616

Closed
tqchen wants to merge 1 commit into
apache:mainfrom
tqchen:tvm-ffi-restore-ndim-numel-size-is-contiguous-in-docs-without-duplicate-object-description-warnings
Closed

[DOC] Restore tensor method docs (ndim, numel, size, is_contiguous)#616
tqchen wants to merge 1 commit into
apache:mainfrom
tqchen:tvm-ffi-restore-ndim-numel-size-is-contiguous-in-docs-without-duplicate-object-description-warnings

Conversation

@tqchen

@tqchen tqchen commented Jun 8, 2026

Copy link
Copy Markdown
Member

[DOC] Restore tensor method docs (ndim, numel, size, is_contiguous) without warnings

PR #607 commit ae58d90 removed ndim/numel/size/is_contiguous from the Python API
index page after a previous qualified-name attempt produced "duplicate object
description" warnings. However the assumption that "the Tensor autoclass already
documents them" only held for the Tensor sub-page (generated/tvm_ffi.Tensor.html);
those four methods had no individual entries on the top-level index page.

Fix: add a "Tensor methods" rubric with an autosummary block (no :toctree:) for
the four qualified names (Tensor.ndim etc.). Without :toctree:, sphinx generates no
stub pages, so there is no second sphinx-domain registration and no duplicate warning.
The entries produce a summary table on the index page with links to the existing
Tensor class page anchors (generated/tvm_ffi.Tensor.html#tvm_ffi.Tensor.*).

Verification: baseline 0 warnings, after-fix 0 warnings; all four methods render on
the index page with correct href anchors.

…ithout warnings

PR apache#607 commit ae58d90 removed ndim/numel/size/is_contiguous from the Python API
index page after a previous qualified-name attempt produced "duplicate object
description" warnings. However the assumption that "the Tensor autoclass already
documents them" only held for the Tensor sub-page (generated/tvm_ffi.Tensor.html);
those four methods had no individual entries on the top-level index page.

Fix: add a "Tensor methods" rubric with an `autosummary` block (no :toctree:) for
the four qualified names (Tensor.ndim etc.). Without :toctree:, sphinx generates no
stub pages, so there is no second sphinx-domain registration and no duplicate warning.
The entries produce a summary table on the index page with links to the existing
Tensor class page anchors (generated/tvm_ffi.Tensor.html#tvm_ffi.Tensor.*).

Verification: baseline 0 warnings, after-fix 0 warnings; all four methods render on
the index page with correct href anchors.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Python reference documentation in docs/reference/python/index.rst by adding a 'Tensor methods' rubric and autosummary for Tensor.ndim, Tensor.numel, Tensor.size, and Tensor.is_contiguous. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@tqchen tqchen closed this Jun 8, 2026
@tqchen
tqchen deleted the tvm-ffi-restore-ndim-numel-size-is-contiguous-in-docs-without-duplicate-object-description-warnings branch June 8, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant