We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff05890 commit 6b81b50Copy full SHA for 6b81b50
2 files changed
cuda_core/cuda/core/_memoryview.pyx
@@ -996,7 +996,7 @@ cdef bint check_has_dlpack(obj) except*:
996
elif hasattr(obj, "__cuda_array_interface__"):
997
has_dlpack = False
998
else:
999
- raise RuntimeError(
+ raise BufferError(
1000
"the input object does not support any data exchange protocol")
1001
return has_dlpack
1002
cuda_core/tests/test_utils.py
@@ -1044,7 +1044,7 @@ def test_check_has_dlpack_plain_object_raises():
1044
class _NoProto:
1045
pass
1046
1047
- with pytest.raises(RuntimeError, match="does not support any data exchange protocol"):
+ with pytest.raises(BufferError, match="does not support any data exchange protocol"):
1048
StridedMemoryView.from_any_interface(_NoProto(), stream_ptr=-1)
1049
1050
0 commit comments