Skip to content

Commit

Permalink
Docs: refactor and integrate into ROCm docs portal (ROCm#362)
Browse files Browse the repository at this point in the history
* pip-compile docs/requirements.txt

Signed-off-by: Peter Jun Park <[email protected]>

Add Sphinx docs config

Signed-off-by: Peter Jun Park <[email protected]>

Add Sphinx config

Signed-off-by: Peter Jun Park <[email protected]>

Update docs build config

Signed-off-by: Peter Jun Park <[email protected]>

* style(conf.py): Apply black formatting to docs/conf.py

Signed-off-by: Sam Wu <[email protected]>

* Update docs requirements

Signed-off-by: Peter Jun Park <[email protected]>

Update to rocm-docs-core 1.3.0

Signed-off-by: Peter Jun Park <[email protected]>

Update docs requirements

Signed-off-by: Peter Jun Park <[email protected]>

pip-compile requirements

Signed-off-by: Peter Jun Park <[email protected]>

bump rocm-docs-core to 1.5.0

bump rocm-docs-core to 1.4.1

Signed-off-by: Peter Jun Park <[email protected]>

* Add dependabot.yml and update CODEOWNERS

Signed-off-by: Peter Jun Park <[email protected]>

Update toc and conf

Signed-off-by: Peter Jun Park <[email protected]>

update dependabot

* Port docs to rocm-docs standard

Signed-off-by: Peter Jun Park <[email protected]>

Add toc and Diataxis cards

Signed-off-by: Peter Jun Park <[email protected]>

Add basic file structure

Signed-off-by: Peter Jun Park <[email protected]>

add glossary

Signed-off-by: Peter Jun Park <[email protected]>

add includes

Signed-off-by: Peter Jun Park <[email protected]>

Add license.rst

Signed-off-by: Peter Jun Park <[email protected]>

add compatible hw

Signed-off-by: Peter Jun Park <[email protected]>

fix spelling and license

Signed-off-by: Peter Jun Park <[email protected]>

clean up index

Signed-off-by: Peter Jun Park <[email protected]>

clean up installation guides

Signed-off-by: Peter Jun Park <[email protected]>

add basic usage (quickstart)

Signed-off-by: Peter Jun Park <[email protected]>

add ref to global options

update toc

Signed-off-by: Peter Jun Park <[email protected]>

modularize modes and global options

Signed-off-by: Peter Jun Park <[email protected]>

add profile mode

Signed-off-by: Peter Jun Park <[email protected]>

fixes

Signed-off-by: Peter Jun Park <[email protected]>

reorg and clean up

Signed-off-by: Peter Jun Park <[email protected]>

add dynamic omniperf version number in installation guide

Signed-off-by: Peter Jun Park <[email protected]>

add datatemplate

more reorg

Signed-off-by: Peter Jun Park <[email protected]>

clean up

Signed-off-by: Peter Jun Park <[email protected]>

reorg images

move profile mode

reorg

reorg

reorg more

fix formatting

fix headings

ref anchor mi2xx note

add extlinks

add extlinks

Signed-off-by: Peter Jun Park <[email protected]>

black format

fix formatting, anchors

Signed-off-by: Peter Jun Park <[email protected]>

reorg

fix words and formatting

Signed-off-by: Peter Jun Park <[email protected]>

formatting

Signed-off-by: Peter Jun Park <[email protected]>

same

reorg

format

fix formatting

fix toc

Signed-off-by: Peter Jun Park <[email protected]>

format

* impr internal linking and fix sphinx warnings

Signed-off-by: Peter Jun Park <[email protected]>

* add spellcheck/linting from rocm-docs-core

Signed-off-by: Peter Jun Park <[email protected]>

fix rst directives

satisfy spellcheck

fix more spelling

rm unused files

fix spelling and update wordlist

* bump rocm-docs-core to 1.6.0

Signed-off-by: Peter Jun Park <[email protected]>

* add fixes from @skyreflectedinmirrors and @lpaoletti

Signed-off-by: Peter Jun Park <[email protected]>

add references to toc

Signed-off-by: Peter Jun Park <[email protected]>

add more fixes

Signed-off-by: Peter Jun Park <[email protected]>

* add package manager install section

Signed-off-by: Peter Jun Park <[email protected]>

* add fixes

Signed-off-by: Peter Jun Park <[email protected]>

add metadata and fixes

Signed-off-by: Peter Jun Park <[email protected]>

add fixes

bump to 1.6.1

more fixes

fix fmt in profiling examples

Signed-off-by: Peter Jun Park <[email protected]>

add missing mem type table

Signed-off-by: Peter Jun Park <[email protected]>

fix formatting

fmt

* add custom css

Signed-off-by: Peter Jun Park <[email protected]>

fix css fs

* make images/figs click-to-expand

Signed-off-by: Peter Jun Park <[email protected]>

add missed image

update

fix link

* update documentation link in README

Signed-off-by: Peter Jun Park <[email protected]>

* formatting fixes

Signed-off-by: Peter Jun Park <[email protected]>

more formatting

* fix heading

Signed-off-by: Peter Jun Park <[email protected]>

* move archived docs

Signed-off-by: Peter Jun Park <[email protected]>

* exclude archived docs from docs build

Signed-off-by: Peter Jun Park <[email protected]>

* update archived docs workflow

Signed-off-by: Peter Jun Park <[email protected]>

move files

update archived docs workflow

Signed-off-by: Peter Jun Park <[email protected]>

fix version number

clean up workflow

workflow test

workflow test

another workflow test

* rm docs linting

Signed-off-by: Peter Jun Park <[email protected]>

* Apply cmake-format suggested changes

Signed-off-by: Sam Wu <[email protected]>

* Apply cmake-format

Signed-off-by: Sam Wu <[email protected]>

---------

Signed-off-by: Peter Jun Park <[email protected]>
Signed-off-by: Sam Wu <[email protected]>
Co-authored-by: Sam Wu <[email protected]>
Signed-off-by: xuchen-amd <[email protected]>
  • Loading branch information
2 people authored and xuchen-amd committed Oct 29, 2024
1 parent 2dfa7e6 commit 0a96c6b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 26 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: [ amd-mainline ]
paths:
- 'docs/archive/docs-2.x/**'
- 'docs/archive/docs-1.x/**'
- 'docs/archive/docs-2.x/**'
- 'docs/archive/docs-1.x/**'
- '.github/workflows/docs.yml'
Expand Down Expand Up @@ -36,7 +38,7 @@ jobs:
- name: Build 1.x docs
run: |
cd docs/archive/docs-1.x
make html
make html
- name: Build 2.x docs
run: |
cd docs/archive/docs-2.x
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

# frequently used external resources
extlinks = {
"dev-sample": ("https://github.com/ROCm/omniperf/blob/amd-mainline/sample/%s", "%s"),
"dev-sample": ("https://github.com/ROCm/omniperf/blob/dev/sample/%s", "%s"),
"prod-page": (
"https://www.amd.com/en/products/accelerators/instinct/%s.html",
"%s",
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/profile/mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Run ``omniperf profile -h`` for more details. See
Profiling example
-----------------

The `<https://github.com/ROCm/omniperf/blob/amd-mainline/sample/vcopy.cpp>`__ repository
The `<https://github.com/ROCm/omniperf/blob/main/sample/vcopy.cpp>`__ repository
includes source code for a sample GPU compute workload, ``vcopy.cpp``. A copy of
this file is available in the ``share/sample`` subdirectory after a normal
Omniperf installation, or via the ``$OMNIPERF_SHARE/sample`` directory when
Expand Down
25 changes: 4 additions & 21 deletions docs/install/core-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ right for you.
:width: 800

.. _core-install:

Core installation
=================

Expand All @@ -44,12 +44,6 @@ installation.
* CMake ``>= 3.19``
* ROCm ``>= 5.7.1``

.. note::

Omniperf will use the first version of ``Python3`` found in your system's
``PATH``. If the default version of Python3 is older than 3.8, you may need to
update your system's ``PATH`` to point to a newer version of Python3.

Omniperf depends on a number of Python packages documented in the top-level
``requirements.txt`` file. Install these *before* configuring Omniperf.

Expand All @@ -72,16 +66,6 @@ following steps illustrate how to install the necessary Python dependencies
using `pip <https://packaging.python.org/en/latest/>`_ and Omniperf into a
shared location controlled by the ``INSTALL_DIR`` environment variable.

.. tip::

To always run Omniperf with a particular version of python, you can create a
bash alias. For example, to run Omniperf with Python 3.10, you can run the
following command:

.. code-block:: shell
alias omniperf-mypython="/usr/bin/python3.10 /opt/rocm/bin/omniperf"
.. _core-install-cmake-vars:

Configuration variables
Expand Down Expand Up @@ -143,7 +127,6 @@ Install from source
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/{{ config.version }} \
-DPYTHON_DEPS=${INSTALL_DIR}/python-libs \
-DMOD_INSTALL_PATH=${INSTALL_DIR}/modulefiles ..
-DMOD_INSTALL_PATH=${INSTALL_DIR}/modulefiles ..
# install
make install
Expand Down Expand Up @@ -225,21 +208,21 @@ software stack.
.. code-block:: shell
$ sudo apt install omniperf
$ python3 -m pip install -r /opt/rocm/libexec/omniperf/requirements.txt
$ pip install -r /opt/rocm/libexec/omniperf/requirements.txt
.. tab-item:: Red Hat Enterprise Linux

.. code-block:: shell
$ sudo dnf install omniperf
$ python3 -m pip install -r /opt/rocm/libexec/omniperf/requirements.txt
$ pip install -r /opt/rocm/libexec/omniperf/requirements.txt
.. tab-item:: SUSE Linux Enterprise Server

.. code-block:: shell
$ sudo zypper install omniperf
$ python3 -m pip install -r /opt/rocm/libexec/omniperf/requirements.txt
$ pip install -r /opt/rocm/libexec/omniperf/requirements.txt
.. _core-install-rocprof-var:

Expand Down
22 changes: 22 additions & 0 deletions docs/sphinx/static/css/o_custom.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
:root {
--amd-teal-500: #00C2DE;
--amd-teal-750: #00788E;
}

/* Override PyData Sphinx Theme default colors */
html[data-theme='light'] {
--pst-color-primary: var(--amd-teal-750);
--pst-color-primary-bg: var(--amd-teal-500);
--pst-color-table-row-hover-bg: #E2E8F0;
}

html[data-theme='dark'] {
--pst-color-primary: var(--amd-teal-500);
--pst-color-primary-bg: var(--amd-teal-750);
--pst-color-table-row-hover-bg: #1E293B;
}

html[data-theme='light'],
html[data-theme='dark'] {
--pst-color-link: var(--pst-color-primary);
}

a svg {
color: var(--pst-color-text-base);
}

a svg:hover {
color: var(--pst-color-link-hover);
}
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ manner. See
for further reading on this instruction type.

We develop a `simple
kernel <https://github.com/ROCm/omniperf/blob/amd-mainline/sample/stack.hip>`__
kernel <https://github.com/ROCm/omniperf/blob/dev/sample/stack.hip>`__
that uses stack memory:

.. code-block:: cpp
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/profiling-by-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Profiling by example
********************

The following examples refer to sample :doc:`HIP <hip:index>` code located in
:fab:`github` :dev-sample:`ROCm/omniperf/blob/amd-mainline/sample <>` and distributed
:fab:`github` :dev-sample:`ROCm/omniperf/blob/dev/sample <>` and distributed
as part of Omniperf.

.. include:: ./includes/valu-arithmetic-instruction-mix.rst
Expand Down

0 comments on commit 0a96c6b

Please sign in to comment.