README.md 1.57 KB
Newer Older
zzhang-cn's avatar
zzhang-cn committed
1
# Deep Graph Library
Minjie Wang's avatar
Minjie Wang committed
2
[![Build Status](http://216.165.71.225:8080/buildStatus/icon?job=DGL/master)](http://216.165.71.225:8080/job/DGL/job/master/)
Minjie Wang's avatar
Minjie Wang committed
3
[![GitHub license](https://dmlc.github.io/img/apache2.svg)](./LICENSE)
zzhang-cn's avatar
zzhang-cn committed
4
5
6
7
8
9

## Architecture
Show below, there are three sets of APIs for different models.
- `update_all`, `proppagate` are more global
- `update_by_edge`, `update_to` and `update_from` give finer control when updates are applied to a path, or a group of nodes
- `sendto` and `recvfrom` are the bottom primitives that update a message and node.
Zheng Zhang's avatar
Zheng Zhang committed
10
11

![Screenshot](graph-api.png)
zzhang-cn's avatar
zzhang-cn committed
12
13
14

## For Model developers
- Always choose the API at the *highest* possible level.
Lingfan Yu's avatar
Lingfan Yu committed
15
- Refer to the [GCN example](examples/pytorch/gcn/gcn_batch.py) to see how to register message and node update functions;
zzhang-cn's avatar
zzhang-cn committed
16

Gan Quan's avatar
Gan Quan committed
17
## How to build (the `cpp` branch)
zzhang-cn's avatar
zzhang-cn committed
18

Gan Quan's avatar
Gan Quan committed
19
20
21
22
23
24
25
26
27
28
29
30
Before building, make sure that the submodules are cloned.  If you haven't initialized the submodules, run

```sh
$ git submodule init
```

To sync the submodules, run

```sh
$ git submodule update
```

Gan Quan's avatar
Gan Quan committed
31
32
### Linux

Gan Quan's avatar
Gan Quan committed
33
34
35
36
37
38
39
At the root directory of the repo:

```sh
$ mkdir build
$ cd build
$ cmake ..
$ make
Gan Quan's avatar
oops  
Gan Quan committed
40
$ export DGL_LIBRARY_PATH=$PWD
Gan Quan's avatar
Gan Quan committed
41
42
43
```

The `DGL_LIBRARY_PATH` environment variable should point to the library `libdgl.so` built by CMake.
Gan Quan's avatar
Gan Quan committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

### Windows/MinGW (Experimental)

Make sure you have the following installed:

* CMake
* MinGW/GCC (G++)
* MinGW/Make

You can grab them from Anaconda.

In the command line prompt, run:

```
> md build
> cd build
> cmake -DCMAKE_CXX_FLAGS="-DDMLC_LOG_STACK_TRACE=0 -DTVM_EXPORTS" .. -G "MinGW Makefiles"
> mingw32-make
> set DGL_LIBRARY_PATH=%CD%
```