Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update error message to include f16 usage
  • Loading branch information
testhound committed Feb 8, 2023
commit aec2c5d6ed1afcb862ce883753aa4020772641fd
7 changes: 5 additions & 2 deletions numba/cuda/cudadrv/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2721,8 +2721,11 @@ def add_file(self, path, kind):
raise LinkerError(msg)

def add_cu(self, path, name):
raise NotImplementedError("Linking CUDA source files is not supported "
"with the ctypes binding. ")
raise NotImplementedError("Support for fp16 or linking CUDA source files "
"requires the use of the Nvidia CUDA "
"bindings and enabling the "
"NUMBA_CUDA_USE_NVIDIA_BINDING environment variable. "
"See documentation for me details")

def complete(self):
cubin = c_void_p(0)
Expand Down
4 changes: 2 additions & 2 deletions numba/cuda/tests/cudadrv/test_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def kernel(x):

@skip_with_cuda_python
def test_linking_cu_ctypes_unsupported(self):
msg = ('Linking CUDA source files is not supported with the ctypes '
'binding')
msg = ('Support for fp16 or linking CUDA source files '

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expected message doesn't seem to match the message added in dispatcher.py. Shouldn't this test be failing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmarkall the test was not failing it appears because it was not being run due to the skip_with_cuda_python decorator.

'requires the use of the Nvidia CUDA bindings')
with self.assertRaisesRegex(NotImplementedError, msg):
@cuda.jit('void()', link=['jitlink.cu'])
def f():
Expand Down