Skip to content
Snippets Groups Projects
Commit 8431e2e0 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist: Committed by Eleni Mathioulaki
Browse files

fix: #58

parent 2429a452
No related branches found
No related tags found
1 merge request!567create new experimental release
Pipeline #53371 failed with stage
in 3 hours, 49 minutes, and 35 seconds
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 {
......@@ -87,6 +87,8 @@ class Hxtorch(build_brainscales.BuildBrainscales):
extends('python')
patch("include-SparseTensorUtils.patch", when="@:8.0-a5")
def install_test(self):
with working_dir('spack-test', create=True):
old_pythonpath = os.environ.get('PYTHONPATH', '')
......
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 {
......@@ -43,6 +43,8 @@ class Jaxsnn(build_brainscales.BuildBrainscales):
depends_on('py-tree-math', type=('build', 'link', 'run'))
extends('python')
patch("include-SparseTensorUtils.patch", when="@:8.0-a5")
def install_test(self):
with working_dir('spack-test', create=True):
old_pythonpath = os.environ.get('PYTHONPATH', '')
......
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