Skip to content
Snippets Groups Projects
include-SparseTensorUtils.patch 559 B
diff --git a/src/hxtorch/spiking/types.cpp b/src/hxtorch/spiking/types.cpp
index aaf670f..39322c8 100644
--- a/hxtorch/src/hxtorch/spiking/types.cpp
+++ b/hxtorch/src/hxtorch/spiking/types.cpp
@@ -2,7 +2,12 @@
 #include "grenade/vx/common/time.h"
 #include "hxtorch/spiking/detail/to_dense.h"
 #include <ATen/Functions.h>
+#if __has_include(<ATen/native/SparseTensorUtils.h>)
+// moved in py-torch@2.1
+#include <ATen/native/SparseTensorUtils.h>
+#else
 #include <ATen/SparseTensorUtils.h>
+#endif
 #include <log4cxx/logger.h>
 
 namespace hxtorch::spiking {