I’m trying to call a device function (union) to which I’m passing 2 tuples (x, y, z are integers) like so:

```
union(labels_matrix, (z, y, x), (z - 2, y - 2, x - 2))
```

I get the following error:

```
No implementation of function Function(<numba.cuda.compiler.DeviceDispatcher object at 0x000002E674B31910>) found for signature:
>>> union <CUDA device function>(array(uint32, 3d, C), UniTuple(int64 x 3), UniTuple(int64 x 3))
There are 2 candidate implementations:
- Of which 2 did not match due to:
Overload in function 'union <CUDA device function>': File: ..\..\..\Segmentation.py: Line 951.
With argument(s): '(array(uint32, 3d, C), UniTuple(int64 x 3), UniTuple(int64 x 3))':
Rejected as the implementation raised a specific error:
TypingError: Failed in cuda mode pipeline (step: nopython frontend)
Cannot unify UniTuple(int64 x 3) and Tuple(UniTuple(int64 x 3), int64) for 'p1.3', defined at D:/Work/College Work/Thesis/Segmentation/Segmentation.py (956)
File "Segmentation.py", line 956:
def union(labels_matrix, p1, p2):
<source elided>
while not done:
p1, p2 = find(labels_matrix, p1), find(labels_matrix, p2)
^
During: typing of assignment at D:/.../Segmentation.py (956)
File "Segmentation.py", line 956:
def union(labels_matrix, p1, p2):
<source elided>
while not done:
p1, p2 = find(labels_matrix, p1), find(labels_matrix, p2)
^
```

I also add that union calls another function (find) with the same tuple.

Is the problem because tuples can’t be passed to device functions? Or is there something else I’m missing?

Thanks for the assistance