From d2ade3f041a24604c697935b8d92405f11960d59 Mon Sep 17 00:00:00 2001 From: Matthias Diener <mdiener@illinois.edu> Date: Thu, 8 Sep 2022 17:59:02 -0500 Subject: [PATCH] better error message --- pyopencl/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index c24a0556..a84b5d11 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -1971,9 +1971,9 @@ def enqueue_copy(queue, dest, src, **kwargs): # These are NOT documented. They only support consistency with the # Buffer-based API for the sake of the Array. if kwargs.pop("src_offset", 0) != 0: - raise AssertionError + raise ValueError("src_offset must be 0") if kwargs.pop("dst_offset", 0) != 0: - raise AssertionError + raise ValueError("dst_offset must be 0") return _cl._enqueue_svm_memcpy(queue, is_blocking, dest, src, **kwargs) @@ -2024,7 +2024,7 @@ def enqueue_copy(queue, dest, src, **kwargs): # This is NOT documented. They only support consistency with the # Buffer-based API for the sake of the Array. if kwargs.pop("src_offset", 0) != 0: - raise AssertionError + raise ValueError("src_offset must be 0") is_blocking = kwargs.pop("is_blocking", True) return _cl._enqueue_svm_memcpy( -- GitLab