Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions csrc/version.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifdef WITH_PYTHON
#include <Python.h>
#endif
#include <torch/script.h>
#include "cluster.h"
#include "macros.h"
#include <torch/script.h>

#ifdef WITH_CUDA
#ifdef USE_ROCM
Expand All @@ -23,7 +23,6 @@ PyMODINIT_FUNC PyInit__version_cpu(void) { return NULL; }
#endif
#endif


namespace cluster {
CLUSTER_API int64_t cuda_version() noexcept {
#ifdef WITH_CUDA
Expand All @@ -36,8 +35,7 @@ CLUSTER_API int64_t cuda_version() noexcept {
return -1;
#endif
}
} // namespace sparse

} // namespace cluster

static auto registry =
torch::RegisterOperators().op("torch_cluster::cuda_version", &cluster::cuda_version);
static auto registry = torch::RegisterOperators().op(
"torch_cluster::cuda_version", [] { return cluster::cuda_version(); });