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-scatter
Commits
b4a9e5d5
Commit
b4a9e5d5
authored
Feb 11, 2020
by
rusty1s
Browse files
compile version
parent
8a1f0741
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
csrc/segment_coo.cpp
csrc/segment_coo.cpp
+1
-1
csrc/segment_csr.cpp
csrc/segment_csr.cpp
+1
-1
csrc/version.cpp
csrc/version.cpp
+21
-0
No files found.
csrc/segment_coo.cpp
View file @
b4a9e5d5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#endif
#endif
#ifdef _WIN32
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__s
catter
(
void
)
{
return
NULL
;
}
PyMODINIT_FUNC
PyInit__s
egment_coo
(
void
)
{
return
NULL
;
}
#endif
#endif
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
...
...
csrc/segment_csr.cpp
View file @
b4a9e5d5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#endif
#endif
#ifdef _WIN32
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__s
catte
r
(
void
)
{
return
NULL
;
}
PyMODINIT_FUNC
PyInit__s
egment_cs
r
(
void
)
{
return
NULL
;
}
#endif
#endif
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
std
::
tuple
<
torch
::
Tensor
,
torch
::
optional
<
torch
::
Tensor
>>
...
...
csrc/version.cpp
0 → 100644
View file @
b4a9e5d5
#include <Python.h>
#include <torch/script.h>
#ifdef WITH_CUDA
#include <cuda.h>
#endif
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__version
(
void
)
{
return
NULL
;
}
#endif
int64_t
cuda_version
()
{
#ifdef WITH_CUDA
return
CUDA_VERSION
;
#else
return
-
1
;
#endif
}
static
auto
registry
=
torch
::
RegisterOperators
().
op
(
"torch_scatter::cuda_version"
,
&
cuda_version
);
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