Skip to content
Snippets Groups Projects
Commit db576e85 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

fix: #58

parent 7551acf3
No related branches found
No related tags found
No related merge requests found
Pipeline #53272 passed with stage
in 5 minutes and 27 seconds
diff --git a/src/hxtorch/spiking/types.cpp b/src/hxtorch/spiking/types.cpp
index aaf670f..39322c8 100644
--- a/src/hxtorch/spiking/types.cpp
+++ b/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 {
...@@ -85,6 +85,8 @@ class Hxtorch(build_brainscales.BuildBrainscales): ...@@ -85,6 +85,8 @@ class Hxtorch(build_brainscales.BuildBrainscales):
for dep, dep_kw in deps_hxtorch_core: for dep, dep_kw in deps_hxtorch_core:
depends_on(dep, **dep_kw) depends_on(dep, **dep_kw)
patch("include-SparseTensorUtils.patch", when="@:8.0-a5 ^py-torch@2.1:")
extends('python') extends('python')
def install_test(self): def install_test(self):
......
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