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
ffec0a56
Commit
ffec0a56
authored
Jul 30, 2018
by
rusty1s
Browse files
coalesce call
parent
5788c855
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
cuda/matmul_cuda.cu
cuda/matmul_cuda.cu
+3
-0
torch_sparse/sparse.py
torch_sparse/sparse.py
+0
-7
No files found.
cuda/matmul_cuda.cu
View file @
ffec0a56
...
@@ -28,6 +28,9 @@ static void init_cusparse() {
...
@@ -28,6 +28,9 @@ static void init_cusparse() {
}
}
std
::
tuple
<
at
::
Tensor
,
at
::
Tensor
>
spspmm_cuda
(
at
::
Tensor
A
,
at
::
Tensor
B
)
{
std
::
tuple
<
at
::
Tensor
,
at
::
Tensor
>
spspmm_cuda
(
at
::
Tensor
A
,
at
::
Tensor
B
)
{
A
=
A
.
coalesce
();
B
=
B
.
coalesce
();
init_cusparse
();
init_cusparse
();
auto
m
=
A
.
size
(
0
);
auto
m
=
A
.
size
(
0
);
...
...
torch_sparse/sparse.py
deleted
100644 → 0
View file @
5788c855
import
torch
def
SparseTensor
(
index
,
value
,
size
):
t
=
torch
.
cuda
if
value
.
is_cuda
else
torch
SparseTensor
=
getattr
(
t
.
sparse
,
value
.
type
().
split
(
'.'
)[
-
1
])
return
SparseTensor
(
index
,
value
,
size
)
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