Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/common/system-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Basic checks (consult ROCm docs for expanded diagnostics):
cat /opt/rocm/.info/version

# Validate installed version
amd-smi --version
amd-smi version
```
10 changes: 7 additions & 3 deletions docs/common/system-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ Pass if bus bandwidth (large message, ~8 GB) ≥ 304 GB/s.

### rocBLAS GEMM Benchmarks

For installation, review rocBLAS documentation:

- [Linux installation](https://rocm.docs.amd.com/projects/rocBLAS/en/latest/install/Linux_Install_Guide.html)
- [Windows installation](https://rocm.docs.amd.com/projects/rocBLAS/en/latest/install/Windows_Install_Guide.html)

Run each until peak (stable) TFLOPS observed. Capture highest achieved value.

FP32:
Expand Down Expand Up @@ -696,7 +701,7 @@ For complete details, extended guidance, and troubleshooting tips, consult the *

### AGFHC Installation

For AGFHC installation steps consult the AMD GPU Field Health Check (AGFHC) User Guide (UG-58416) on the [AMD Technical Information Portal](https://docs.amd.com/).
Reach out to your AMD customer success team for specific installation steps regarding AGFHC.

The ROCm Validation suite (RVS) is a prerequisite of AGFHC. Make sure that this is installed as of the ROCm software installation. For example, on Ubuntu:

Expand Down Expand Up @@ -832,9 +837,8 @@ The tables below list the recommended and suggested AGFHC validation recipes alo
| gfx_lvl4 | All AMD MI3xx Instinct™ models | 1 Hour | GPU stress test to hot spot test GPU needed for DLC systems |
| sleep 300 sec. | | 5 Minutes, sixth iteration | For silicon to contract to widen any cracks |
| minihpl | All AMD MI3xx Instinct™ models | 3 Hours | Search for voltage failures and stress HBM |
| xgmi_lvl1 | All AMD MI3xx Instinct™ models | 5 Minutes | Check for link degradation |
| pcie_lvl2 | All AMD MI3xx Instinct™ models | 10 Minutes | Check for link degradation |
| Total | | | 14 Hours and 45 Minutes |
| Total | | | 14 Hours and 40 Minutes |

#### Recommended AGFHC Tests

Expand Down
238 changes: 237 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
import subprocess
import sys
from pathlib import Path
import shutil

html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "instinct.docs.amd.com")
html_context = {}
Expand All @@ -24,6 +26,7 @@
html_theme_options = {
"flavor": "instinct",
"link_main_doc": True,
"use_download_button": True,
"nav_secondary_items": {
"Community": "https://github.com/ROCm/ROCm/discussions",
"Blogs": "https://rocm.blogs.amd.com/",
Expand All @@ -38,5 +41,238 @@
external_toc_path = "./sphinx/_toc.yml"

exclude_patterns = ['.venv']

# Add anchors to headings up to level 4
myst_heading_anchors = 4
myst_heading_anchors = 4

html_extra_path = ["llms.txt"]

import re

EXCLUDED_DIRS = {
"_build",
"_templates",
"_static",
".git",
".venv",
}

EXCLUDED_FILES = {
"notices.md",
}

MARKUP_PREFIXES = (
":::",
"```{",
"```",
":img-top:",
":class",
":link:",
":link-type:",
":shadow:",
":columns:",
":padding:",
":gutter:",
":open:",
":name:",
":header-rows:",
":alt:",
"+++",
"-->",
"{bdg-",
)

# Matches lines like "align: center", "alt:", "name: foo" (directive options
# not starting with a colon, common in MyST figure/table fences)
_BARE_DIRECTIVE_RE = re.compile(r"^[a-z][a-z_-]*:\s*\S*$")

# Matches MyST/RST anchor labels like "(gpu-arch-documentation)="
_ANCHOR_LABEL_RE = re.compile(r"^\(\w[\w-]*\)=$")

# Matches RST section underlines (e.g. "====", "----", "~~~~")
_RST_UNDERLINE_RE = re.compile(r"^[=\-~^\"\'#*+]{3,}$")

# Matches RST code block directives (e.g. ".. code-block:: cpp", ".. code:: sh")
_RST_CODE_BLOCK_RE = re.compile(r"^\.\.\s+(code-block|code|sourcecode)::")

# Matches markdown table separator rows (e.g. "|---|---|", "| :--- | ---: |").
_MD_TABLE_SEP_RE = re.compile(r"^\|[\s|:\-]+\|$")

# Matches RST directives whose indented body should be discarded (e.g. raw HTML).
_RST_SKIP_BLOCK_RE = re.compile(r"^\.\.\s+raw::")

# Matches HTML tags (e.g. "<div>", "</p>", "<!--") but NOT RST hyperlink URL
# continuation lines (e.g. "<https://...>`_"). The negative lookahead excludes
# URL schemes so that multi-line RST inline hyperlinks are preserved.
_HTML_TAG_RE = re.compile(r"^<(?!https?://|ftp://|mailto:)[a-zA-Z/!]")

# Matches trailing HTML close tags at the end of a prose line
# (e.g. "Browse blogs.</p>", "See the guide.</li></ul>").
_TRAILING_HTML_CLOSE_RE = re.compile(r"(</[a-zA-Z]+>)+\s*$")

MIN_PROSE_LINES = 10


def should_skip(path: Path) -> bool:
return (
any(part in EXCLUDED_DIRS for part in path.parts)
or path.name in EXCLUDED_FILES
)


def is_prose_line(line: str) -> bool:
stripped = line.strip()
if not stripped:
return False
if stripped.startswith(MARKUP_PREFIXES):
return False
# Drop bare directive-option lines (e.g. "align: center", "alt:")
if _BARE_DIRECTIVE_RE.match(stripped):
return False
# Drop MyST/RST anchor labels (e.g. "(gpu-arch-documentation)=")
if _ANCHOR_LABEL_RE.match(stripped):
return False
# Drop markdown table separator rows (e.g. "|---|---|", "| :--- | ---: |")
if _MD_TABLE_SEP_RE.match(stripped):
return False
# Drop HTML tags (e.g. "<div>", "</p>") but keep RST hyperlink URL
# continuation lines (e.g. "<https://rocm.docs.amd.com/...>`_")
if _HTML_TAG_RE.match(stripped):
return False
# Drop RST directives, comments, hyperlink targets, and substitution definitions
if stripped.startswith(".."):
return False
# Drop YAML frontmatter key-value pairs (e.g. "description lang=en": "text")
if stripped.startswith('"') and re.match(r'^"[^"]+"\s*:', stripped):
return False
# Drop RST field list items (e.g. ":type: int") and extended RST meta
# options (e.g. ":description lang=en: text"). Excludes inline roles at line
# start (e.g. ":cpp:func:`hipMalloc` returns..." or ":ref:`foo <bar>` describes...")
# because those are followed by a backtick, not a space or end-of-line.
if re.match(r"^:[A-Za-z][A-Za-z0-9_ =-]*:(\s|$)", stripped):
return False
# Drop RST section underlines (e.g. "====", "----", "~~~~")
if _RST_UNDERLINE_RE.match(stripped):
return False
return True


def generate_combined_markdown(app, exception):
if exception:
return

docs_root = Path(app.srcdir)
output_file = Path(app.outdir) / "llms-full.txt"
base_file = docs_root / "llms.txt"

combined = []

if base_file.exists():
base_text = base_file.read_text(encoding="utf-8").rstrip().rstrip("-").rstrip()
combined.append(base_text)
else:
combined.append("# AMD Instinct Customer Acceptance Guide")

all_files = sorted(
list(docs_root.rglob("*.md")) + list(docs_root.rglob("*.rst"))
)

for doc_file in all_files:
if should_skip(doc_file):
continue

if doc_file == base_file:
continue

try:
content = doc_file.read_text(encoding="utf-8")
except Exception:
continue

lines = content.splitlines()
prose_lines = [line for line in lines if is_prose_line(line)]

if len(prose_lines) < MIN_PROSE_LINES:
continue

relative = doc_file.relative_to(docs_root)
in_backtick_fence = False
in_rst_code_block = False
in_rst_skip_block = False
in_html_comment = False # inside <!-- ... --> block
in_html_open_tag = False # inside a multi-line HTML opening tag
kept = []
for line in lines:
stripped = line.strip()
# Backtick fences (MyST/Markdown)
if stripped.startswith("```"):
in_backtick_fence = not in_backtick_fence
kept.append(line)
continue
if in_backtick_fence:
kept.append(line)
continue
# HTML comment block (<!-- ... -->): discard all content until -->
if in_html_comment:
if "-->" in stripped:
in_html_comment = False
continue
# RST skip block (e.g. .. raw::): discard all indented content
if in_rst_skip_block:
if not stripped or line[0] in (" ", "\t"):
continue
in_rst_skip_block = False
# RST code block: exit when a non-blank, non-indented line appears
if in_rst_code_block:
if not stripped or line[0] in (" ", "\t"):
kept.append(line)
continue
in_rst_code_block = False
# RST raw block: enter and discard both the directive and its body
if _RST_SKIP_BLOCK_RE.match(stripped):
in_rst_skip_block = True
continue
# RST code block: enter on directive line (directive itself is dropped)
if _RST_CODE_BLOCK_RE.match(stripped):
in_rst_code_block = True
continue
# HTML comment open (<!-- ... -->): discard opener and enter state
if stripped.startswith("<!--"):
if "-->" not in stripped:
in_html_comment = True
continue
# Multi-line HTML opening tag: skip continuation lines until >
if in_html_open_tag:
if ">" in stripped:
in_html_open_tag = False
continue
# Detect HTML opening tags that wrap across lines (no > on this line)
if _HTML_TAG_RE.match(stripped) and ">" not in stripped:
in_html_open_tag = True
continue
if not stripped:
kept.append(line)
elif is_prose_line(line):
# Strip trailing HTML close tags (e.g. "See the guide.</p>")
cleaned = _TRAILING_HTML_CLOSE_RE.sub("", line).rstrip()
cleaned_stripped = cleaned.strip()
if not cleaned_stripped:
# Entire line was HTML close tags — keep original (shouldn't
# normally reach here since _is_prose_line filters HTML).
kept.append(line)
elif re.search(r"\w", cleaned_stripped):
# Line has real word content after stripping close tags.
kept.append(cleaned)
# else: only punctuation remains (e.g. bare ".") — discard.
cleaned = "\n".join(kept)

combined.append(f"\n\n---\n\n# {relative}\n")
combined.append(cleaned.strip())

output_file.write_text(
"\n".join(combined) + "\n",
encoding="utf-8",
)

def setup(app):
app.connect("build-finished", generate_combined_markdown)
21 changes: 10 additions & 11 deletions docs/gpus/mi300x.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ Performance validation ensures the system meets MI300X specifications. For detai

```bash
rocblas-bench -f gemm \
-r s -m 4000 \
-r s -m 4000 -n 4000 -k 4000 \
--lda 4000 --ldb 4000 --ldc 4000 \
--transposeA N --transposeB T
```

**Pass:** ≥ 94100 TFLOPS
**Pass:** ≥ 94100 GFLOPS
+++
**Fail:** otherwise
:::
Expand All @@ -179,7 +179,7 @@ rocblas-bench -f gemm_strided_batched_ex \
--batch_count 5
```

**Pass:** ≥ 130600 TFLOPS
**Pass:** ≥ 130600 GFLOPS
+++
**Fail:** otherwise
:::
Expand All @@ -201,7 +201,7 @@ rocblas-bench -f gemm_strided_batched_ex \
--batch_count 5
```

**Pass:** ≥ 162700 TFLOPS
**Pass:** ≥ 162700 GFLOPS
+++
**Fail:** otherwise
:::
Expand All @@ -210,15 +210,14 @@ rocblas-bench -f gemm_strided_batched_ex \
[BabelStream](../common/system-validation.md#babelstream)
^^^

| Copy # | Threshold (MB/s) |
| Kernel | Threshold (MB/s) |
|--------|-----------------|
| 1 | ≥ 4,177,285 |
| 2 | ≥ 4,067,069 |
| 3 | ≥ 3,920,853 |
| 4 | ≥ 3,885,301 |
| 5 | ≥ 3,660,781 |
| Copy | ≥ 4,177,285 |
| Mul | ≥ 4,067,069 |
| Add | ≥ 3,920,853 |
| Triad | ≥ 3,885,301 |
| Dot | ≥ 3,660,781 |

**Pass:** Greater than or equal to 162700 TFLOPS
+++
**Fail:** otherwise
:::
8 changes: 4 additions & 4 deletions docs/gpus/mi325x.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ Performance validation ensures the system meets MI325X specifications. For detai

```bash
rocblas-bench -f gemm \
-r s -m 4000 \
-r s -m 4000 -n 4000 -k 4000 \
--lda 4000 --ldb 4000 --ldc 4000 \
--transposeA N --transposeB T
```

**Pass:** ≥ 94100 TFLOPS
**Pass:** ≥ 94100 GFLOPS
+++
**Fail:** otherwise
:::
Expand All @@ -178,7 +178,7 @@ rocblas-bench -f gemm_strided_batched_ex \
--batch_count 5
```

**Pass:** ≥ 130600 TFLOPS
**Pass:** ≥ 130600 GFLOPS
+++
**Fail:** otherwise
:::
Expand All @@ -200,7 +200,7 @@ rocblas-bench -f gemm_strided_batched_ex \
--batch_count 5
```

**Pass:** ≥ 162700 TFLOPS
**Pass:** ≥ 162700 GFLOPS
+++
**Fail:** otherwise
:::
Loading
Loading