Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
e6638edd
Commit
e6638edd
authored
Apr 07, 2018
by
rusty1s
Browse files
added codecov
parent
c663c5b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
22 deletions
+1
-22
benchmark/ffi.py
benchmark/ffi.py
+0
-21
setup.cfg
setup.cfg
+1
-1
No files found.
benchmark/ffi.py
deleted
100644 → 0
View file @
c663c5b1
import
time
import
torch
from
torch_cluster._ext
import
ffi
cluster
=
torch
.
cuda
.
LongTensor
(
4
)
row
=
torch
.
cuda
.
LongTensor
([
0
,
0
,
1
,
1
,
1
,
2
,
2
,
2
,
3
,
3
])
col
=
torch
.
cuda
.
LongTensor
([
1
,
2
,
0
,
2
,
3
,
0
,
1
,
3
,
1
,
2
])
# deg = torch.cuda.LongTensor([2, 3, 3, 2])
func
=
ffi
.
THCCGreedy
print
(
func
)
a
=
0
torch
.
cuda
.
synchronize
()
t
=
time
.
perf_counter
()
# for i in range(100):
func
(
cluster
,
row
,
col
)
# a += cluster.sum() / cluster.size(0)
torch
.
cuda
.
synchronize
()
print
(
time
.
perf_counter
()
-
t
)
print
(
cluster
)
setup.cfg
View file @
e6638edd
...
...
@@ -5,4 +5,4 @@ description-file = README.md
test = pytest
[tool:pytest]
addopts = --capture=no
addopts = --capture=no
--cov
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment