diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index c24a0556ad5b2802a97febf4aa854fc39b60d449..a84b5d1197c786ecb4ca3b04bb1ddad3e2b72f5f 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(