Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion python/cugraph/community/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
# replace ktruss with a __UnsupportedModule instance, which lazily raises an
# exception when referenced.
from numba import cuda
__cuda_version = cuda.runtime.get_version()
try:
__cuda_version = cuda.runtime.get_version()
except cuda.cudadrv.runtime.CudaRuntimeAPIError:
__cuda_version = "n/a"

__ktruss_unsupported_cuda_version = (11, 4)

class __UnsupportedModule:
Expand Down
7 changes: 6 additions & 1 deletion python/cugraph/community/ktruss_subgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
# crash in that environment. Allow ktruss to import on non-11.4 systems, but
# raise an exception if ktruss is directly imported on 11.4.
from numba import cuda
__cuda_version = cuda.runtime.get_version()
try:
__cuda_version = cuda.runtime.get_version()
except cuda.cudadrv.runtime.CudaRuntimeAPIError:
__cuda_version = "n/a"

__ktruss_unsupported_cuda_version = (11, 4)

if __cuda_version == __ktruss_unsupported_cuda_version:
__kuvs = ".".join([str(n) for n in __ktruss_unsupported_cuda_version])
raise NotImplementedError("k_truss is not currently supported in CUDA"
Expand Down