<commit_before>[Experimental] Installation Guide for ROCm environemt
=====================================================

.. _install_hip:

.. contents:: :local:

This is an experimental feature. We recommend only for advanced users to use this.

Recommended Environments
------------------------

We recommend the following Linux distributions.

* `Ubuntu <https://www.ubuntu.com/>`_ 16.04 / 18.04 LTS (64-bit)


Requirements
------------

You need to have the following components to use CuPy.

* GPU supported by ROCm (AMD GPUs or NVIDIA GPUs)
* `ROCm <https://rocm.github.io/install.html>`_
    * Supported Versions: ROCm 2.6+.
* `Python <https://python.org/>`_
* `NumPy <http://www.numpy.org/>`_

And please install ROCm libraries.

::

  $ sudo apt install hipblas hipsparse rocrand


Before installing CuPy, we recommend you to upgrade ``setuptools`` and ``pip``::

  $ pip install -U setuptools pip


Install CuPy from Source
------------------------

It is recommended to use wheels whenever possible.
However, there is currently no wheels for the ROCm environment, so you have to build it from source.

When installing from source, C++ compiler such as ``g++`` is required.
You need to install it before installing CuPy.
This is typical installation method for each platform::

  # Ubuntu 16.04
  $ apt-get install g++
<commit_msg>put the tag to the right place<commit_after>[Experimental] Installation Guide for ROCm environemt
=====================================================

.. contents:: :local:

This is an experimental feature. We recommend only for advanced users to use this.

Recommended Environments
------------------------

We recommend the following Linux distributions.

* `Ubuntu <https://www.ubuntu.com/>`_ 16.04 / 18.04 LTS (64-bit)


Requirements
------------

You need to have the following components to use CuPy.

* GPU supported by ROCm (AMD GPUs or NVIDIA GPUs)
* `ROCm <https://rocm.github.io/install.html>`_
    * Supported Versions: ROCm 2.6+.
* `Python <https://python.org/>`_
* `NumPy <http://www.numpy.org/>`_

And please install ROCm libraries.

::

  $ sudo apt install hipblas hipsparse rocrand


Before installing CuPy, we recommend you to upgrade ``setuptools`` and ``pip``::

  $ pip install -U setuptools pip


.. _install_hip:

Install CuPy from Source
------------------------

It is recommended to use wheels whenever possible.
However, there is currently no wheels for the ROCm environment, so you have to build it from source.

When installing from source, C++ compiler such as ``g++`` is required.
You need to install it before installing CuPy.
This is typical installation method for each platform::

  # Ubuntu 16.04
  $ apt-get install g++

{'fraction_non_alphanumeric': 0.16944136145024047, 'fraction_numerical': 0.011838697743248243, 'mean_word_length': 3.3264, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4795469', 'n_tokens_mistral': 833, 'n_tokens_neox': 742, 'n_words': 318}