Skip to content

Generate llms files with rocm_docs_generate_llms - #624

Merged
spraveenio merged 1 commit into
ROCm:mainfrom
neon60:llm_comp_sol
Aug 11, 2026
Merged

Generate llms files with rocm_docs_generate_llms#624
spraveenio merged 1 commit into
ROCm:mainfrom
neon60:llm_comp_sol

Conversation

@neon60

@neon60 neon60 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Motivation

Enable llms.txt / llms-full.txt generation for the AMD GPU Operator docs, so the site publishes machine-readable documentation following the llms.txt standard (https://llmstxt.org/). This aligns the project with the shared approach used across the Instinct documentation set (k8s-device-plugin, container-toolkit, gpu-cluster-networking, amdgpu-docs, instinct-docs), using the built-in support in rocm-docs-core.

Technical Details

  • Enable generation via rocm_docs_generate_llms = True in docs/conf.py, which produces both llms.txt and llms-full.txt from the resolved doctree at build time.
  • Add use_download_button: True to html_theme_options for the per-page Markdown download button.
  • Bump rocm-docs-core from 1.18.1 to 1.38.0 and add the [llms] extra in docs/sphinx/requirements.in; regenerate requirements.txt (Python 3.10, matching .readthedocs.yaml), which pulls in sphinx-markdown-builder. Existing pins (sphinx-reredirects, Sphinx-Substitution-Extensions) are preserved.

Uses rocm-docs-core 1.38.0 rather than the latest 1.39.0: the published 1.39.0 wheel ships a malformed projects.yaml that breaks the build (already fixed upstream on develop, pending a patch release).

Test Plan

  • Regenerated docs/sphinx/requirements.txt with pip-compile under Python 3.10; confirmed the [llms] extra and existing dependencies resolve.
  • Ran a full sphinx-build -b html in a clean python:3.10-slim container with the pinned requirements, reproducing the Read the Docs environment.
  • Verified llms.txt and llms-full.txt are generated and inspected their content.

Test Result

Build succeeds (build succeeded, 24 warnings) and logs Wrote llms.txt and llms-full.txt. Generated llms.txt (4 KB) has the correct # AMD GPU Operator header and indexes all pages; llms-full.txt (576 KB) has correct per-page sections with prose filtering. The 24 warnings are pre-existing, unrelated to this change.

Submission Checklist

Enable llms.txt and llms-full.txt generation from the resolved doctree
via rocm_docs_generate_llms, and add the per-page Markdown download
button. Bump rocm-docs-core to 1.38.0 with the llms extra.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@neon60
neon60 requested a review from yansun1996 August 11, 2026 12:44

@spraveenio spraveenio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Lgtm

@spraveenio
spraveenio merged commit bbc8131 into ROCm:main Aug 11, 2026
4 checks passed
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.

2 participants