Skip to content

Commit

Permalink
doc reorganization (#397)
Browse files Browse the repository at this point in the history
* doc reorganization

* revert overload change

* Update index.rst
  • Loading branch information
randyh62 authored Apr 3, 2024
1 parent bfeea61 commit a42a40c
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 37 deletions.
10 changes: 8 additions & 2 deletions docs/cpp_api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
===================
.. meta::
:description: rocThrust API data type support
:keywords: rocThrust, ROCm, API, reference, data type, support

.. _api-reference:

******************************************
API Reference Guide
===================
******************************************

This chapter describes the rocThrust C++ API.

Expand Down
39 changes: 29 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
====================
rocThrust User Guide
====================
.. meta::
:description: rocThrust API data type support
:keywords: rocThrust, ROCm, API, reference, data type, support

Overview
========
.. _index:

rocThrust is a parallel algorithm library. This library has been ported to :doc:`HIP <hip:index>`/:doc:`ROCm <rocm:index>`, which use the :doc:`rocPRIM <rocprim:index>` library. The HIP ported library works on HIP/ROCm platforms. Currently there is no CUDA backend in place.
******************************************
rocThrust documentation
******************************************

rocThrust is a parallel algorithm library. This library has been ported to :doc:`HIP <hip:index>`/:doc:`ROCm <rocm:index>`, which use the :doc:`rocPRIM <rocprim:index>` library. The HIP ported library works on HIP/ROCm platforms. There is no CUDA backend for rocThrust.

Indices and tables
------------------
You can access rocThrust code on the `GitHub repository <https://github.com/ROCm/rocThrust>`_.

* :ref:`genindex`
* :ref:`search`
The documentation is structured as follows:

.. grid:: 2
:gutter: 3

.. grid-item-card:: Installation

* :ref:`install`

.. grid-item-card:: API reference

* :ref:`data-type-support`
* :ref:`api-reference`
* :ref:`genindex`

To contribute to the documentation, refer to
`Contributing to ROCm <https://rocm.docs.amd.com/en/latest/contribute/contributing.html>`_.

You can find licensing information on the
`Licensing <https://rocm.docs.amd.com/en/latest/about/license.html>`_ page.
63 changes: 43 additions & 20 deletions docs/setup/installing.rst → docs/install/installing.rst
Original file line number Diff line number Diff line change
@@ -1,45 +1,61 @@
============
.. meta::
:description: rocThrust API data type support
:keywords: rocThrust, ROCm, API, reference, data type, support

.. _install:

******************************************
Installation
============
******************************************

Introduction
============
There are two main methods for installing rocThrust:

This chapter describes how to obtain rocThrust. There are two main methods: the primary way is to install the prebuilt packages from the ROCm repositories. Alternatively, this chapter also describes how to build rocThrust from source.
* Install the prebuilt packages from the ROCm repositories
* Build and install rocThrust from source files

Prebuilt Packages
=================
Installing prebuilt packages
=============================

Installing the prebuilt rocThrust packages requires a ROCm-enabled platform. See the `ROCm documentation <https://docs.amd.com/>`_ for more information. After installing ROCm or enabling the ROCm repositories, rocThrust can be obtained using the system package manager.

For Ubuntu and Debian::
For Ubuntu and Debian:

.. code-block:: shell
sudo apt-get install rocthrust
For CentOS::
For CentOS:

.. code-block:: shell
sudo yum install rocthrust
For SLES::
For SLES:

.. code-block:: shell
sudo dnf install rocthrust
This will install rocThrust into the ``/opt/rocm`` directory.

Building rocThrust From Source
==============================
Building rocThrust from source files
=====================================

Obtaining Sources
Obtaining sources
-----------------

The rocThrust sources are available from the `rocThrust GitHub Repository <https://github.com/ROCmSoftwarePlatform/rocThrust>`_. Use the branch that matches the system-installed version of ROCm. For example on a system that has ROCm 5.3 installed, use the following command to obtain rocThrust sources::
The rocThrust sources are available from the `rocThrust GitHub Repository <https://github.com/ROCmSoftwarePlatform/rocThrust>`_. Use the branch that matches the system-installed version of ROCm. For example on a system that has ROCm 6.0 installed, use the following command to obtain rocThrust sources:

git checkout -b rocm-5.3 https://github.com/ROCmSoftwarePlatform/rocThrust.git
.. code-block:: shell
Building the Library
git clone -b release/rocm-rel-6.0 https://github.com/ROCm/rocThrust.git
Building the library
--------------------

After obtaining the sources, rocThrust can be built using the installation script. Note that this method only works on Linux, see the following sections for how to build rocThrust on Windows::
After obtaining the sources, rocThrust can be built using the installation script. Note that this method only works on Linux, see the following sections for how to build rocThrust on Windows:

.. code-block:: shell
cd rocThrust
./install --install
Expand All @@ -49,7 +65,9 @@ This automatically builds all required dependencies, excluding HIP and Git, and
Building with rmake.py
----------------------

Alternatively, the ``rmake.py`` script can be used to install rocThrust. This is the recommended method to install rocThrust from source on Windows. After obtaining the sources, rocThrust can be installed this way as follows::
Alternatively, the ``rmake.py`` script can be used to install rocThrust. This is the recommended method to install rocThrust from source on Windows. After obtaining the sources, rocThrust can be installed this way as follows:

.. code-block:: shell
cd rocThrust
# The -i option will install rocThrust into /opt/rocm on Linux, and C:\hipSDK on Windows.
Expand All @@ -60,7 +78,9 @@ Alternatively, the ``rmake.py`` script can be used to install rocThrust. This is
Building with CMake
-------------------

For a more elaborate installation process, rocThrust can be built manually using CMake. This enables certain configuration options that are not exposed to the ``./install`` and ``rmake.py`` scripts. Note that building rocThrust using CMake works on both Linux and Windows. In general, rocThrust can be built and installed using CMake as follows::
For a more elaborate installation process, rocThrust can be built manually using CMake. This enables certain configuration options that are not exposed to the ``./install`` and ``rmake.py`` scripts. Note that building rocThrust using CMake works on both Linux and Windows. In general, rocThrust can be built and installed using CMake as follows:

.. code-block:: shell
cd rocThrust;
# Configure the project
Expand All @@ -72,7 +92,10 @@ For a more elaborate installation process, rocThrust can be built manually using
# Install
cmake --install build
Note that ``CXX`` must be set to ``hipcc`` to build for the ROCm platform. The following configuration options are available, in addition to the built-in CMake options:
.. note::
``CXX`` must be set to ``hipcc`` to build for the ROCm platform.

The following configuration options are available, in addition to the built-in CMake options:

* ``DISABLE_WERROR`` disables passing ``-Werror`` to the compiler during the build. ``ON`` by default.
* ``BUILD_TEST`` controls whether to build the rocThrust tests. ``OFF`` by default.
Expand Down
9 changes: 8 additions & 1 deletion docs/license.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.. meta::
:description: rocThrust API data type support
:keywords: rocThrust, ROCm, API, reference, data type, support

.. _license:

******************************************
License
=======
******************************************

.. include:: ../LICENSE
10 changes: 6 additions & 4 deletions docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ defaults:
numbered: False
root: index
subtrees:
- caption: Setup
- caption: Installation
entries:
- file: setup/installing
- caption: API
- file: install/installing
title: Installation guide

- caption: API reference
entries:
- file: data-type-support
- file: cpp_api

- caption: About
entries:
- file: license

0 comments on commit a42a40c

Please sign in to comment.