"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "e38b9ee4fc64fcb05447b6839615905adc5673f7"
Unverified Commit 82e9df94 authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

PyTorch 2.0 fix (#160)

* update

* update
parent b3d445c4
#ifdef WITH_PYTHON #ifdef WITH_PYTHON
#include <Python.h> #include <Python.h>
#endif #endif
#include <torch/script.h>
#include "cluster.h" #include "cluster.h"
#include "macros.h" #include "macros.h"
#include <torch/script.h>
#ifdef WITH_CUDA #ifdef WITH_CUDA
#ifdef USE_ROCM #ifdef USE_ROCM
...@@ -23,7 +23,6 @@ PyMODINIT_FUNC PyInit__version_cpu(void) { return NULL; } ...@@ -23,7 +23,6 @@ PyMODINIT_FUNC PyInit__version_cpu(void) { return NULL; }
#endif #endif
#endif #endif
namespace cluster { namespace cluster {
CLUSTER_API int64_t cuda_version() noexcept { CLUSTER_API int64_t cuda_version() noexcept {
#ifdef WITH_CUDA #ifdef WITH_CUDA
...@@ -36,8 +35,7 @@ CLUSTER_API int64_t cuda_version() noexcept { ...@@ -36,8 +35,7 @@ CLUSTER_API int64_t cuda_version() noexcept {
return -1; return -1;
#endif #endif
} }
} // namespace sparse } // namespace cluster
static auto registry = static auto registry = torch::RegisterOperators().op(
torch::RegisterOperators().op("torch_cluster::cuda_version", &cluster::cuda_version); "torch_cluster::cuda_version", [] { return cluster::cuda_version(); });
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment