diff --git a/pycuda/curandom.py b/pycuda/curandom.py index fe6f54b5be39dd82e40b7b1d12cfee7acbd58ff5..160776a4620ac87b989404fb7d1ea857d4d996a2 100644 --- a/pycuda/curandom.py +++ b/pycuda/curandom.py @@ -581,7 +581,7 @@ class _RandomNumberGeneratorBase: func = self.generators["uniform_float"] elif data.dtype == np.float64: func = self.generators["uniform_double"] - elif data.dtype in [np.int, np.int32, np.uint32]: + elif data.dtype in [np.int32, np.uint32]: func = self.generators["uniform_int"] elif data.dtype in [np.int64, np.uint64] and self.generator_bits >= 64: func = self.generators["uniform_long"] diff --git a/src/wrapper/wrap_cudadrv.cpp b/src/wrapper/wrap_cudadrv.cpp index 01f09189f23e37ab37b73d95075c2ae641889a30..5912bf49ffa7d554c19287861a8c27a96179f591 100644 --- a/src/wrapper/wrap_cudadrv.cpp +++ b/src/wrapper/wrap_cudadrv.cpp @@ -1030,11 +1030,36 @@ BOOST_PYTHON_MODULE(_driver) .value("COMPUTE_12", CU_TARGET_COMPUTE_12) .value("COMPUTE_13", CU_TARGET_COMPUTE_13) #endif -#if CUDAPP_CUDA_VERSION >= 3000 +#if (CUDAPP_CUDA_VERSION >= 3000) && CUDAPP_CUDA_VERSION < 12000 .value("COMPUTE_20", CU_TARGET_COMPUTE_20) #endif -#if CUDAPP_CUDA_VERSION >= 3020 +#if (CUDAPP_CUDA_VERSION >= 3020) && CUDAPP_CUDA_VERSION < 12000 .value("COMPUTE_21", CU_TARGET_COMPUTE_21) +#endif +#if (CUDAPP_CUDA_VERSION >= 11000) + .value("COMPUTE_30", CU_TARGET_COMPUTE_30) + .value("COMPUTE_32", CU_TARGET_COMPUTE_32) + .value("COMPUTE_35", CU_TARGET_COMPUTE_35) + .value("COMPUTE_37", CU_TARGET_COMPUTE_37) + + .value("COMPUTE_50", CU_TARGET_COMPUTE_50) + .value("COMPUTE_52", CU_TARGET_COMPUTE_52) + .value("COMPUTE_53", CU_TARGET_COMPUTE_53) + + .value("COMPUTE_60", CU_TARGET_COMPUTE_60) + .value("COMPUTE_61", CU_TARGET_COMPUTE_61) + .value("COMPUTE_62", CU_TARGET_COMPUTE_62) + + .value("COMPUTE_70", CU_TARGET_COMPUTE_70) + .value("COMPUTE_72", CU_TARGET_COMPUTE_72) + .value("COMPUTE_75", CU_TARGET_COMPUTE_75) + + .value("COMPUTE_80", CU_TARGET_COMPUTE_80) + .value("COMPUTE_86", CU_TARGET_COMPUTE_86) +#endif +#if (CUDAPP_CUDA_VERSION >= 12000) + .value("COMPUTE_90", CU_TARGET_COMPUTE_90) + .value("COMPUTE_90A", CU_TARGET_COMPUTE_90A) #endif ; diff --git a/test/test_gpuarray.py b/test/test_gpuarray.py index b5e683c4a3bf0f6903e864930163a5eb5465830d..fd075dccf13bec7aabe967f9f361cc7f35dbc5cb 100644 --- a/test/test_gpuarray.py +++ b/test/test_gpuarray.py @@ -604,7 +604,7 @@ class TestGPUArray: assert abs(sum_a_gpu - sum_a) / abs(sum_a) < 1e-4 - @pytest.mark.parametrize("dtype", [np.int32, np.bool, np.float32, np.float64]) + @pytest.mark.parametrize("dtype", [np.int32, np.bool_, np.float32, np.float64]) def test_any(self, dtype): ary_list = [np.ones(10, dtype), @@ -629,7 +629,7 @@ class TestGPUArray: np.testing.assert_array_equal(any_array_gpu, any_array) assert any_array_gpu.dtype == any_array.dtype - @pytest.mark.parametrize("dtype", [np.int32, np.bool, np.float32, np.float64]) + @pytest.mark.parametrize("dtype", [np.int32, np.bool_, np.float32, np.float64]) def test_all(self, dtype): ary_list = [np.ones(10, dtype),