Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown linting and spell checks from rocm-docs-core #2412

Closed
wants to merge 5 commits into from
Closed
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
130 changes: 72 additions & 58 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,45 @@

## `add-to-project.yaml`

<p>
This workflow adds pull requests and issues to a specific GitHub project board when they are opened.
</p>

- ## Trigger

The workflow is triggered by the following events:

- A pull request being opened.
- A pull request being opened.

- An issue being opened.
- An issue being opened.

- ## Jobs

The workflow has a single job named `add-to-project`. The following step is executed in this job:
- The `add-to-project` job uses the `actions/[email protected]` action to add pull requests and issues to a specific project board. The `with` parameters are `project-url` and `github-token`, which specify the URL of the project board and the GitHub token used to authenticate the action.
- The `add-to-project` job uses the `actions/[email protected]` action to add pull requests and issues to a specific project board. The `with` parameters are `project-url` and `github-token`, which specify the URL of the project board and the GitHub token used to authenticate the action.

For more details, please refer to the [add-to-project.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/add-to-project.yaml) file in the repository.

---

## `benchmark.yaml`

<p>
This workflow runs the `MiGraphX performance benchmarks` and generates reports by comparing the results with the reference data.
</p>

- ## Trigger

Check failure on line 28 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:28 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

TODO: Update [benchmarks.yml (archived)](https://github.com/ROCmSoftwarePlatform/actions/blob/main/.github/workflows/benchmarks.yml) link after workflow is updated
- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [benchmarks.yml (archived)](https://github.com/ROCmSoftwarePlatform/actions/blob/main/.github/workflows/benchmarks.yml)
- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [benchmarks.yml (archived)](https://github.com/ROCmSoftwarePlatform/actions/blob/main/.github/workflows/benchmarks.yml)

- ## Input Parameters

The workflow uses the following input parameters:

- `rocm_version`: the version of ROCm to use for running the benchmarks.
- `rocm_version`: the version of ROCm to use for running the benchmarks.

- `script_repo`: repository that contains the benchmark scripts.
- `script_repo`: repository that contains the benchmark scripts.

- `result_path`: the path where benchmark results will be stored.
- `result_path`: the path where benchmark results will be stored.

- `result_repo`: the repository where the benchmark results will be pushed for comparison.
- `result_repo`: the repository where the benchmark results will be pushed for comparison.

For more details, please refer to the [benchmark.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/benchmark.yaml) file in the repository.

Expand All @@ -51,54 +52,57 @@
Overall, this workflow automates the process of building and testing the AMDMIGraphX project across multiple platforms and versions.
</p>

- ## Trigger

Check failure on line 55 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:55 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow is triggered by the following events:

- A pull request being opened, synchronized or closed.
- A pull request being opened, synchronized or closed.

- On push to the `develop`, `master`, and `release/**` branches.
- On push to the `develop`, `master`, and `release/**` branches.

- ## Jobs

Check failure on line 63 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:63 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Jobs"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md
The following jobs are executed in the workflow:
- `cancel`: This job is responsible for canceling any previous runs of the workflow that may still be running. It runs on an `ubuntu-latest` runner and uses the `styfle/cancel-workflow-action` action to cancel any previous runs of the workflow.

- `tidy`: It runs on an `ubuntu-20.04` runner and runs `clang-tidy` for the codebase in a Docker container with the MIGraphX build environment.
The following jobs are executed in the workflow:
- `cancel`: This job is responsible for canceling any previous runs of the workflow that may still be running. It runs on an `ubuntu-latest` runner and uses the `styfle/cancel-workflow-action` action to cancel any previous runs of the workflow.

- `cppcheck`: It runs on an `ubuntu-20.04` runner and performs static analysis on code in a Docker container, and caches the results for faster subsequent runs.
- `tidy`: It runs on an `ubuntu-20.04` runner and runs `clang-tidy` for the codebase in a Docker container with the MIGraphX build environment.

- `format`: It runs on an `ubuntu-20.04` runner and includes steps for freeing up disk space, caching Docker layers, and checking code formatting.
- `cppcheck`: It runs on an `ubuntu-20.04` runner and performs static analysis on code in a Docker container, and caches the results for faster subsequent runs.

- `pyflakes`: It runs on an `ubuntu-20.04` runner and runs the Pyflakes static analysis tool to detect and report Python code issues.
- `format`: It runs on an `ubuntu-20.04` runner and includes steps for freeing up disk space, caching Docker layers, and checking code formatting.

- `licensing`: It runs on an `ubuntu-20.04` runner and includes steps to free up space, checkout the code, set up Python and run a license check using a Python script.
- `pyflakes`: It runs on an `ubuntu-20.04` runner and runs the Pyflakes static analysis tool to detect and report Python code issues.

- `licensing`: It runs on an `ubuntu-20.04` runner and includes steps to free up space, checkout the code, set up Python and run a license check using a Python script.

We have 2 jobs with multiple matrix configurations, both of them are running on `ubuntu-20.04` runner but right now only `linux` works on all 3 configurations (debug, release, codecov) ,`linux-fpga` works just on (debug).

- `linux`: this job runs continuous integration tests for AMDMIGraphX on a Linux operating system. It tests a variety of build configurations to ensure code quality and compatibility.

- `linux`: this job runs continuous integration tests for AMDMIGraphX on a Linux operating system. It tests a variety of build configurations to ensure code quality and compatibility.

- `linux-fpga`: this job builds and tests AMDMIGraphX on a Linux operating system with support for FPGA acceleration. It includes additional steps to verify FPGA functionality and performance.
- `linux-fpga`: this job builds and tests AMDMIGraphX on a Linux operating system with support for FPGA acceleration. It includes additional steps to verify FPGA functionality and performance.

For more details, please refer to the [ci.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/ci.yaml) file in the repository.

---

## `clean-closed-pr-caches.yaml`

<p>
This workflow has purpose to clean up any cached data related to the pull request.
</p>

- ## Trigger

Check failure on line 94 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:94 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow is triggered by the following events:

- A pull request being closed.
- A pull request being closed.

- ## Jobs

Check failure on line 100 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:100 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Jobs"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow has a single job named `cleanup`. The following steps are executed in this job:
- `Check out code`: step checks out the codebase from the repository.
- `Check out code`: step checks out the codebase from the repository.

- `Cleanup`: step performs the actual cache cleanup using a series of commands.
- `Cleanup`: step performs the actual cache cleanup using a series of commands.

For more details, please refer to the [clean-closed-pr-caches.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/clean-closed-pr-caches.yaml) file in the repository.

Expand All @@ -110,85 +114,93 @@
This workflow generates a report of the MiGraphX benchmark results between two dates and sends it to a specified email address. The report is also uploaded to a specified repository.
</p>

- ## Trigger

Check failure on line 117 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:117 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md
- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [history.yml](https://github.com/ROCmSoftwarePlatform/migraphx-benchmark/blob/main/.github/workflows/history.yml)

- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [history.yml](https://github.com/ROCmSoftwarePlatform/migraphx-benchmark/blob/main/.github/workflows/history.yml)

- ## Input Parameters

Check failure on line 121 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:121 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Input Parameters"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow requires the following inputs:

- `start_date`: Start date for results analysis.
- `start_date`: Start date for results analysis.

- `end_date`: End date for results analysis.
- `end_date`: End date for results analysis.

- `history_repo`: Repository for history results between dates.
- `history_repo`: Repository for history results between dates.

- `benchmark_utils_repo`: Repository where benchmark utils are stored.
- `benchmark_utils_repo`: Repository where benchmark utils are stored.

- `organization`: Organization based on which location of files will be different.
- `organization`: Organization based on which location of files will be different.

For more details, please refer to the [history.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/history.yaml) file in the repository.

---

## `performance.yaml`

<p>
This workflow runs performance tests on the MIGraphX repository and generates a report of the results.
</p>

- ## Trigger

Check failure on line 145 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:145 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow will run reusable workflow [perf-test.yml](https://github.com/ROCmSoftwarePlatform/migraphx-benchmark/blob/main/.github/workflows/perf-test.yml) by the following events:

- Pull requests opened, synchronized or closed on the `develop` branch.
- Pull requests opened, synchronized or closed on the `develop` branch.

- Schedule: Runs every day of the week from Monday to Saturday at 6:00 AM.
- Schedule: Runs every day of the week from Monday to Saturday at 6:00 AM.

- Manual trigger through the "Run workflow" button in the Actions tab of the repository.
- Manual trigger through the "Run workflow" button in the Actions tab of the repository.

- ## Input Parameters

Check failure on line 155 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:155 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Input Parameters"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md

The workflow requires the following inputs:

- `rocm_release`: ROCm version to use for the performance tests.
- `rocm_release`: ROCm version to use for the performance tests.

- `performance_reports_repo`: Repository where the performance reports are stored.
- `performance_reports_repo`: Repository where the performance reports are stored.

- `benchmark_utils_repo`: Repository where the benchmark utilities are stored.
- `benchmark_utils_repo`: Repository where the benchmark utilities are stored.

- `organization`: Organization based on which location of files will be different.
- `organization`: Organization based on which location of files will be different.

- `result_number`: Last N results.
- `result_number`: Last N results.

- `model_timeout`: If a model in the performance test script passes this threshold, it will be skipped.
- `model_timeout`: If a model in the performance test script passes this threshold, it will be skipped.

- `flags`: Command line arguments to be passed to the performance test script. Default is `-r`.
- `flags`: Command line arguments to be passed to the performance test script. Default is `-r`.

For more details, please refer to the [performance.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/performance.yaml) file in the repository.

---

## `rocm-image-release.yaml`

<p>
This workflow builds a Docker image for a specified ROCm release version and pushes it to the specified repository. If image already exists nothing will happen, and there is also option to overwrite existing image.
</p>

- ## Trigger

Check failure on line 183 in .github/workflows/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Multiple headings with the same content

.github/workflows/README.md:183 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "- ## Trigger"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md024.md
- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [rocm-release.yml](https://github.com/ROCmSoftwarePlatform/migraphx-benchmark/blob/main/.github/workflows/rocm-release.yml)

- The workflow is triggered manually through the "Run workflow" button in the Actions tab of the repository and it will run reusable workflow [rocm-release.yml](https://github.com/ROCmSoftwarePlatform/migraphx-benchmark/blob/main/.github/workflows/rocm-release.yml)

- ## Input Parameters

The workflow requires the following inputs:

- `rocm_release`: ROCm release version to build Docker image for.
- `rocm_release`: ROCm release version to build Docker image for.

- `benchmark_utils_repo`: Repository where benchmark utils are stored.
- `benchmark_utils_repo`: Repository where benchmark utils are stored.

- `base_image`: Base image for ROCm Docker build.
- `base_image`: Base image for ROCm Docker build.

- `docker_image`: Docker image name for ROCm Docker build.
- `docker_image`: Docker image name for ROCm Docker build.

- `build_navi`: Build number for the Navi architecture.
- `build_navi`: Build number for the Navi architecture.

- `organization`: The organization name used to determine the location of files.
- `organization`: The organization name used to determine the location of files.

- `overwrite`: Specify whether to overwrite the Docker image if it already exists.
- `overwrite`: Specify whether to overwrite the Docker image if it already exists.

For more details, please refer to the [rocm-image-release.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/rocm-image-release.yaml) file in the repository.

Expand All @@ -201,23 +213,25 @@
</p>

- ## Trigger

The workflow is triggered by the following events:

- Schedule: Runs every week on Friday at 05:07 PM.
- Schedule: Runs every week on Friday at 05:07 PM.

- ## Jobs

The workflow has a single job named `Update and create pull request`. The following steps are executed in this job:
- `get_date`: step sets an environment variable to the current date in the format 'YYYY-MM-DD'.
- `get_date`: step sets an environment variable to the current date in the format 'YYYY-MM-DD'.

- `extract_sha1`: step fetches the latest SHA1 commit hash of the HEAD branch of the `microsoft/onnxruntime` repository and sets it as an environment variable.
- `extract_sha1`: step fetches the latest SHA1 commit hash of the HEAD branch of the `microsoft/onnxruntime` repository and sets it as an environment variable.

- `echo_sha1`: step prints the SHA1 commit hash set in step `extract_sha1`.
- `echo_sha1`: step prints the SHA1 commit hash set in step `extract_sha1`.

- `actions/checkout@v3`: step checks out the codebase from the repository.
- `actions/checkout@v3`: step checks out the codebase from the repository.

- `update_file`: step updates a file in the repository with the SHA1 commit hash fetched in step `extract_sha1`.
- `update_file`: step updates a file in the repository with the SHA1 commit hash fetched in step `extract_sha1`.

- `Make changes to pull request`: step uses the `peter-evans/create-pull-request` action to create a pull request.
- `Make changes to pull request`: step uses the `peter-evans/create-pull-request` action to create a pull request.

For more details, please refer to the [sync-onnxrt-main.yaml](https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/blob/develop/.github/workflows/sync-onnxrt-main.yaml) file in the repository.

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Linting

on:
push:
branches: [develop]
pull_request:
branches: [develop]

jobs:
call-workflow-passing-data:
name: Documentation
uses: RadeonOpenCompute/rocm-docs-core/.github/workflows/linting.yml@develop
8 changes: 8 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config:
default: true
MD013: false
MD024: siblings_only
MD025: false
MD029: false
MD033: false
MD040: false
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Full documentation for MIGraphX is available at
* Added TensorFlow supported ops in driver similar to exist onnx operator list
* Added a MIGRAPHX_TRACE_MATCHES_FOR env variable to filter the matcher trace
* Improved debugging by printing max,min,mean and stddev values for TRACE_EVAL = 2
* You can now use the ` fast_math` flag instead of `ENV` for GELU
* You can now use the `fast_math` flag instead of `ENV` for GELU
* Print message from driver if offload copy is set for compiled program

### Optimizations
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AMD MIGraphX is AMD's graph inference engine, which accelerates machine learning
To use MIGraphX, you can install the binaries or build from source code. Refer to the following sections
for Ubuntu installation instructions (we'll provide instructions for other Linux distributions in the future).

> [!NOTE]
> [!NOTE]
> You must [install ROCm](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html) before
> installing MIGraphX.

Expand Down Expand Up @@ -49,7 +49,7 @@ The following is a list of prerequisites for building MIGraphX.
* [MessagePack](https://msgpack.org/index.html) for model serialization to binary format
* [SQLite3](https://www.sqlite.org/index.html) to create database of kernels' tuning information or run queries on existing database

### Use the ROCm build tool [rbuild](https://github.com/RadeonOpenCompute/rbuild).
### Use the ROCm build tool [rbuild](https://github.com/RadeonOpenCompute/rbuild)

1. Install `rocm-cmake`, `pip3`, `rocblas`, and `miopen-hip`:

Expand Down
6 changes: 4 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# AMD MIGraphX Examples

## Description
This directory contains examples of common use cases for MIGraphX.

## Examples:
This directory contains examples of common use cases for MIGraphX.

## Examples

- [MIGraphX usage and utilities](./migraphx)
- [Vision inference examples](./vision)
- [Natural language inference examples](./nlp)
Expand Down
2 changes: 2 additions & 0 deletions examples/diffusion/python_stable_diffusion_21/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ Get models with optimum
```bash
optimum-cli export onnx --model stabilityai/stable-diffusion-2-1 models/sd21-onnx
```

*Note: `models/sd21-onnx` will be used in the scripts.*

Run the text-to-image script with the following example prompt and seed:

```bash
python txt2img.py --prompt "a photograph of an astronaut riding a horse" --seed 13 --output astro_horse.jpg
```

*Note: The first run will compile the models and cache them to make subsequent runs faster.*

The result should look like this:
Expand Down
2 changes: 1 addition & 1 deletion examples/migraphx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
- [Exporting Frozen Graphs in TF1](./export_frozen_graph_tf1)
- [Exporting Frozen Graphs in TF2](./export_frozen_graph_tf2)
- [MIGraphX Docker Container](./migraphx_docker)
- [MIGraphX Driver](./migraphx_driver)
- [MIGraphX Driver](./migraphx_driver)
Loading
Loading