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

merge docs/6.2.0 into docs/6.2.1 (#1) #162

Merged
merged 1 commit into from
Sep 23, 2024
Merged
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
12 changes: 0 additions & 12 deletions amd/hipcc/docs/build.md

This file was deleted.

28 changes: 28 additions & 0 deletions amd/hipcc/docs/build.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. meta::
:description: HIPCC environment variables
:keywords: HIPCC, ROCm, HIP tools, HIP compiler

.. _hipcc_build:

******************************************
Building and testing HIPCC
******************************************

To build the ``hipcc`` and ``hipconfig`` executables, use the following commands.

.. code-block:: bash

mkdir build
cd build

cmake ..

make -j

.. note::
The tools are created in the current build folder, and will need to be copied to ``/opt/rocm/hip/bin`` folder location.

Testing HIPCC
=============

Currently ``hipcc`` and ``hipconfig`` tools are tested by building and running test samples that can be found at `HIP-tests <https://github.com/ROCm/hip-tests/tree/develop/samples>`_.
8 changes: 0 additions & 8 deletions amd/hipcc/docs/env.md

This file was deleted.

20 changes: 20 additions & 0 deletions amd/hipcc/docs/env.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. meta::
:description: HIPCC environment variables
:keywords: HIPCC, ROCm, HIP tools, HIP compiler

.. _hipcc_vars:

******************************************
HIPCC environment variables
******************************************

The environment variable ``HIP_PLATFORM`` can be used to specify ``amd`` or ``nvidia`` depending on the available backend tool flows:

* ``HIP_PLATFORM`` = ``amd`` or ``HIP_PLATFORM`` = ``nvidia``

.. note::
If ``HIP_PLATFORM`` is not set, then ``hipcc`` will attempt to auto-detect based on if the ``nvcc`` tool is found.

Additional environment variable controls:

* ``CUDA_PATH`` : Path to the CUDA SDK. The default is ``/usr/local/cuda``. This is only used for NVIDIA platforms.
5 changes: 0 additions & 5 deletions amd/hipcc/docs/index.md

This file was deleted.

33 changes: 33 additions & 0 deletions amd/hipcc/docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. meta::
:description: HIPCC command
:keywords: HIPCC, ROCm, HIP tools, HIP compiler

.. _hipcc-docs:

******************************************
HIPCC documentation
******************************************

``hipcc`` is a compiler driver utility that will call clang or nvcc, depending on target, and pass the appropriate include and library options for the target compiler and HIP infrastructure.

There are both Perl and C++ executable versions of the ``hipcc`` and ``hipconfig`` compiler driver utilities provided. By default the C++ version is used when ``hipcc`` is run. To enable the Perl versions of these commands set the environment variable ``HIP_USE_PERL_SCRIPTS=1``.

The documentation is structured as follows:

.. grid:: 2
:gutter: 3

.. grid-item-card:: Installation

* :ref:`hipcc_build`
* :ref:`hipcc_vars`

.. grid-item-card:: How to

* :ref:`hipcc_use`

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.
25 changes: 16 additions & 9 deletions amd/hipcc/docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Anywhere {branch} is used, the branch name will be substituted.
# These comments will also be removed.
defaults:
numbered: False
maxdepth: 6
root: index
subtrees:
- numbered: False
entries:
- file: env
- file: usage
- file: build
- file: test
- caption: About
entries:
- file: license

- caption: Install
entries:
- file: build
- file: env

- caption: How to
entries:
- file: usage

- caption: About
entries:
- file: license.md
3 changes: 0 additions & 3 deletions amd/hipcc/docs/test.md

This file was deleted.

11 changes: 0 additions & 11 deletions amd/hipcc/docs/usage.md

This file was deleted.

21 changes: 21 additions & 0 deletions amd/hipcc/docs/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. meta::
:description: HIPCC environment variables
:keywords: HIPCC, ROCm, HIP tools, HIP compiler

.. _hipcc_use:

******************************************
Using HIPCC
******************************************

The built executables can be used the same way as the ``hipcc`` and ``hipconfig`` Perl scripts.
To use the newly built executables from the build folder use ``./`` in front of the executable name.
For example:

.. code-block:: shell

./hipconfig --help
./hipcc --help
./hipcc --version
./hipconfig --full