Skip to content

Commit f588fa7

Browse files
authored
[hiprand] Docs: Update repository and path information for rocm-libraries switchover (#233)
This is a companion to #232. It updates the hiprand docs index page, install instructions, and links to the GitHub to reference rocm-libraries rather than the legacy hipRAND repo. It also adds a note directing users of pre-7.0 branches to the old repository and documentation. NOTE: This is intended for the 7.0 branch and later. A different change will be applied to the 6.4 branch explaining the situation from the perspective of older branches.
1 parent d84929f commit f588fa7

File tree

4 files changed

+55
-17
lines changed

4 files changed

+55
-17
lines changed

projects/hiprand/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ application and the backend RAND library, where it marshals inputs to the backen
88
application. hipRAND exports an interface that doesn't require the client to change, regardless of the
99
chosen backend.
1010

11-
hipRAND supports [rocRAND](https://github.com/ROCm/rocRAND) and
11+
hipRAND supports [rocRAND](https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocrand) and
1212
[NVIDIA CUDA cuRAND](https://developer.nvidia.com/curand).
1313

1414
## Requirements
@@ -37,7 +37,7 @@ supported platforms):
3737

3838
* Bash helper build script:
3939

40-
The helper script `install` is located in the root repository. Note that this method doesn't take many
40+
The helper script `install` is located in the root of the `projects/hiprand` folder. Note that this method doesn't take many
4141
options and hard-codes a configuration that you can specify by invoking CMake directly.
4242

4343
A few commands in the script need sudo access, so it may prompt you for a password.
@@ -52,6 +52,9 @@ supported platforms):
5252
[hipRAND build wiki](https://github.com/ROCm/hipRAND/wiki/Build) has helpful
5353
information on how to configure CMake and build manually.
5454

55+
For information on cloning and building the hipRAND library, see the
56+
[hipRAND installation documentation](https://rocm.docs.amd.com/projects/hipRAND/en/latest/install/installation.html) for version 7.0 or later.
57+
5558
### Supported functions
5659

5760
You can find a list of

projects/hiprand/docs/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ where it marshals inputs to the backend and results to the application. hipRAND
1414
require the client to change, regardless of the chosen backend.
1515
It uses rocRAND in a ROCm environment and cuRAND in a CUDA environment and provides C, C++, and Python API wrappers.
1616

17-
The hipRAND public repository is located at `<https://github.com/ROCm/hipRAND>`_.
17+
The hipRAND public repository is located at `<https://github.com/ROCm/rocm-libraries/tree/develop/projects/hiprand>`_.
1818

19+
.. note::
20+
21+
The hipRAND repository for ROCm 6.4 and earlier is located at `<https://github.com/ROCm/hipRAND>`_.
1922

2023
.. grid:: 2
2124
:gutter: 3
@@ -30,7 +33,7 @@ The hipRAND public repository is located at `<https://github.com/ROCm/hipRAND>`_
3033

3134
.. grid-item-card:: Examples
3235

33-
* `Examples <https://github.com/ROCm/hipRAND/tree/develop/python/hiprand/examples>`_
36+
* `Examples <https://github.com/ROCm/rocm-libraries/tree/develop/projects/hiprand/python/hiprand/examples>`_
3437

3538
.. grid-item-card:: API reference
3639

projects/hiprand/docs/install/installation.rst

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To build hipRAND, CMake version 3.16 or later is required.
5757
Additionally, to build hipRAND for the ROCm platform, the following components are required:
5858

5959
* `ROCm Software <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/>`_ (version 5.0.0 or later)
60-
* `rocRAND <https://github.com/ROCm/rocRAND.git>`_
60+
* `rocRAND <https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocrand>`_
6161

6262
To build hipRAND for the CUDA platform, the following applications are required:
6363

@@ -67,13 +67,45 @@ To build hipRAND for the CUDA platform, the following applications are required:
6767
Downloading the source code
6868
----------------------------
6969

70-
You can find the hipRAND source code in the `hipRAND GitHub Repository <https://github.com/ROCm/hipRAND>`_.
70+
The hipRAND source code is available from the `hiprand folder <https://github.com/ROCm/rocm-libraries/tree/develop/projects/hiprand>`_ of
71+
the `rocm-libraries <https://github.com/ROCm/rocm-libraries>`_ GitHub repository.
7172
Use the branch that matches the ROCm version installed on the system.
72-
For example, on a system with ROCm 6.3 installed, use the following command to obtain the hipRAND version 6.3 source code:
73+
The hipRAND source code can be cloned in two different ways.
7374

74-
.. code-block:: shell
75+
.. note::
76+
77+
For both methods, replace all occurrences of "x.y" in the commands with the version number matching your ROCm installation.
78+
For example, if you have ROCm 7.0 installed, clone the ``release/rocm-rel-7.0`` branch.
79+
80+
* Clone the entire `rocm-libraries <https://github.com/ROCm/rocm-libraries>`_ repository.
81+
This is the default method and is the recommended option if you need to install other
82+
ROCm libraries alongside hipRAND. However, due to the download size, ``git clone``
83+
might take a significant amount of time to complete.
84+
85+
On a system with ROCm x.y installed, use the following command to obtain the source code
86+
for hipRAND version x.y. Replace x.y with the actual version:
87+
88+
.. code-block:: shell
89+
90+
git clone -b release/rocm-rel-7.0 https://github.com/ROCm/rocm-libraries.git
91+
92+
* Clone the individual hipRAND project folder. This option only fetches the hipRAND source code,
93+
without any additional ROCm libraries. This significantly reduces the amount of time required
94+
to complete the clone operation. However, it requires Git 2.25 or later.
95+
To use this method to obtain the source code for hipRAND version x.y, run the following commands.
96+
Replace x.y with the actual version:
97+
98+
.. code-block:: shell
99+
100+
git clone -b release/rocm-rel-x.y --no-checkout --depth=1 --filter=tree:0 https://github.com/ROCm/rocm-libraries.git
101+
cd rocm-libraries
102+
git sparse-checkout set --cone projects/hiprand
103+
git checkout release/rocm-rel-x.y
104+
105+
.. note::
75106

76-
git checkout -b release/rocm-rel-6.3 https://github.com/ROCm/hipRAND.git
107+
To build ROCm 6.4 and earlier, use the hipRAND repository at `<https://github.com/ROCm/hipRAND>`_.
108+
For more information, see the documentation associated with the release you want to build.
77109

78110
Building the library
79111
----------------------------
@@ -82,7 +114,7 @@ After obtaining the sources and dependencies, build hipRAND for ROCm software us
82114

83115
.. code-block:: shell
84116
85-
cd hipRAND
117+
cd rocm-libraries/projects/hiprand
86118
./install --install
87119
88120
This automatically builds all required dependencies, excluding Git and the requirements listed above,
@@ -95,12 +127,12 @@ Building with CMake
95127
----------------------------
96128

97129
For a more detailed installation process, build hipRAND manually using CMake.
98-
This enables certain configuration options that are not available through the ``./install`` script.
130+
This enables certain configuration options that are not available through the ``install`` script.
99131
To build hipRAND, use CMake with the following configuration:
100132

101133
.. code-block:: shell
102134
103-
cd hipRAND; mkdir build; cd build
135+
cd rocm-libraries/projects/hiprand; mkdir build; cd build
104136
# Configure the project
105137
CXX=<compiler> cmake [options] ..
106138
# Build
@@ -143,7 +175,7 @@ Use the following tips to troubleshoot build problems.
143175
rocrandConfig.cmake
144176
rocrand-config.cmake
145177
146-
**Solution**: Install `rocRAND <https://github.com/ROCm/rocRAND.git>`_.
178+
**Solution**: Install `rocRAND <https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocrand>`_.
147179

148180
* ``ROCM`` package configuration file not found:
149181

@@ -178,7 +210,7 @@ The hipRAND Python API Wrapper requires the following dependencies:
178210

179211
.. code-block:: shell
180212
181-
export HIPRAND_PATH=~/hipRAND/build/library/
213+
export HIPRAND_PATH=~/rocm-libraries/projects/hiprand/build/library/
182214
183215
Installation
184216
----------------------------
@@ -187,12 +219,12 @@ To install the Python hipRAND module using ``pip``, run these commands:
187219

188220
.. code-block:: shell
189221
190-
cd hipRAND/python/hiprand
222+
cd rocm-libraries/projects/hiprand/python/hiprand
191223
pip install .
192224
193225
Use these commands to run the tests:
194226

195227
.. code-block:: shell
196228
197-
cd hipRAND/python/hiprand
229+
cd rocm-libraries/projects/hiprand/python/hiprand
198230
python tests/hiprand_test.py

projects/hiprand/docs/sphinx/_toc.yml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ subtrees:
1414

1515
- caption: Examples
1616
entries:
17-
- url: https://github.com/ROCm/hipRAND/tree/develop/python/hiprand/examples
17+
- url: https://github.com/ROCm/rocm-libraries/tree/develop/projects/hiprand/python/hiprand/examples
1818
title: Examples
1919

2020
- caption: API reference

0 commit comments

Comments
 (0)