awkward
awkward copied to clipboard
CUDA `ak.max` result on `cuda` backend doesn't agree with baseline `cpu`
Version of Awkward Array
master branch (2.6.7)
Description and code to reproduce
It seems like switching to a recommended random generator revealed a bug. To reproduce:
import numpy as np
import cupy as cp
import awkward as ak
rng = np.random.default_rng(seed=42)
array = rng.integers(3000, size=3000)
content = ak.contents.NumpyArray(array)
cuda_content = ak.to_backend(content, "cuda", highlevel=False)
one can check that:
>>> np.max(array)
2998
>>> ak.max(content)
2998
>>> ak.max(cuda_content)
array(2997)
>>> len(cuda_content)
3000
>>> len(content)
3000
>>> ak.argmax(content)
2261
>>> cuda_content[2261]
array(2998)