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
0b9019dd
"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "7d7ae0a1b0df87ce8ac123cd8b97ade6b15bac2f"
Commit
0b9019dd
authored
Feb 12, 2020
by
rusty1s
Browse files
fixed windows build
parent
bccaa10e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
csrc/convert.cpp
csrc/convert.cpp
+5
-0
csrc/diag.cpp
csrc/diag.cpp
+5
-0
csrc/spmm.cpp
csrc/spmm.cpp
+5
-0
csrc/spspmm.cpp
csrc/spspmm.cpp
+5
-0
No files found.
csrc/convert.cpp
View file @
0b9019dd
#include <Python.h>
#include <torch/script.h>
#include <torch/script.h>
#include "cpu/convert_cpu.h"
#include "cpu/convert_cpu.h"
...
@@ -6,6 +7,10 @@
...
@@ -6,6 +7,10 @@
#include "cuda/convert_cuda.h"
#include "cuda/convert_cuda.h"
#endif
#endif
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__convert
(
void
)
{
return
NULL
;
}
#endif
torch
::
Tensor
ind2ptr
(
torch
::
Tensor
ind
,
int64_t
M
)
{
torch
::
Tensor
ind2ptr
(
torch
::
Tensor
ind
,
int64_t
M
)
{
if
(
ind
.
device
().
is_cuda
())
{
if
(
ind
.
device
().
is_cuda
())
{
#ifdef WITH_CUDA
#ifdef WITH_CUDA
...
...
csrc/diag.cpp
View file @
0b9019dd
#include <Python.h>
#include <torch/script.h>
#include <torch/script.h>
#include "cpu/diag_cpu.h"
#include "cpu/diag_cpu.h"
...
@@ -6,6 +7,10 @@
...
@@ -6,6 +7,10 @@
#include "cuda/diag_cuda.h"
#include "cuda/diag_cuda.h"
#endif
#endif
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__diag
(
void
)
{
return
NULL
;
}
#endif
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
)
{
if
(
row
.
device
().
is_cuda
())
{
if
(
row
.
device
().
is_cuda
())
{
...
...
csrc/spmm.cpp
View file @
0b9019dd
#include <Python.h>
#include <torch/script.h>
#include <torch/script.h>
#include "cpu/spmm_cpu.h"
#include "cpu/spmm_cpu.h"
...
@@ -6,6 +7,10 @@
...
@@ -6,6 +7,10 @@
#include "cuda/spmm_cuda.h"
#include "cuda/spmm_cuda.h"
#endif
#endif
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__spmm
(
void
)
{
return
NULL
;
}
#endif
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
spmm_fw
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
spmm_fw
(
torch
::
Tensor
rowptr
,
torch
::
Tensor
col
,
torch
::
optional
<
torch
::
Tensor
>
optional_value
,
torch
::
Tensor
mat
,
torch
::
optional
<
torch
::
Tensor
>
optional_value
,
torch
::
Tensor
mat
,
...
...
csrc/spspmm.cpp
View file @
0b9019dd
#include <Python.h>
#include <torch/script.h>
#include <torch/script.h>
#include "cpu/spspmm_cpu.h"
#include "cpu/spspmm_cpu.h"
...
@@ -6,6 +7,10 @@
...
@@ -6,6 +7,10 @@
#include "cuda/spspmm_cuda.h"
#include "cuda/spspmm_cuda.h"
#endif
#endif
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__spspmm
(
void
)
{
return
NULL
;
}
#endif
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
spspmm_sum
(
torch
::
Tensor
rowptrA
,
torch
::
Tensor
colA
,
spspmm_sum
(
torch
::
Tensor
rowptrA
,
torch
::
Tensor
colA
,
torch
::
optional
<
torch
::
Tensor
>
optional_valueA
,
torch
::
optional
<
torch
::
Tensor
>
optional_valueA
,
...
...
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