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
631eee37
Commit
631eee37
authored
Jan 28, 2020
by
rusty1s
Browse files
fix warnings
parent
64b0ae30
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
8 deletions
+13
-8
cpu/convert.cpp
cpu/convert.cpp
+1
-1
cpu/diag.cpp
cpu/diag.cpp
+1
-1
cpu/spmm.cpp
cpu/spmm.cpp
+1
-1
cuda/convert.cpp
cuda/convert.cpp
+2
-1
cuda/diag.cpp
cuda/diag.cpp
+2
-1
cuda/spmm.cpp
cuda/spmm.cpp
+2
-1
cuda/spspmm.cpp
cuda/spspmm.cpp
+2
-1
cuda/unique.cpp
cuda/unique.cpp
+2
-1
No files found.
cpu/convert.cpp
View file @
631eee37
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include "compat.h"
#include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(
!
x.
typ
e().is_cu
da
(), #x " must be CPU tensor")
#define CHECK_CPU(x) AT_ASSERTM(x.
devic
e().is_c
p
u(), #x " must be CPU tensor")
torch
::
Tensor
ind2ptr
(
torch
::
Tensor
ind
,
int64_t
M
)
{
torch
::
Tensor
ind2ptr
(
torch
::
Tensor
ind
,
int64_t
M
)
{
CHECK_CPU
(
ind
);
CHECK_CPU
(
ind
);
...
...
cpu/diag.cpp
View file @
631eee37
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include "compat.h"
#include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(
!
x.
typ
e().is_cu
da
(), #x " must be CPU tensor")
#define CHECK_CPU(x) AT_ASSERTM(x.
devic
e().is_c
p
u(), #x " must be CPU tensor")
torch
::
Tensor
non_diag_mask
(
torch
::
Tensor
row
,
torch
::
Tensor
col
,
int64_t
M
,
torch
::
Tensor
non_diag_mask
(
torch
::
Tensor
row
,
torch
::
Tensor
col
,
int64_t
M
,
int64_t
N
,
int64_t
k
)
{
int64_t
N
,
int64_t
k
)
{
...
...
cpu/spmm.cpp
View file @
631eee37
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include "compat.h"
#include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(
!
x.
typ
e().is_cu
da
(), #x " must be CPU tensor")
#define CHECK_CPU(x) AT_ASSERTM(x.
devic
e().is_c
p
u(), #x " must be CPU tensor")
enum
ReductionType
{
SUM
,
MEAN
,
MIN
,
MAX
};
enum
ReductionType
{
SUM
,
MEAN
,
MIN
,
MAX
};
...
...
cuda/convert.cpp
View file @
631eee37
#include <torch/script.h>
#include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor")
#define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
torch
::
Tensor
ind2ptr_cuda
(
torch
::
Tensor
ind
,
int64_t
M
);
torch
::
Tensor
ind2ptr_cuda
(
torch
::
Tensor
ind
,
int64_t
M
);
torch
::
Tensor
ptr2ind_cuda
(
torch
::
Tensor
ptr
,
int64_t
E
);
torch
::
Tensor
ptr2ind_cuda
(
torch
::
Tensor
ptr
,
int64_t
E
);
...
...
cuda/diag.cpp
View file @
631eee37
#include <torch/script.h>
#include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor")
#define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
torch
::
Tensor
non_diag_mask_cuda
(
torch
::
Tensor
row
,
torch
::
Tensor
col
,
torch
::
Tensor
non_diag_mask_cuda
(
torch
::
Tensor
row
,
torch
::
Tensor
col
,
int64_t
M
,
int64_t
N
,
int64_t
k
);
int64_t
M
,
int64_t
N
,
int64_t
k
);
...
...
cuda/spmm.cpp
View file @
631eee37
#include <torch/script.h>
#include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor")
#define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
spmm_cuda
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
spmm_cuda
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
...
...
cuda/spspmm.cpp
View file @
631eee37
#include <torch/script.h>
#include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor")
#define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
spspmm_cuda
(
torch
::
Tensor
rowptrA
,
torch
::
Tensor
colA
,
spspmm_cuda
(
torch
::
Tensor
rowptrA
,
torch
::
Tensor
colA
,
...
...
cuda/unique.cpp
View file @
631eee37
#include <torch/extension.h>
#include <torch/extension.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor")
#define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std
::
tuple
<
at
::
Tensor
,
at
::
Tensor
>
unique_cuda
(
at
::
Tensor
src
);
std
::
tuple
<
at
::
Tensor
,
at
::
Tensor
>
unique_cuda
(
at
::
Tensor
src
);
...
...
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