From 82e9df944118d7916265ade4fa4f5e1062b1bf48 Mon Sep 17 00:00:00 2001 From: Matthias Fey Date: Mon, 23 Jan 2023 07:30:40 +0100 Subject: [PATCH] PyTorch 2.0 fix (#160) * update * update --- csrc/version.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/csrc/version.cpp b/csrc/version.cpp index de78d3c..84395d8 100644 --- a/csrc/version.cpp +++ b/csrc/version.cpp @@ -1,9 +1,9 @@ #ifdef WITH_PYTHON #include #endif -#include #include "cluster.h" #include "macros.h" +#include #ifdef WITH_CUDA #ifdef USE_ROCM @@ -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 @@ -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(); });