Compare commits

...

12 Commits

Author SHA1 Message Date
Sam Wu
d4d308d981 Get from gh user content 2024-10-17 12:18:30 -06:00
Sam Wu
96211cdce8 Regenerate dot file and graph 2024-10-17 12:14:56 -06:00
Sam Wu
11d65cde71 Compare dot files 2024-10-17 12:14:00 -06:00
Sam Wu
7cd3868ec1 Create dot file and sort graph for consistent hash 2024-10-17 12:10:39 -06:00
Joseph Macaranas
f83a474813 Map clr/HIP to same node in tree. 2024-10-03 15:13:54 -04:00
Joseph Macaranas
b352e231cc External CI: Build Deps Graph 2024-10-02 22:22:41 -04:00
dependabot[bot]
8b63092333 Build(deps): Bump rocm-docs-core from 1.8.1 to 1.8.2 in /docs/sphinx (#3807)
Bumps [rocm-docs-core](https://github.com/ROCm/rocm-docs-core) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.8.2/CHANGELOG.md)
- [Commits](https://github.com/ROCm/rocm-docs-core/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 13:55:07 -04:00
Joseph Macaranas
7843d46e47 External CI: pytorch vision patch removal (#3855)
My pull request applying this patch was merged upstream, so this is no longer needed and will break the pipeline since it can no longer be applied.
2024-10-02 12:03:36 -04:00
Joseph Macaranas
b61c291302 External CI: Fix rocPyDecode wheel creation (#3852)
- Set values for expected environment variables.
- Accompanying changes required in rocPyDecode repo. Pull request will be made.
2024-10-02 10:21:40 -04:00
spolifroni-amd
28c5e16bf6 updated the radeon note (#3850) 2024-10-02 10:04:36 -04:00
Michael Benavidez
d7e3a38e2c Add links to gpu cluster network guides (#3763)
* Add links to gpu cluster network guides

* Add newline character to eof

* Make link absolute

* add dynamic branch in toc

* remove unnecessary page

clean up

* clean up index/toc

* make multi-node topics adjacent

---------

Co-authored-by: Peter Park <peter.park@amd.com>
2024-10-01 14:05:57 -04:00
spolifroni-amd
f86f275cf1 Restructured the contributions section. (#3715)
* testing if this file is editable

* changed 'kebob-case' to 'dash-case'

* Restructured the page to be more straightforward and provide additional repo information

* forgot to save

* Moved the topic sentence

* Wrong accent on the a in diataxis

* Removed the feedback info from contributing and moved it to Feedback

* fixed spelling errors

* fixed some wording and removed second person text

* consolidated Build and Structure into Contribute; edited toolchai to (hopefully) conform to style guide; updated toc

* updated the titles in the toc

* made changes based on feedback

* it's better when you save

* removed structure and build; fixed something for the linter

* added rst to wordlist

* added customizations to wordlist
2024-10-01 13:59:51 -04:00
18 changed files with 375 additions and 541 deletions

View File

@@ -97,7 +97,10 @@ jobs:
displayName: Create wheel file
inputs:
targetType: inline
script: python setup.py bdist_wheel
script: |
export ROCM_PATH=$(Agent.BuildDirectory)/rocm
export HIP_INCLUDE_DIRS=$(Agent.BuildDirectory)/rocm/include/hip
python3 setup.py bdist_wheel
workingDirectory: $(Build.SourcesDirectory)
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-prepare-package.yml
parameters:

View File

@@ -318,13 +318,6 @@ jobs:
targetType: inline
script: git clone https://github.com/pytorch/vision.git --depth=1 --recurse-submodules
workingDirectory: $(Build.SourcesDirectory)
- task: Bash@3
displayName: Apply vision patch
inputs:
targetType: inline
script: |
git apply $(Build.SourcesDirectory)/.azuredevops/patches/torchvision-package-name.patch
workingDirectory: $(Build.SourcesDirectory)/vision
- task: Bash@3
displayName: Build vision
inputs:

View File

@@ -1,34 +0,0 @@
From 036307033d5c187b3123dae46477feacbd06d0ab Mon Sep 17 00:00:00 2001
From: Joseph Macaranas <Joseph.Macaranas@amd.com>
Date: Sun, 22 Sep 2024 23:03:48 -0400
Subject: [PATCH] Allow custom package name for CI builds of torchvision
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 4b0525d8e4..2c51ce04f2 100644
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ CSRS_DIR = ROOT_DIR / "torchvision/csrc"
IS_ROCM = (torch.version.hip is not None) and (ROCM_HOME is not None)
BUILD_CUDA_SOURCES = (torch.cuda.is_available() and ((CUDA_HOME is not None) or IS_ROCM)) or FORCE_CUDA
-PACKAGE_NAME = "torchvision"
+PACKAGE_NAME = os.getenv("TORCHVISION_PACKAGE_NAME", "torchvision")
print("Torchvision build configuration:")
print(f"{FORCE_CUDA = }")
@@ -98,7 +98,7 @@ def get_requirements():
except DistributionNotFound:
return None
- pytorch_dep = "torch"
+ pytorch_dep = os.getenv("TORCH_PACKAGE_NAME", "torch")
if os.getenv("PYTORCH_VERSION"):
pytorch_dep += "==" + os.getenv("PYTORCH_VERSION")
--
2.44.0.windows.1

View File

@@ -0,0 +1,46 @@
import os
import requests
import hashlib
import sys
def download_dotfile(url, file_path):
response = requests.get(url)
if response.status_code == 200:
with open(file_path, 'wb') as f:
f.write(response.content)
else:
raise Exception(f"Failed to download file from {url}. Status code: {response.status_code}")
def hash_file(file_path):
sha256_hash = hashlib.sha256()
with open(file_path, 'rb') as f:
for byte_block in iter(lambda: f.read(4096), b""):
sha256_hash.update(byte_block)
return sha256_hash.hexdigest()
def compare_files(local_file, downloaded_file):
local_hash = hash_file(local_file)
downloaded_hash = hash_file(downloaded_file)
return local_hash == downloaded_hash
def main():
script_directory = os.path.dirname(os.path.abspath(__file__))
local_dotfile = os.path.join(script_directory, 'input.dot')
downloaded_dotfile = os.path.join(script_directory, 'dependency_graph.dot')
url = 'https://raw.githubusercontent.com/ROCm/ROCm/refs/heads/generatedependencygraph/.azuredevops/scripts/dependency_graph.dot'
try:
download_dotfile(url, downloaded_dotfile)
if compare_files(local_dotfile, downloaded_dotfile):
print("The local DOT file and the downloaded DOT file are the same.")
else:
print("The local DOT file and the downloaded DOT file are different.")
# Exit with a non-zero status to signal failed/unstable build on Jenkins
# to trigger post-build email
sys.exit(1)
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,149 @@
import os
import yaml
from graphviz import Digraph
# Set DEBUG to False for normal output, True for debug output
DEBUG = False
def debug_print(message):
if DEBUG:
print(message)
import os
import yaml
def extract_dependencies(exclude_nodes=[]):
dependencies = {}
debug_print("Extracting dependencies from YAML files...")
# Define a mapping of specific filenames to component names
component_name_mapping = {
'HIP.yml': 'clr', # Remap HIP.yml to clr in graph
}
script_directory = os.path.dirname(os.path.abspath(__file__))
yaml_directory = os.path.join(script_directory, '..', 'components')
for filename in os.listdir(yaml_directory):
if filename.endswith(".yaml") or filename.endswith(".yml"):
debug_print(f"Processing file: {filename}")
try:
with open(os.path.join(yaml_directory, filename), 'r') as file:
data = yaml.safe_load(file) or {}
parameters = data.get('parameters', [])
# Check for both 'rocmDependencies' and 'rocmDependenciesAMD'
rocm_dependencies = next((param['default'] for param in parameters if param['name'] == 'rocmDependencies' or param['name'] == 'rocmDependenciesAMD'), [])
test_dependencies = next((param['default'] for param in parameters if param['name'] == 'rocmTestDependencies'), [])
unique_dependencies = list(set(rocm_dependencies + test_dependencies))
unique_dependencies = [dep for dep in unique_dependencies if dep not in exclude_nodes]
# Use the mapped component name if it exists
component_name = component_name_mapping.get(filename, os.path.splitext(filename)[0])
dependencies[component_name] = {
'dependencies': unique_dependencies
}
debug_print(f"Found unique dependencies for {component_name}: {unique_dependencies}")
except Exception as e:
print(f"Error processing {filename}: {e}")
return dependencies
def simplify_dependencies(graph):
simplified_graph = {}
for component, deps in graph.items():
if component not in simplified_graph:
simplified_graph[component] = set(deps) # Use a set for uniqueness
for dep in deps:
if dep in graph: # If the dependency has its own dependencies
for sub_dep in graph[dep]:
simplified_graph[component].discard(sub_dep) # Remove transitive dependencies
# Convert sets back to lists
for component in simplified_graph:
simplified_graph[component] = list(simplified_graph[component])
return simplified_graph
def build_dependency_graph(dependencies, exclude_nodes=None):
if exclude_nodes is None:
exclude_nodes = []
graph = {}
debug_print("Building dependency graph...")
for component, deps in dependencies.items():
if component in exclude_nodes:
continue # Skip excluded components
# Ensure uniqueness and prevent self-dependency
all_deps = [dep for dep in set(deps['dependencies']) if dep != component and dep not in exclude_nodes]
graph[component] = all_deps
debug_print(f"{component} -> {all_deps}")
# Simplify the dependencies to remove transitive dependencies
simplified_graph = simplify_dependencies(graph)
return simplified_graph
def build_full_dependency_tree(graph):
tree = {}
debug_print("Building full dependency tree...")
def dfs(component, visited):
if component in visited:
return
visited.add(component)
for dep in graph.get(component, []):
# Prevent self-dependency in the tree
if dep != component:
if dep not in tree:
tree[dep] = []
if component not in tree[dep]: # Prevent duplicates
tree[dep].append(component)
dfs(dep, visited)
for component in graph.keys():
dfs(component, set())
return tree
def visualize_graph(graph):
dot = Digraph()
# sort edges for consistent dot file hash
for component in sorted(graph):
for dep in sorted(graph[component]):
dot.edge(component, dep)
script_directory = os.path.dirname(os.path.abspath(__file__))
# make an input dot file for comparisons
dot_file_path = os.path.join(script_directory, 'input.dot')
with open(dot_file_path, 'w') as f:
f.write(dot.source)
dot.render(os.path.join(script_directory, 'dependency_graph'), format='png', cleanup=True) # Save as PNG
def main():
exclude_deps = ['rocm-examples']
dependencies = extract_dependencies(exclude_nodes=exclude_deps)
if not dependencies:
debug_print("No dependencies found.")
return
graph = build_dependency_graph(dependencies, exclude_nodes=exclude_deps)
full_tree = build_full_dependency_tree(graph)
print("Dependency tree:")
print(full_tree)
# Call this function after building the graph
visualize_graph(full_tree)
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,94 @@
digraph {
AMDMIGraphX -> MIVisionX
HIPIFY -> rccl
MIOpen -> AMDMIGraphX
MIVisionX -> rocAL
"ROCR-Runtime" -> clr
"ROCR-Runtime" -> rocminfo
ROCdbgapi -> ROCgdb
ROCdbgapi -> rocprofiler
ROCdbgapi -> rocr_debug_agent
ROCgdb -> aomp
ROCmValidationSuite -> rdc
amdsmi -> aomp
amdsmi -> rdc
aomp -> hipBLASLt
aomp -> rccl
aomp -> rocFFT
aomp -> rpp
"aomp-extras" -> rccl
"aomp-extras" -> rocBLAS
clr -> ROCdbgapi
clr -> composable_kernel
clr -> half
clr -> "hip-tests"
clr -> "hipBLAS-common"
clr -> rocDecode
clr -> rocMLIR
clr -> rocPRIM
clr -> rocRAND
clr -> rocm_bandwidth_test
clr -> roctracer
composable_kernel -> MIOpen
composable_kernel -> hipTensor
half -> MIOpen
half -> rpp
hipBLAS -> MIOpen
hipBLAS -> hipfort
"hipBLAS-common" -> hipBLASLt
hipBLASLt -> rocBLAS
hipFFT -> hipfort
hipRAND -> ROCmValidationSuite
hipRAND -> rocFFT
hipRAND -> rocThrust
hipSOLVER -> hipfort
hipSPARSE -> hipSPARSELt
hipSPARSE -> rocSOLVER
hipTensor -> rpp
"llvm-project" -> "ROCR-Runtime"
"llvm-project" -> "aomp-extras"
rccl -> omnitrace
rccl -> "rocprofiler-sdk"
rocBLAS -> ROCmValidationSuite
rocBLAS -> rocSPARSE
rocBLAS -> rocWMMA
rocDecode -> MIVisionX
rocDecode -> rocPyDecode
rocFFT -> hipFFT
rocMLIR -> MIOpen
rocPRIM -> hipCUB
rocPRIM -> rocSPARSE
rocPRIM -> rocThrust
rocRAND -> MIOpen
rocRAND -> hipRAND
rocRAND -> rocALUTION
rocSOLVER -> hipBLAS
rocSOLVER -> hipSOLVER
rocSPARSE -> hipSPARSE
rocSPARSE -> rocALUTION
"rocm-cmake" -> "llvm-project"
"rocm-core" -> aomp
"rocm-core" -> rocDecode
"rocm-core" -> rocprofiler
rocm_smi_lib -> "ROCR-Runtime"
rocminfo -> ROCdbgapi
rocminfo -> composable_kernel
rocminfo -> half
rocminfo -> "hip-tests"
rocminfo -> "hipBLAS-common"
rocminfo -> rocDecode
rocminfo -> rocMLIR
rocminfo -> rocPRIM
rocminfo -> rocRAND
rocminfo -> rocm_bandwidth_test
rocminfo -> roctracer
rocprofiler -> hipfort
rocprofiler -> omniperf
rocprofiler -> omnitrace
rocprofiler -> rdc
"rocprofiler-register" -> "ROCR-Runtime"
roctracer -> aomp
roctracer -> rocprofiler
roctracer -> "rocprofiler-sdk"
rpp -> MIVisionX
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

View File

@@ -490,6 +490,7 @@ cuLIB
cuRAND
cuSOLVER
cuSPARSE
customizations
cTDP
dataset
datasets
@@ -698,6 +699,7 @@ rocsolver
rocsparse
rocthrust
roctracer
rst
runtime
runtimes
sL

View File

@@ -13,7 +13,7 @@ You can also refer to the :ref:`past versions of ROCm compatibility matrix<past-
.. note::
AMD Radeon and Radeon Pro GPUs can be used for graphics-related purposes or in headless environments for compute purposes (no graphics components). If youre not using Radeon or Radeon Pro GPUs in a headless environment, review the `Compatibility matrices <https://rocm.docs.amd.com/projects/radeon/en/latest/docs/compatibility.html>`_ in the Use ROCm on Radeon GPU documentation.
Like AMD Instinct accelerators, AMD Radeon and Radeon Pro GPUs can be used in environments for compute purposes (no display information or graphics). If using AMD Radeon or Radeon Pro GPUs with ROCm for graphics-related purposes (for example, display connected), review the `Compatibility matrices <https://rocm.docs.amd.com/projects/radeon/en/latest/docs/compatibility.html>`_ in the Use ROCm on Radeon GPU documentation to confirm system requirements.
.. |br| raw:: html

View File

@@ -1,153 +0,0 @@
<head>
<meta charset="UTF-8">
<meta name="description" content="Building ROCm documentation">
<meta name="keywords" content="documentation, Visual Studio Code, GitHub, command line,
AMD, ROCm">
</head>
# Building documentation
You can build our documentation via GitHub (in a pull request) or locally (using the command line or
Visual Studio (VS) Code.
## GitHub
If you open a pull request on the `develop` branch of a ROCm repository and scroll to the bottom of
the page, there is a summary panel. Next to the line
`docs/readthedocs.com:advanced-micro-devices-demo`, there is a `Details` link. If you click this, it takes
you to the Read the Docs build for your pull request.
![Screenshot of the GitHub documentation build link](../data/contribute/github-docs-build.png)
If you don't see this line, click `Show all checks` to get an itemized view.
## Command line
You can build our documentation via the command line using Python.
See the `build.tools.python` setting in the [Read the Docs configuration file](https://github.com/ROCm/ROCm/blob/develop/.readthedocs.yaml) for the Python version used by Read the Docs to build documentation.
See the [Python requirements file](https://github.com/ROCm/ROCm/blob/develop/docs/sphinx/requirements.txt) for Python packages needed to build the documentation.
Use the Python Virtual Environment (`venv`) and run the following commands from the project root:
```sh
python3 -mvenv .venv
.venv/bin/python -m pip install -r docs/sphinx/requirements.txt
.venv/bin/python -m sphinx -T -E -b html -d _build/doctrees -D language=en docs _build/html
```
Navigate to `_build/html/index.html` and open this file in a web browser.
## Visual Studio Code
With the help of a few extensions, you can create a productive environment to author and test
documentation locally using Visual Studio (VS) Code. Follow these steps to configure VS Code:
1. Install the required extensions:
* Python: `(ms-python.python)`
* Live Server: `(ritwickdey.LiveServer)`
2. Add the following entries to `.vscode/settings.json`.
```json
{
"liveServer.settings.root": "/.vscode/build/html",
"liveServer.settings.wait": 1000,
"python.terminal.activateEnvInCurrentTerminal": true
}
```
* `liveServer.settings.root`: Sets the root of the output website for live previews. Must be changed
alongside the `tasks.json` command.
* `liveServer.settings.wait`: Tells the live server to wait with the update in order to give Sphinx time to
regenerate the site contents and not refresh before the build is complete.
* `python.terminal.activateEnvInCurrentTerminal`: Activates the automatic virtual environment, so you
can build the site from the integrated terminal.
3. Add the following tasks to `.vscode/tasks.json`.
```json
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Docs",
"type": "process",
"windows": {
"command": "${workspaceFolder}/.venv/Scripts/python.exe"
},
"command": "${workspaceFolder}/.venv/bin/python3",
"args": [
"-m",
"sphinx",
"-j",
"auto",
"-T",
"-b",
"html",
"-d",
"${workspaceFolder}/.vscode/build/doctrees",
"-D",
"language=en",
"${workspaceFolder}/docs",
"${workspaceFolder}/.vscode/build/html"
],
"problemMatcher": [
{
"owner": "sphinx",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(?:.*\\.{3}\\s+)?(\\/[^:]*|[a-zA-Z]:\\\\[^:]*):(\\d+):\\s+(WARNING|ERROR):\\s+(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
},
{
"owner": "sphinx",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(?:.*\\.{3}\\s+)?(\\/[^:]*|[a-zA-Z]:\\\\[^:]*):{1,2}\\s+(WARNING|ERROR):\\s+(.*)$",
"file": 1,
"severity": 2,
"message": 3
}
}
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
```
> Implementation detail: two problem matchers were needed to be defined,
> because VS Code doesn't tolerate some problem information being potentially
> absent. While a single regex could match all types of errors, if a capture
> group remains empty (the line number doesn't show up in all warning/error
> messages) but the `pattern` references said empty capture group, VS Code
> discards the message completely.
4. Configure the Python virtual environment (`venv`).
From the Command Palette, run `Python: Create Environment`. Select `venv` environment and
`docs/sphinx/requirements.txt`.
5. Build the docs.
Launch the default build task using one of the following options:
* A hotkey (the default is `Ctrl+Shift+B`)
* Issuing the `Tasks: Run Build Task` from the Command Palette
6. Open the live preview.
Navigate to the site output within VS Code: right-click on `.vscode/build/html/index.html` and
select `Open with Live Server`. The contents should update on every rebuild without having to
refresh the browser.

View File

@@ -4,113 +4,68 @@
<meta name="keywords" content="ROCm, contributing, contribute, maintainer, contributor">
</head>
# Contribute to ROCm documentation
# Contributing to the ROCm documentation
All ROCm projects are GitHub-based, so if you want to contribute, you can do so by:
The ROCm documentation, like all of ROCm, is open source and available on GitHub. You can contribute to the ROCm documentation by forking the appropriate repository, making your changes, and opening a pull request.
* [Submitting a pull request in the appropriate GitHub repository](#submit-a-pull-request)
* [Creating an issue in the appropriate GitHub repository](#create-an-issue)
* [Suggesting a new feature](#suggest-a-new-feature)
To provide feedback on the ROCm documentation, including submitting an issue or suggesting a feature, see [Providing feedback about the ROCm documentation](./feedback.md).
```{important}
By creating a pull request (PR), you agree to allow your contribution to be licensed under the terms of the
LICENSE.txt file in the corresponding repository. Different repositories may use different licenses.
```
## The ROCm repositories
## Submit a pull request
The repositories for ROCm and all ROCm components are available on GitHub.
To make edits to our documentation via PR, follow these steps:
| Module | Documentation location |
| --- | --- |
| ROCm framework | [https://github.com/ROCm/ROCm/tree/develop/docs](https://github.com/ROCm/ROCm/tree/develop/docs) |
| ROCm installation for Linux | [https://github.com/ROCm/rocm-install-on-linux/tree/develop/docs](https://github.com/ROCm/rocm-install-on-linux/tree/develop/docs) |
| ROCm HIP SDK installation for Windows | [https://github.com/ROCm/rocm-install-on-windows/tree/develop/docs](https://github.com/ROCm/rocm-install-on-windows/tree/develop/docs) |
1. Identify the repository and the file you want to update. For example, to update this page, you would
need to modify content located in this file:
`https://github.com/ROCm/ROCm/blob/develop/docs/contribute/contributing.md`
Individual components have their own repositories with their own documentation in their own `docs` folders.
2. (optional, but recommended) Fork the repository.
The sub-folders within the `docs` folders across ROCm are typically structured as follows:
3. Clone the repository locally and (optionally) add your fork. Select the green 'Code' button and copy
the URL (e.g., `git@github.com:ROCm/ROCm.git`).
| Sub-folder name | Documentation type |
|-------|----------|
| `install` | Installation instructions, build instructions, and prerequisites |
| `conceptual` | Important concepts |
| `how-to` | How to implement specific use cases |
| `tutorials` | Tutorials |
| `reference` | API references and other reference resources |
* From your terminal, run:
## Editing and adding to the documentation
```bash
git clone git@github.com:ROCm/ROCm.git
```
The ROCm documentation is written in [reStructuredText (rst)](https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html) and [Github-flavoured Markdown](https://github.github.com/gfm/), and follows the [Google developer documentation style guide](https://developers.google.com/style/highlights). reStructuredText is preferred when adding content to the documentation.
* Optionally add your fork to this local copy of the repository by running:
To edit or add to the documentation:
```bash
git add remote <name-of-my-fork> <git@github.com:my-username/ROCm.git>
```
1. Fork the repository you want to add to or edit.
2. Clone your fork locally.
3. Create a new local branch cut from the `develop` branch of the repository.
4. Make your changes to the documentation.
To get the URL of your fork, go to your GitHub profile, select the fork and click the green 'Code'
button (the same process you followed to get the main GitHub repository URL).
4. Change directory into your local copy of the repository, and run ``git pull`` (or ``git pull origin develop``) to ensure your local copy has the most recent content.
5. Create and checkout a new branch using the following command:
5. Optionally, build the documentation locally before creating a pull request by running the following commands from within the `docs` folder:
```bash
git checkout -b <branch_name>
```
6. Change directory into the `./docs` folder and make any documentation changes locally using your preferred code editor. Follow the guidelines listed on the
[documentation structure](./doc-structure.md) page.
```{note}
Spell checking is performed for pull requests by {doc}`ROCm Docs Core<rocm-docs-core:index>`. To ensure your PR passes spell checking you might need at add new words or acronyms to the `.wordlist.txt` file as described in {doc}`Spell Check<rocm-docs-core:user_guide/spellcheck>`.
```
7. Optionally run a local test build of the documentation to ensure the content builds and looks as expected. In your terminal, run the following commands from within the `./docs` folder of your cloned repository:
```bash
pip3 install -r sphinx/requirements.txt # You only need to run this command once
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
```
The build output files are located in the `docs/_build` folder. To preview your build, open the index file
(`docs/_build/html/index.html`) file. For more information, see [Building documentation](building.md). To learn
more about our build tools, see [Documentation toolchain](toolchain.md).
The output files will be located in the `docs/_build` folder. Open `docs/_build/html/index.html` to view the documentation.
8. Commit your changes and push them to GitHub by running:
For more information on ROCm build tools, see [Documentation toolchain](toolchain.md).
6. Push your changes. A GitHub link will be returned in the output of the `git push` command. Open this link in a browser to create the pull request.
```bash
git add <path-to-my-modified-file> # To add all modified files, you can use: git add .
git commit -m "my-updates"
git push <name-of-my-fork>
```
The documentation is built as part of the checks on pull request, along with spell checking and linting. Scroll to the bottom of your pull request to view all the checks.
After pushing, you will get a GitHub link in the terminal output. Copy this link and paste it into a
browser to create your PR.
Verify that the linking and spell checking have passed, and that the documentation was built successfully. New words or acronyms can be added to the [wordlist file](https://github.com/ROCm/rocm-docs-core/blob/develop/.wordlist.txt) as needed.
## Create an issue
The Read The Docs build of your pull request can be accessed by clicking on the Details link next to the Read The Docs build check. Verify that your changes are in the build and look as expected.
1. To create a new GitHub issue, select the 'Issues' tab in the appropriate repository
(e.g., https://github.com/ROCm/ROCm/issues).
2. Use the search bar to make sure the issue doesn't already exist.
3. If your issue is not already listed, select the green 'New issue' button to the right of the page. Select
the type of issue and fill in the resulting template.
Your pull request will be reviewed by a member of the ROCm documentation team.
### General issue guidelines
See the [GitHub documentation](https://docs.github.com/en) for information on how to fork and clone a repository, and how to create and push a local branch.
* Use your best judgement for issue creation. If your issue is already listed, upvote the issue and
comment or post to provide additional details, such as how you reproduced this issue.
* If you're not sure if your issue is the same, err on the side of caution and file your issue.
You can add a comment to include the issue number (and link) for the similar issue. If we evaluate
your issue as being the same as the existing issue, we'll close the duplicate.
* If your issue doesn't exist, use the issue template to file a new issue.
* When filing an issue, be sure to provide as much information as possible, including script output so
we can collect information about your configuration. This helps reduce the time required to
reproduce your issue.
* Check your issue regularly, as we may require additional information to successfully reproduce the
issue.
## Suggest a new feature
Use the [GitHub Discussion forum](https://github.com/ROCm/ROCm/discussions)
(Ideas category) to propose new features. Our maintainers are happy to provide direction and
feedback on feature development.
## Future development workflow
The current ROCm development workflow is GitHub-based. If, in the future, we change this platform,
the tools and links may change. In this instance, we will update contribution guidelines accordingly.
```{important}
By creating a pull request (PR), you agree to allow your contribution to be licensed under the terms of the
LICENSE.txt file in the corresponding repository. Different repositories can use different licenses.
```

View File

@@ -1,219 +0,0 @@
# Documentation structure
Our documentation follows the Pitchfork folder structure. Most documentation files are stored in the
`/docs` folder. Some special files (such as release, contributing, and changelog) are stored in the root
(`/`) folder.
All images are stored in the `/docs/data` folder. An image's file path mirrors that of the documentation
file where it is used.
Our naming structure uses kebab case; for example, `my-file-name.rst`.
## Supported formats and syntax
Our documentation includes both Markdown and RST files. We are gradually transitioning existing
Markdown to RST in order to more effectively meet our documentation needs. When contributing,
RST is preferred; if you must use Markdown, use GitHub-flavored Markdown.
We use [Sphinx Design](https://sphinx-design.readthedocs.io/en/latest/index.html) syntax and compile
our API references using [Doxygen](https://www.doxygen.nl/).
The following table shows some common documentation components and the syntax convention we
use for each:
<table>
<tr>
<th>Component</th>
<th>RST syntax</th>
</tr>
<tr>
<td>Code blocks</td>
<td>
```rst
.. code-block:: language-name
My code block.
```
</td>
</tr>
<tr>
<td>Cross-referencing internal files</td>
<td>
```rst
:doc:`Title <../path/to/file/filename>`
```
</td>
</tr>
<tr>
<td>External links</td>
<td>
```rst
`link name <URL>`_
```
</td>
</tr>
<tr>
<tr>
<td>Headings</td>
<td>
```rst
******************
Chapter title (H1)
******************
Section title (H2)
===============
Subsection title (H3)
---------------------
Sub-subsection title (H4)
^^^^^^^^^^^^^^^^^^^^
```
</td>
</tr>
<tr>
<td>Images</td>
<td>
```rst
.. image:: image1.png
```
</td>
</tr>
<tr>
<td>Internal links</td>
<td>
```rst
1. Add a tag to the section you want to reference:
.. _my-section-tag: section-1
Section 1
==========
2. Link to your tag:
As shown in :ref:`section-1`.
```
</td>
</tr>
<tr>
<tr>
<td>Lists</td>
<td>
```rst
# Ordered (numbered) list item
* Unordered (bulleted) list item
```
</td>
</tr>
<tr>
<tr>
<td>Math (block)</td>
<td>
```rst
.. math::
A = \begin{pmatrix}
0.0 & 1.0 & 1.0 & 3.0 \\
4.0 & 5.0 & 6.0 & 7.0 \\
\end{pmatrix}
```
</td>
</tr>
<tr>
<td>Math (inline)</td>
<td>
```rst
:math:`2 \times 2 `
```
</td>
</tr>
<tr>
<td>Notes</td>
<td>
```rst
.. note::
My note here.
```
</td>
</tr>
<tr>
<td>Tables</td>
<td>
```rst
.. csv-table:: Optional title here
:widths: 30, 70 #optional column widths
:header: "entry1 header", "entry2 header"
"entry1", "entry2"
```
</td>
</tr>
</table>
## Language and style
We use the
[Google developer documentation style guide](https://developers.google.com/style/highlights) to
guide our content.
Font size and type, page layout, white space control, and other formatting
details are controlled via
[rocm-docs-core](https://github.com/ROCm/rocm-docs-core). If you want to notify us
of any formatting issues, create a pull request in our
[rocm-docs-core](https://github.com/ROCm/rocm-docs-core) GitHub repository.
## Building our documentation
<!-- % TODO: Fix the link to be able to work at every files -->
To learn how to build our documentation, refer to
[Building documentation](./building.md).

View File

@@ -4,12 +4,24 @@
<meta name="keywords" content="documentation, pull request, GitHub, AMD, ROCm">
</head>
# Providing feedback
# Providing feedback about the ROCm documentation
Your feedback is welcome. You can provide feedback either through GitHub Discussions or GitHub Issues.
Feedback about the ROCm documentation is welcome. You can provide feedback about the ROCm documentation either through GitHub Discussions or GitHub Issues.
Use [GitHub Discussions](https://github.com/ROCm/ROCm/discussions) to ask questions, view announcements, and communicate with other members of the community.
## Participating in discussions through GitHub Discussions
Use [GitHub Issues](https://github.com/ROCm/ROCm/issues) to submit issues you find with ROCm or with the ROCm documentation.
You can ask questions, view announcements, suggest new features, and communicate with other members of the community through [GitHub Discussions](https://github.com/ROCm/ROCm/discussions).
For information about contributing to the ROCm repository and creating a pull request (PR), see [Contributing](./contributing.md).
## Submitting issues through GitHub Issues
You can submit issues through [GitHub Issues](https://github.com/ROCm/ROCm/issues).
When creating a new issue, follow the following guidelines:
1. Always do a search to see if the same issue already exists. If the issue already exists, upvote it, and comment or post to provide any additional details you might have.
2. If you find an issue that is similar to your issue, log your issue, then add a comment that includes a link to the similar issue, as well as its issue number.
3. Always provide as much information as possible. This helps reduce the time required to reproduce the issue.
After creating your issue, make sure to check it regularly for any requests for additional information.
For information about contributing content to the ROCm documentation, see [Contributing to the ROCm documentation](./contributing.md).

View File

@@ -6,60 +6,47 @@
# ROCm documentation toolchain
Our documentation relies on several open source toolchains and sites.
The ROCm documentation relies on several open source toolchains and sites.
## `rocm-docs-core`
## rocm-docs-core
[rocm-docs-core](https://github.com/ROCm/rocm-docs-core) is an AMD-maintained
project that applies customization for our documentation. This project is the tool most ROCm
repositories use as part of the documentation build. It is also available as a
[pip package on PyPI](https://pypi.org/project/rocm-docs-core/).
project that applies customizations for the ROCm documentation. This project is the tool most ROCm repositories use as part of their documentation build pipeline. It is available as a [pip package on PyPI](https://pypi.org/project/rocm-docs-core/).
See the user and developer guides for rocm-docs-core at
{doc}`rocm-docs-core documentation<rocm-docs-core:index>`.
## Sphinx
[Sphinx](https://www.sphinx-doc.org/en/master/) is a documentation generator originally used for
Python. It is now widely used in the open source community.
[Sphinx](https://www.sphinx-doc.org/en/master/) is a documentation generator originally used for Python. It is now widely used in the open source community.
### Sphinx External ToC
[Sphinx External ToC](https://sphinx-external-toc.readthedocs.io/en/latest/intro.html) is a Sphinx
extension used for ROCm documentation navigation. This tool generates a navigation menu on the left
[Sphinx External ToC](https://sphinx-external-toc.readthedocs.io/en/latest/intro.html) is a Sphinx extension used for ROCm documentation navigation. This tool generates a navigation menu on the left
based on a YAML file (`_toc.yml.in`) that contains the table of contents.
### Sphinx-book-theme
[Sphinx-book-theme](https://sphinx-book-theme.readthedocs.io/en/latest/) is a Sphinx theme that
defines the base appearance for ROCm documentation. ROCm documentation applies some
customization, such as a custom header and footer on top of the Sphinx Book Theme.
[Sphinx-book-theme](https://sphinx-book-theme.readthedocs.io/en/latest/) is a Sphinx theme that defines the base appearance for ROCm documentation. ROCm documentation applies some customization, such as a custom header and footer, on top of the Sphinx Book Theme.
### Sphinx Design
[Sphinx design](https://sphinx-design.readthedocs.io/en/latest/index.html) is a Sphinx extension that
adds design functionality. ROCm documentation uses Sphinx Design for grids, cards, and synchronized
tabs.
[Sphinx design](https://sphinx-design.readthedocs.io/en/latest/index.html) is a Sphinx extension that adds design functionality. ROCm documentation uses Sphinx Design for grids, cards, and synchronized tabs.
## Doxygen
[Doxygen](https://www.doxygen.nl/) is a documentation generator that extracts information from inline
code. ROCm projects typically use Doxygen for public API documentation (unless the upstream project
uses a different tool).
[Doxygen](https://www.doxygen.nl/) is a documentation generator that extracts information from in-code comments. It is used for API documentation.
## Breathe
[Breathe](https://www.breathe-doc.org/) is a Sphinx plugin to integrate Doxygen content.
[Breathe](https://www.breathe-doc.org/) is a Sphinx plugin for integrating Doxygen content.
## MyST
[Markedly Structured Text (MyST)](https://myst-tools.org/docs/spec) is an extended flavor of
Markdown ([CommonMark](https://commonmark.org/)) influenced by reStructuredText (RST) and
Sphinx. It's integrated into ROCm documentation by the Sphinx extension
[`myst-parser`](https://myst-parser.readthedocs.io/en/latest/).
A MyST syntax cheat sheet is available on the [Jupyter reference](https://jupyterbook.org/en/stable/reference/cheatsheet.html) site.
[Markedly Structured Text (MyST)](https://myst-tools.org/docs/spec) is an extended flavor of Markdown ([CommonMark](https://commonmark.org/)) influenced by reStructuredText (rst) and Sphinx. It is integrated into the ROCm documentation with the [`myst-parser`](https://myst-parser.readthedocs.io/en/latest/) Sphinx extension.
See the [MyST syntax cheat sheet](https://jupyterbook.org/en/stable/reference/cheatsheet.html) at the Jupyter Book site.
## Read the Docs
[Read the Docs](https://docs.readthedocs.io/en/stable/) is the service that builds and hosts the HTML
documentation generated using Sphinx to our end users.
[Read the Docs](https://docs.readthedocs.io/en/stable/) is the service that builds and hosts the HTML version of the ROCm documentation.

View File

@@ -46,6 +46,7 @@ ROCm documentation is organized into the following categories:
* [Fine-tuning LLMs and inference optimization](./how-to/llm-fine-tuning-optimization/index.rst)
* [System optimization](./how-to/system-optimization/index.rst)
* [AMD Instinct MI300X tuning guides](./how-to/tuning-guides/mi300x/index.rst)
* [GPU cluster networking](https://rocm.docs.amd.com/projects/gpu-cluster-networking/en/latest/index.html)
* [System debugging](./how-to/system-debugging.md)
* [Using MPI](./how-to/gpu-enabled-mpi.rst)
* [Using advanced compiler features](./conceptual/compiler-topics.md)

View File

@@ -77,9 +77,11 @@ subtrees:
title: System tuning
- file: how-to/tuning-guides/mi300x/workload.rst
title: Workload tuning
- file: how-to/system-debugging.md
- url: https://rocm.docs.amd.com/projects/gpu-cluster-networking/en/${branch}/index.html
title: GPU cluster networking
- file: how-to/gpu-enabled-mpi.rst
title: Using MPI
- file: how-to/system-debugging.md
- file: conceptual/compiler-topics.md
title: Using advanced compiler features
subtrees:
@@ -173,16 +175,12 @@ subtrees:
- caption: Contribute
entries:
- file: contribute/contributing.md
title: Contribute to ROCm docs
title: Contributing to the ROCm docmentation
subtrees:
- entries:
- file: contribute/doc-structure.md
title: Documentation structure
- file: contribute/toolchain.md
title: Documentation toolchain
- file: contribute/building.md
title: Build our documentation
title: ROCm documentation toolchain
- file: contribute/feedback.md
title: Provide feedback
title: Providing feedback about the ROCm documentation
- file: about/license.md
title: ROCm license
title: ROCm licenses

View File

@@ -1,2 +1,2 @@
rocm-docs-core==1.8.1
rocm-docs-core==1.8.2
sphinx-reredirects

View File

@@ -92,7 +92,7 @@ requests==2.32.3
# via
# pygithub
# sphinx
rocm-docs-core==1.8.1
rocm-docs-core==1.8.2
# via -r requirements.in
smmap==5.0.1
# via gitdb