From 2d55b75a39c1120dfc552d9b391fd9970592565c Mon Sep 17 00:00:00 2001 From: ksimpson Date: Thu, 19 Dec 2024 10:57:11 -0800 Subject: [PATCH] add warnign to the nvjitlink ctor when falling back to cuLink --- cuda_core/cuda/core/experimental/_linker.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cuda_core/cuda/core/experimental/_linker.py b/cuda_core/cuda/core/experimental/_linker.py index 2beeb1680..6e36a2a54 100644 --- a/cuda_core/cuda/core/experimental/_linker.py +++ b/cuda_core/cuda/core/experimental/_linker.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE import ctypes +import warnings import weakref from contextlib import contextmanager from dataclasses import dataclass @@ -42,6 +43,12 @@ def _decide_nvjitlink_or_driver(): _nvjitlink = None if _nvjitlink is None: + warnings.warn( + "nvJitLink is not installed or too old (<12.3). Therefore it is not usable " + "and the culink APIs will be used instead.", + stacklevel=3, + category=RuntimeWarning, + ) _driver = cuda return True else: @@ -80,7 +87,8 @@ class LinkerOptions: """Customizable :obj:`Linker` options. Since the linker would choose to use nvJitLink or the driver APIs as the linking backed, - not all options are applicable. + not all options are applicable. When the system's installed nvJitLink is too old (<12.3), + or not installed, the driver APIs (cuLink) will be used instead. Attributes ----------