Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default without setting CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 or setting CUDA_VISIBLE_DEVICES. This could on multi GPU systems lead to severe performance" penalties. Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default without setting CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 or setting CUDA_VISIBLE_DEVICES. This could on multi GPU systems lead to severe performance" penalties. ======================================================== test session starts ========================================================= platform linux -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos collected 391 items tests/test_AST_translator.py ..................... [ 5%] tests/test_atomics.py ............ [ 8%] tests/test_classtypes_translator.py ..... [ 9%] tests/test_ext_module.py . [ 9%] tests/test_fusion.py .... [ 10%] tests/test_hierarchical.py .... [ 12%] tests/test_kokkosfunctions_translator.py ......... [ 14%] tests/test_lambdas.py ... [ 15%] tests/test_linalg.py ........ [ 17%] tests/test_loop_fusion.py ........ [ 19%] tests/test_ops_translator.py ........................ [ 25%] tests/test_parallelreduce.py ........ [ 27%] tests/test_parallelscan.py .. [ 27%] tests/test_regressions.py ... [ 28%] tests/test_typeinference.py .................................. [ 37%] tests/test_ufuncs.py ..xxx..xxx.....xxx....................................................................................... [ 64%] .............................................................................................. [ 88%] tests/test_views.py ....x...............................FFFF...... [100%] ============================================================== FAILURES ============================================================== ______________________________________________ test_unsigned_int_overflow[uint8-uint8] _______________________________________________ pk_dtype = , np_dtype = @pytest.mark.parametrize("pk_dtype, np_dtype", [ (pk.uint8, np.uint8), (pk.uint16, np.uint16), (pk.uint32, np.uint32), (pk.uint64, np.uint64), ]) def test_unsigned_int_overflow(pk_dtype, np_dtype): # test for gh-86 actual = pk.View([1], dtype=pk_dtype) > actual[:] = -1 tests/test_views.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = slice(None, None, None), value = -1 def __setitem__(self, key: Union[int, TeamMember], value: Union[int, float]) -> None: """ Overloads the indexing operator setting an item in the View. :param key: the specified index. Can be an int or TeamMember. :param value: the new value at the index. """ if "PK_FUSION" in os.environ: runtime_singleton.runtime.flush_data(self) if self.trait is Trait.Unmanaged: self.xp_array[key] = value else: > self.data[key] = value E OverflowError: Python integer -1 out of bounds for uint8 pykokkos/interface/views.py:154: OverflowError _____________________________________________ test_unsigned_int_overflow[uint16-uint16] ______________________________________________ pk_dtype = , np_dtype = @pytest.mark.parametrize("pk_dtype, np_dtype", [ (pk.uint8, np.uint8), (pk.uint16, np.uint16), (pk.uint32, np.uint32), (pk.uint64, np.uint64), ]) def test_unsigned_int_overflow(pk_dtype, np_dtype): # test for gh-86 actual = pk.View([1], dtype=pk_dtype) > actual[:] = -1 tests/test_views.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = slice(None, None, None), value = -1 def __setitem__(self, key: Union[int, TeamMember], value: Union[int, float]) -> None: """ Overloads the indexing operator setting an item in the View. :param key: the specified index. Can be an int or TeamMember. :param value: the new value at the index. """ if "PK_FUSION" in os.environ: runtime_singleton.runtime.flush_data(self) if self.trait is Trait.Unmanaged: self.xp_array[key] = value else: > self.data[key] = value E OverflowError: Python integer -1 out of bounds for uint16 pykokkos/interface/views.py:154: OverflowError _____________________________________________ test_unsigned_int_overflow[uint32-uint32] ______________________________________________ pk_dtype = , np_dtype = @pytest.mark.parametrize("pk_dtype, np_dtype", [ (pk.uint8, np.uint8), (pk.uint16, np.uint16), (pk.uint32, np.uint32), (pk.uint64, np.uint64), ]) def test_unsigned_int_overflow(pk_dtype, np_dtype): # test for gh-86 actual = pk.View([1], dtype=pk_dtype) > actual[:] = -1 tests/test_views.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = slice(None, None, None), value = -1 def __setitem__(self, key: Union[int, TeamMember], value: Union[int, float]) -> None: """ Overloads the indexing operator setting an item in the View. :param key: the specified index. Can be an int or TeamMember. :param value: the new value at the index. """ if "PK_FUSION" in os.environ: runtime_singleton.runtime.flush_data(self) if self.trait is Trait.Unmanaged: self.xp_array[key] = value else: > self.data[key] = value E OverflowError: Python integer -1 out of bounds for uint32 pykokkos/interface/views.py:154: OverflowError _____________________________________________ test_unsigned_int_overflow[uint64-uint64] ______________________________________________ pk_dtype = , np_dtype = @pytest.mark.parametrize("pk_dtype, np_dtype", [ (pk.uint8, np.uint8), (pk.uint16, np.uint16), (pk.uint32, np.uint32), (pk.uint64, np.uint64), ]) def test_unsigned_int_overflow(pk_dtype, np_dtype): # test for gh-86 actual = pk.View([1], dtype=pk_dtype) > actual[:] = -1 tests/test_views.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = slice(None, None, None), value = -1 def __setitem__(self, key: Union[int, TeamMember], value: Union[int, float]) -> None: """ Overloads the indexing operator setting an item in the View. :param key: the specified index. Can be an int or TeamMember. :param value: the new value at the index. """ if "PK_FUSION" in os.environ: runtime_singleton.runtime.flush_data(self) if self.trait is Trait.Unmanaged: self.xp_array[key] = value else: > self.data[key] = value E OverflowError: Python integer -1 out of bounds for uint64 pykokkos/interface/views.py:154: OverflowError ========================================================== warnings summary ========================================================== tests/test_typeinference.py::TestTypeInference::test_acc64 /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_typeinference.py:314: RuntimeWarning: overflow encountered in cast self.assertEqual(np.float32(result), np.inf) # should overflow: ignore warning tests/test_ufuncs.py::test_1d_unary_ufunc_vs_numpy[LogView1D-log] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:292: RuntimeWarning: divide by zero encountered in log expected = numpy_ufunc(range(10)) tests/test_ufuncs.py::test_1d_unary_ufunc_vs_numpy[Log2View1D-log2] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:292: RuntimeWarning: divide by zero encountered in log2 expected = numpy_ufunc(range(10)) tests/test_ufuncs.py::test_1d_unary_ufunc_vs_numpy[Log10View1D-log10] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:292: RuntimeWarning: divide by zero encountered in log10 expected = numpy_ufunc(range(10)) tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[double-float64-reciprocal-reciprocal] tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[float-float32-reciprocal-reciprocal] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:326: RuntimeWarning: divide by zero encountered in reciprocal expected = numpy_ufunc(np.arange(10, dtype=numpy_dtype)) tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[double-float64-log-log] tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[float-float32-log-log] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:326: RuntimeWarning: divide by zero encountered in log expected = numpy_ufunc(np.arange(10, dtype=numpy_dtype)) tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[double-float64-log2-log2] tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[float-float32-log2-log2] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:326: RuntimeWarning: divide by zero encountered in log2 expected = numpy_ufunc(np.arange(10, dtype=numpy_dtype)) tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[double-float64-log10-log10] tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[float-float32-log10-log10] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:326: RuntimeWarning: divide by zero encountered in log10 expected = numpy_ufunc(np.arange(10, dtype=numpy_dtype)) tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[double-float64-positive-positive] tests/test_ufuncs.py::test_1d_exposed_ufuncs_vs_numpy[float-float32-positive-positive] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/pykokkos/interface/views.py:154: DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments. self.data[key] = value tests/test_ufuncs.py::test_1d_sqrt_negative_values[double-float64-arr0] tests/test_ufuncs.py::test_1d_sqrt_negative_values[double-float64-arr1] tests/test_ufuncs.py::test_1d_sqrt_negative_values[float-float32-arr0] tests/test_ufuncs.py::test_1d_sqrt_negative_values[float-float32-arr1] /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:427: RuntimeWarning: invalid value encountered in sqrt expected = np.sqrt(arr, dtype=numpy_dtype) tests/test_ufuncs.py::test_caching /home/sumanth/SOFTWARE/PYKOKKOS/pykokkos/tests/test_ufuncs.py:436: RuntimeWarning: divide by zero encountered in reciprocal expected = np.reciprocal(np.arange(10, dtype=np.float32)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ====================================================== short test summary info ======================================================= FAILED tests/test_views.py::test_unsigned_int_overflow[uint8-uint8] - OverflowError: Python integer -1 out of bounds for uint8 FAILED tests/test_views.py::test_unsigned_int_overflow[uint16-uint16] - OverflowError: Python integer -1 out of bounds for uint16 FAILED tests/test_views.py::test_unsigned_int_overflow[uint32-uint32] - OverflowError: Python integer -1 out of bounds for uint32 FAILED tests/test_views.py::test_unsigned_int_overflow[uint64-uint64] - OverflowError: Python integer -1 out of bounds for uint64 ================================ 4 failed, 377 passed, 10 xfailed, 19 warnings in 1344.06s (0:22:24) ================================= Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7 Testing printf: 7