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-sparse
Commits
2bcc13ed
Commit
2bcc13ed
authored
Oct 17, 2020
by
rusty1s
Browse files
added header file
parent
a9d4d469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
csrc/sparse.h
csrc/sparse.h
+54
-0
No files found.
csrc/sparse.h
0 → 100644
View file @
2bcc13ed
#pragma once
#include <torch/extension.h>
int64_t
cuda_version
();
torch
::
Tensor
ind2ptr
(
torch
::
Tensor
ind
,
int64_t
M
);
torch
::
Tensor
ptr2ind
(
torch
::
Tensor
ptr
,
int64_t
E
);
torch
::
Tensor
partition
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
optional_value
,
int64_t
num_parts
,
bool
recursive
);
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
>
relabel
(
torch
::
Tensor
col
,
torch
::
Tensor
idx
);
torch
::
Tensor
random_walk
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
Tensor
start
,
int64_t
walk_length
);
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
Tensor
>
subgraph
(
torch
::
Tensor
idx
,
torch
::
Tensor
rowptr
,
torch
::
Tensor
row
,
torch
::
Tensor
col
);
sample_adj
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
Tensor
rowcount
,
torch
::
Tensor
idx
,
int64_t
num_neighbors
,
bool
replace
);
torch
::
Tensor
spmm_sum
(
torch
::
optional
<
torch
::
Tensor
>
opt_row
,
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
opt_value
,
torch
::
optional
<
torch
::
Tensor
>
opt_colptr
,
torch
::
optional
<
torch
::
Tensor
>
opt_csr2csc
,
torch
::
Tensor
mat
);
torch
::
Tensor
spmm_mean
(
torch
::
optional
<
torch
::
Tensor
>
opt_row
,
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
opt_value
,
torch
::
optional
<
torch
::
Tensor
>
opt_rowcount
,
torch
::
optional
<
torch
::
Tensor
>
opt_colptr
,
torch
::
optional
<
torch
::
Tensor
>
opt_csr2csc
,
torch
::
Tensor
mat
);
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
>
spmm_min
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
opt_value
,
torch
::
Tensor
mat
);
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
>
spmm_max
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
opt_value
,
torch
::
Tensor
mat
);
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
spspmm_sum
(
torch
::
Tensor
rowptrA
,
torch
::
Tensor
colA
,
torch
::
optional
<
torch
::
Tensor
>
optional_valueA
,
torch
::
Tensor
rowptrB
,
torch
::
Tensor
colB
,
torch
::
optional
<
torch
::
Tensor
>
optional_valueB
,
int64_t
K
);
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