Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citing #152

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ pkg> add GraphNeuralNetworks

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.


## Citing

If you use GraphNeuralNetworks.jl in a scientific publication, we would appreciate the following reference:

```
@misc{Lucibello2021GNN,
author = {Carlo Lucibello and other contributors},
title = {GraphNeuralNetworks.jl: a geometric deep learning library for the Julia programming language},
year = 2021,
url = {https://github.com/CarloLucibello/GraphNeuralNetworks.jl}
}
```

## Acknowledgments

GraphNeuralNetworks.jl is largely inspired by [PyTorch Geometric](https://pytorch-geometric.readthedocs.io/en/latest/), [Deep Graph Library](https://docs.dgl.ai/),
Expand Down
37 changes: 37 additions & 0 deletions bench.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
##
using GraphNeuralNetworks
using CUDA
using Flux

N = 10000
M = 1
I = 10

function test_mem(n, make_data)
for i in 1:I
g = make_data()
x = n(g |> gpu)
# b_g = Flux.batch([g for i in 1:M]) |> gpu
# x = n(b_g)
CUDA.memory_status()
end
end

GC.gc(); CUDA.reclaim(); GC.gc();
CUDA.memory_status()

println("GNN:")
make_data() = GNNGraph(collect(1:N-1), collect(2:N), num_nodes = N, ndata = rand(1, N))
n = GNNChain(Dense(1, 1000), Dense(1000, 1)) |> gpu
# n = GCNConv(1 => 1000) |> gpu

CUDA.@time test_mem(n, make_data)


# GC.gc(); CUDA.reclaim(); GC.gc();
# println("\n\nNN:")
# make_data() = rand(3*N,1)
# n = Chain(Dense(3*N, 1000), Dense(1000, 1)) |> gpu
# CUDA.@time test_mem(n, make_data)

println("################################")