File: README.md

package info (click to toggle)
rocrand 5.3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 37,268 kB
  • sloc: cpp: 95,463; f90: 2,847; python: 1,648; sh: 293; xml: 210; makefile: 49
file content (76 lines) | stat: -rw-r--r-- 1,334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# hipRAND Python Wrapper

## Requirements

* rocRAND
* Python 2.7 or 3.5
* pip (only for installing)
* NumPy (will be installed automatically as a dependency if necessary)

If rocRAND is built from sources but not installed or installed in non-standard
directory set `ROCRAND_PATH` environment variable, for example:

```
export ROCRAND_PATH=~/rocRAND/build/library/
```

## Installing

```
cd python/hiprand
pip install .
```

Run tests:

```
python tests/hiprand_test.py
```

It is also possible to test the wrapper without installing:

```
python setup.py test
```

Run examples:

```
python examples/pi.py
```

## Creating a source distribution

```
cd python/hiprand
python setup.py sdist
```

The package `hiprand-<version>.tar.gz` will be placed into `dist/`.
It can be installed later using this command:

```
pip install hiprand-<version>.tar.gz
```

## Building documentation

Install Sphinx (http://www.sphinx-doc.org/en/stable/index.html):

```
pip install Sphinx
```

Run:

```
cd python/hiprand
python setup.py build_sphinx
```

The documentation will be placed into `docs/build/html`.

Note: Sphinx requires that the module is properly loaded to generate
documentation from sources. Consider to install rocRAND first
or set `ROCRAND_PATH` if you see error messages like
"ImportError: libhiprand.so cannot be loaded..."