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 9637a7b commit fb2bb5b
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:
open-pull-requests-limit: 10
schedule:
interval: "daily"
target-branch: "amd-staging"
target-branch: "dev"
labels:
- "documentation"
- "dependencies"
Expand Down
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/analyze/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Walkthrough
3. Choose your own customized subset of metrics with the ``-b`` (or ``--block``)
option. Or, build your own configuration following
`config_template <https://github.com/ROCm/omniperf/blob/amd-mainline/src/omniperf_soc/analysis_configs/panel_config_template.yaml>`_.
`config_template <https://github.com/ROCm/omniperf/blob/main/src/omniperf_analyze/configs/panel_config_template.yaml>`_.
The following snippet shows how to generate a report containing only metric 2
(:doc:`System Speed-of-Light </conceptual/system-speed-of-light>`).

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
35 changes: 5 additions & 30 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 @@ -142,7 +126,7 @@ Install from source
cd build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/{{ config.version }} \
-DPYTHON_DEPS=${INSTALL_DIR}/python-libs \
-DMOD_INSTALL_PATH=${INSTALL_DIR}/modulefiles/omniperf ..
-DMOD_INSTALL_PATH=${INSTALL_DIR}/modulefiles ..
# install
make install
Expand Down Expand Up @@ -224,30 +208,21 @@ software stack.
.. code-block:: shell
$ sudo apt install omniperf
# Include omniperf in your system PATH
$ sudo update-alternatives --install /usr/bin/omniperf omniperf /opt/rocm/bin/omniperf 0
# Install Python dependencies
$ 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
# Include omniperf in your system PATH
$ sudo update-alternatives --install /usr/bin/omniperf omniperf /opt/rocm/bin/omniperf 0
# Install Python dependencies
$ 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
# Include omniperf in your system PATH
$ sudo update-alternatives --install /usr/bin/omniperf omniperf /opt/rocm/bin/omniperf 0
# Install Python dependencies
$ 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);
}
2 changes: 1 addition & 1 deletion docs/tutorial/includes/infinity-fabric-transactions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ Experiment 5: Coarse-grained, CPU-DRAM reads
----------------------------------------------

In our next fabric experiment, we change our CPU memory allocation to be
:ref:`coarse-grained <memory-type>`. We accomplish this by passing the
`coarse-grained <Mtype>`__. We accomplish this by passing the
``hipHostMalloc`` API the ``hipHostMallocNonCoherent`` flag, to mark the
allocation as coarse-grained:

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/includes/occupancy-limiters-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ SGPR limited
------------

Finally, we modify our kernel once more to make it limited by
:ref:`SGPRs <desc-salu>`:
`SGPRs <salu>`__:

.. code-block:: cpp
Expand Down
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 fb2bb5b

Please sign in to comment.