Skip to content

Commit 104b6b9

Browse files
Citing (#152)
* citation.bib * cleanup
1 parent ea75f68 commit 104b6b9

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ pkg> add GraphNeuralNetworks
2828

2929
Usage examples can be found in the [examples](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/examples) folder. Also, make sure to read the [documentation](https://CarloLucibello.github.io/GraphNeuralNetworks.jl/dev) for a comprehensive introduction to the library.
3030

31+
32+
## Citing
33+
34+
If you use GraphNeuralNetworks.jl in a scientific publication, we would appreciate the following reference:
35+
36+
```
37+
@misc{Lucibello2021GNN,
38+
author = {Carlo Lucibello and other contributors},
39+
title = {GraphNeuralNetworks.jl: a geometric deep learning library for the Julia programming language},
40+
year = 2021,
41+
url = {https://github.com/CarloLucibello/GraphNeuralNetworks.jl}
42+
}
43+
```
44+
3145
## Acknowledgments
3246

3347
GraphNeuralNetworks.jl is largely inspired by [PyTorch Geometric](https://pytorch-geometric.readthedocs.io/en/latest/), [Deep Graph Library](https://docs.dgl.ai/),

bench.jl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
##
2+
using GraphNeuralNetworks
3+
using CUDA
4+
using Flux
5+
6+
N = 10000
7+
M = 1
8+
I = 10
9+
10+
function test_mem(n, make_data)
11+
for i in 1:I
12+
g = make_data()
13+
x = n(g |> gpu)
14+
# b_g = Flux.batch([g for i in 1:M]) |> gpu
15+
# x = n(b_g)
16+
CUDA.memory_status()
17+
end
18+
end
19+
20+
GC.gc(); CUDA.reclaim(); GC.gc();
21+
CUDA.memory_status()
22+
23+
println("GNN:")
24+
make_data() = GNNGraph(collect(1:N-1), collect(2:N), num_nodes = N, ndata = rand(1, N))
25+
n = GNNChain(Dense(1, 1000), Dense(1000, 1)) |> gpu
26+
# n = GCNConv(1 => 1000) |> gpu
27+
28+
CUDA.@time test_mem(n, make_data)
29+
30+
31+
# GC.gc(); CUDA.reclaim(); GC.gc();
32+
# println("\n\nNN:")
33+
# make_data() = rand(3*N,1)
34+
# n = Chain(Dense(3*N, 1000), Dense(1000, 1)) |> gpu
35+
# CUDA.@time test_mem(n, make_data)
36+
37+
println("################################")

0 commit comments

Comments
 (0)