Skip to content

[BUG] cupynumeric.right_shift(1, 64) produces inconsistent results on RTX 4090 and GTX 1650 GPUs #1281

Description

@apiqwe

Software versions

Software versions

NVIDIA GeForce RTX 4090:

System info:
  Python      :  3.14.6 | packaged by conda-forge | (main, Aug 11 2026, 10:26:15) [GCC 14.4.0]
  Platform    :  Linux-6.17.0-29-generic-x86_64-with-glibc2.39
  GPU driver  :  595.71.05
  GPU devices :
    GPU 0 :  NVIDIA GeForce RTX 4090

 Error Loading numa symbols, please install libnuma to avoid any performance issues
Package versions:
  realm       :  (failed to detect)
  legion      :  legion-25.12.0-75-g7b770cff5-dirty (commit: 7b770cff5b95a516c3244cc3a0500ce3720967d9)
  legate      :  26.06.01
  cupynumeric :  26.06.01
  numpy       :  2.4.6
  scipy       :  1.16.3
  numba       :  (failed to detect)

Legate build configuration:
  build_type        :  Release
  use_openmp        :  True
  use_cuda          :  True
  networks          :  ucx
  conduit           :  
  configure_options :  --LEGATE_ARCH=arch-conda;--with-python;--with-cc=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-cc;--with-cxx=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-c++;--build-march=haswell;--cmake-generator=Ninja;--with-openmp;--with-cuda;--build-type=release;--with-ucx

Package details:
  legate      :  legate 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/legate)
  cupynumeric :  cupynumeric 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/cupynumeric)
  numpy       :  numpy 2.4.6 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/numpy)
  scipy       :  scipy 1.16.3 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/scipy)
  numba       :  (failed to detect)

Conda package details:
  prefix       :  /opt/conda/envs/cupynumeric
  cuda-version :  cuda-version-13.2-he2cc418_3 (https://conda.anaconda.org/conda-forge/noarch)
  legate       :  legate-26.06.01-cuda13_py314_ucx_gpu_g3249a596f_0 (https://conda.anaconda.org/legate/linux-64)
  cupynumeric  :  cupynumeric-26.06.01-cuda13_py314_gpu_g7d7836ce_0 (https://conda.anaconda.org/legate/linux-64)

NVIDIA GeForce GTX 1650:

System info:
  Python      :  3.14.6 | packaged by conda-forge | (main, Aug 11 2026, 10:26:15) [GCC 14.4.0]
  Platform    :  Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39
  GPU driver  :  581.57
  GPU devices :
    GPU 0 :  NVIDIA GeForce GTX 1650

Package versions:
  realm       :  (failed to detect)
  legion      :  legion-25.12.0-75-g7b770cff5-dirty (commit: 7b770cff5b95a516c3244cc3a0500ce3720967d9)
  legate      :  26.06.01
  cupynumeric :  26.06.01
  numpy       :  2.4.6
  scipy       :  1.16.3
  numba       :  (failed to detect)

Legate build configuration:
  build_type        :  Release
  use_openmp        :  True
  use_cuda          :  False
  networks          :  ucx
  conduit           :
  configure_options :  --LEGATE_ARCH=arch-conda;--with-python;--with-cc=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-cc;--with-cxx=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-c++;--build-march=haswell;--cmake-generator=Ninja;--with-openmp;--with-cuda=0;--build-type=release;--with-ucx

Package details:
  legate      :  legate 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/legate)
  cupynumeric :  cupynumeric 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/cupynumeric)
  numpy       :  numpy 2.4.6 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/numpy)
  scipy       :  scipy 1.16.3 (installer: pip, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/scipy)
  numba       :  (failed to detect)

Conda package details:
  prefix       :  /opt/conda/envs/cupynumeric
  cuda-version :  (failed to detect)
  legate       :  legate-26.06.01-py314_ucx_cpu_g3249a596f_0 (https://conda.anaconda.org/legate/linux-64)
  cupynumeric  :  cupynumeric-26.06.01-cuda13_py314_cpu_g7d7836ce_0 (https://conda.anaconda.org/legate/linux-64)

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

cupynumeric.right_shift(1, 64) produces consistent results on RTX 4090 and GTX 1650 GPUs.

Observed behavior

The results of cupynumeric.right_shift(1, 64) are inconsistent between RTX 4090 and GTX 1650 GPUs.

Example code or instructions

import numpy as np
import cupynumeric as cp

print(np.right_shift(1, 64))
print(cp.right_shift(1, 64))

Stack traceback or browser console output

RTX 4090 Result:

0
0

GTX 1650 Result:

0
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions