Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 34db4a5

Browse files
committed
updating README.md
1 parent 78ac247 commit 34db4a5

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "third_party/bitsery"]
22
path = third_party/bitsery
33
url = https://github.com/fraillt/bitsery
4-
[submodule "third_party/mlir-extensions"]
5-
path = third_party/mlir-extensions
6-
url = https://github.com/intel/mlir-extensions

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@ A tensor implementation following the [array API as defined by the data-API cons
44
It supports a controller-worker execution model as well as a CSP-like execution.
55

66
## Setting up build environment
7-
``` bash
7+
Install MLIR/LLVM and IMEX from branch refactor (see https://github.com/intel/mlir-extensions/tree/refactor).
8+
```bash
89
git --recurse-submodules clone https://github.com/intel-sandbox/personal.fschlimb.ddptensor
910
cd personal.fschlimb.ddptensor
1011
conda env create -f conda-env.yml -n ddpt
1112
conda activate ddpt
1213
export MPIROOT=$CONDA_PREFIX
1314
export MKLROOT=$CONDA_PREFIX
15+
export MLIRROOT=<your-MLIR-install-dir>
16+
export IMEXROOT=<your-IMEX-install-dir>
1417
```
1518
## Building ddptensor
16-
``` bash
17-
CC=gcc-9 CXX=g++-9 CMAKE_BUILD_PARALLEL_LEVEL=8 python setup.py develop
19+
```bash
20+
python setup.py develop
1821
```
22+
If your compiler does not default to a recent version, try something like `CC=gcc-9 CXX=g++-9 python setup.py develop`
1923

2024
## Running Tests
21-
``` bash
25+
__Test are currently not operational on this branch.__
26+
27+
```bash
2228
# single rank
2329
pytest test
2430
# multiple ranks, controller-worker, controller spawns ranks
@@ -28,3 +34,27 @@ mpirun -n $N python -m pytest test
2834
# multiple ranks, CSP
2935
DDPT_CW=0 mpirun -n $N python -m pytest test
3036
```
37+
38+
## Running
39+
```python
40+
import ddptensor as dt
41+
dt.init(False)
42+
a = dt.arange(0, 10, 1, dt.int64)
43+
#print(a) # should trigger compilation
44+
b = dt.arange(0, 100, 10, dt.int64)
45+
#print(b.dtype) # should _not_ trigger compilation
46+
c = a * b
47+
#print(c)
48+
d = dt.sum(c, [0])
49+
#del b # generated function should _not_ return b
50+
print(a, c, d) # printing of c (not a!) should trigger compilation
51+
dt.fini()
52+
```
53+
Assuming the above is in file `simple.py` a single-process run is executed like
54+
```bash
55+
python DDPT_IDTR_SO=`pwd`/ddptensor/libidtr.so python simple.py
56+
```
57+
and multi-process run is executed like
58+
```bash
59+
python DDPT_IDTR_SO=`pwd`/ddptensor/libidtr.so mpirun -n 5 python simple.py
60+
```

0 commit comments

Comments
 (0)