Skip to content

Commit a961505

Browse files
committed
[Project] Minor readme && docs fixes/improvements
1 parent 1544b6b commit a961505

File tree

7 files changed

+81
-7
lines changed

7 files changed

+81
-7
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ work with sparse matrices written on the NVIDIA CUDA platform. The primary
1212
goal of the library is implementation, testing and profiling algorithms for
1313
solving *formal-language-constrained problems*, such as *context-free*
1414
and *regular* path queries with various semantics for graph databases.
15-
The library provides C-compatible API, written in the GraphBLAS style,
16-
as well as python high-level wrapper with automated resources management and fancy syntax sugar.
15+
The library provides C-compatible API, written in the GraphBLAS style.
16+
17+
**The library** is shipped with python package **pycubool** - wrapper for
18+
cuBool library C API. This package exports library features and primitives
19+
in high-level format with automated resources management and fancy syntax sugar.
1720

1821
**The primary library primitive** is a sparse boolean matrix. The library provides
1922
the most popular operations for matrix manipulation, such as construction from
@@ -34,7 +37,7 @@ prototyping algorithms on a local computer for later running on a powerful serve
3437
- [X] Sparse matrix element-wise addition
3538
- [X] Sparse matrix kronecker
3639
- [X] Sparse matrix transpose
37-
- [X] Sparse matrix submatrix
40+
- [X] Sparse matrix extract sub-matrix
3841
- [X] Sparse matrix reduce
3942
- [X] Sparse matrix slicing
4043
- [X] Matrix cached filling
@@ -54,6 +57,13 @@ prototyping algorithms on a local computer for later running on a powerful serve
5457
- [ ] Publish built artifacts and shared libs
5558
- [ ] Publish stable source code archives
5659

60+
## Installation
61+
62+
If you running OS **Ubuntu 20.04** or higher you can download the official
63+
PyPI **pycubool** python package, which includes compiled CPP library source
64+
with Cuda and Sequential computations supports. Installation process
65+
requires only `python3` to be installed on your machine.
66+
5767
## Getting Started
5868

5969
### Requirements
@@ -257,7 +267,8 @@ cuBool
257267
│ └── tests - gtest-based unit-tests collection
258268
├── python - pycubool related source
259269
│ ├── pycubool - cubool library wrapper for python (similar to pygraphblas)
260-
│ └── tests - tests for python wrapper
270+
│ ├── tests - regression tests for python wrapper
271+
│ └── data - generate data for pycubool regression tests
261272
├── deps - project dependencies
262273
│ ├── cub - cuda utility, required for nsparse
263274
│ ├── gtest - google test framework for unit testing
@@ -273,6 +284,18 @@ cuBool
273284
- Pavel Alimov (Github : [Krekep](https://github.com/Krekep))
274285
- Semyon Grigorev (Github: [gsvgit](https://github.com/gsvgit))
275286
287+
## Citation
288+
289+
```ignorelang
290+
@online{cuBool,
291+
author = {Orachyov, Egor and Alimov, Pavel and Grigorev, Semyon},
292+
title = {cuBool: sparse Boolean linear algebra for Nvidia Cuda},
293+
year = 2020,
294+
url = {https://github.com/JetBrains-Research/cuBool},
295+
note = {Version Alpha}
296+
}
297+
```
298+
276299
## License
277300
278301
This project is licensed under MIT License. License text can be found in the

docs/logo/cubool_logo_trsp.png

1.52 KB
Loading

python/README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ work with sparse matrices written on the NVIDIA CUDA platform. The primary
1313
goal of the library is implementation, testing and profiling algorithms for
1414
solving *formal-language-constrained problems*, such as *context-free*
1515
and *regular* path queries with various semantics for graph databases.
16-
The library provides C-compatible API, written in the GraphBLAS style,
17-
as well as python high-level wrapper with automated resources management and fancy syntax sugar.
16+
The library provides C-compatible API, written in the GraphBLAS style.
17+
18+
**The library** is shipped with python package **pycubool** - wrapper for
19+
cuBool library C API. This package exports library features and primitives
20+
in high-level format with automated resources management and fancy syntax sugar.
1821

1922
**The primary library primitive** is a sparse boolean matrix. The library provides
2023
the most popular operations for matrix manipulation, such as construction from
@@ -24,7 +27,17 @@ element-wise addition, matrix-matrix multiplication and Kronecker product.
2427
**As a fallback** library provides sequential backend for mentioned above operations
2528
for computations on CPU side only. This backend is selected automatically
2629
if Cuda compatible device is not presented in the system. This can be quite handy for
27-
prototyping algorithms on a local computer for later running on a powerful server.
30+
prototyping algorithms on a local computer for later running on a powerful server.
31+
32+
## Sparse Boolean Matrix Features
33+
34+
- Matrix creation (empty, from data, with random data)
35+
- Matrix-matrix operations (multiplication, element-wise addition, kronecker product)
36+
- Matrix operations (equality, transpose, reduce to vector, extract sub-matrix)
37+
- Matrix data extraction (as lists, as list of pairs)
38+
- Matrix syntax sugar (pretty string printing, slicing, iterating through non-zero values)
39+
- IO (import/export matrix from/to `.mtx` file format)
40+
- Debug (matrix string debug markers, logging)
2841

2942
## Example
3043

@@ -60,6 +73,18 @@ def transitive_closure(a: pycubool.Matrix):
6073
- Pavel Alimov (Github : [Krekep](https://github.com/Krekep))
6174
- Semyon Grigorev (Github: [gsvgit](https://github.com/gsvgit))
6275

76+
## Citation
77+
78+
```ignorelang
79+
@online{cuBool,
80+
author = {Orachyov, Egor and Alimov, Pavel and Grigorev, Semyon},
81+
title = {cuBool: sparse Boolean linear algebra for Nvidia Cuda},
82+
year = 2020,
83+
url = {https://github.com/JetBrains-Research/cuBool},
84+
note = {Version Alpha}
85+
}
86+
```
87+
6388
## License
6489

6590
This project is licensed under MIT License. License text can be found in the

python/pycubool/bridge.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
"""
2+
cuBool C API Python bridge.
3+
4+
Wraps native C API details for accessing
5+
this functionality via Python CTypes library.
6+
7+
Functionality:
8+
- Flags wrapping
9+
- Functions definitions
10+
- Error checking
11+
"""
12+
113
import ctypes
214

315
__all__ = [

python/pycubool/io.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
IO operations for exporting/importing mtx data.
3+
Provides features to import/export data or pycubool matrix in mtx format.
4+
"""
5+
16
from . import Matrix
27

38

python/pycubool/matrix.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Matrix primitive.
3+
"""
4+
15
import ctypes
26
import random
37

python/pycubool/wrapper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
cuBool library state wrapper.
3+
Provides global access points and initialization logic for library API.
4+
"""
5+
16
import os
27
import ctypes
38
import pathlib

0 commit comments

Comments
 (0)