From 270f0f25a37bdd9d6dde99d67293264c2d207d6c Mon Sep 17 00:00:00 2001
From: Matthias Diener <mdiener@illinois.edu>
Date: Mon, 18 Jul 2022 19:57:34 -0500
Subject: [PATCH] stack(): pass allocator

---
 pyopencl/array.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyopencl/array.py b/pyopencl/array.py
index 9bc0739e..7ee89b18 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -2812,7 +2812,8 @@ def stack(arrays, axis=0, queue=None):
                                                   for ary in arrays)),
                                  # TODO: reconsider once arrays support
                                  # non-contiguous assignments
-                                 order="C" if axis == 0 else "F")
+                                 order="C" if axis == 0 else "F",
+                                 allocator=arrays[0].allocator)
     for i, ary in enumerate(arrays):
         idx = (slice(None),)*axis + (i,) + (slice(None),)*(input_ndim-axis)
         result[idx] = ary
-- 
GitLab