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-cluster
Commits
5f93cd74
Commit
5f93cd74
authored
Feb 14, 2020
by
rusty1s
Browse files
add version
parent
61df8451
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
csrc/version.cpp
csrc/version.cpp
+21
-0
No files found.
csrc/version.cpp
0 → 100644
View file @
5f93cd74
#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_cluster::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