Skip to content

Commit

Permalink
Inline message into ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Aug 11, 2020
1 parent 10960ba commit 37d8663
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ucp/_libs/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ def get_buffer_nbytes(buffer, check_min_size, cuda_support):
if iface is None:
iface = getattr(buffer, "__cuda_array_interface__", None)
if not cuda_support and iface is not None:
msg = "UCX is not configured with CUDA support, please add " \
"`cuda_copy` and/or `cuda_ipc` to the UCX_TLS environment" \
"variable and that the ucx-proc=*=gpu package is " \
"installed. See " \
"https://ucx-py.readthedocs.io/en/latest/install.html for " \
"more information."
raise ValueError(msg)
raise ValueError(
"UCX is not configured with CUDA support, please add "
"`cuda_copy` and/or `cuda_ipc` to the UCX_TLS environment"
"variable and that the ucx-proc=*=gpu package is "
"installed. See "
"https://ucx-py.readthedocs.io/en/latest/install.html for "
"more information."
)

if iface is not None:
import numpy
Expand Down

0 comments on commit 37d8663

Please sign in to comment.