File tree Expand file tree Collapse file tree
cuda_bindings/cuda/bindings/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33from typing import Any , Callable
44
5+ from ._nvvm_utils import check_nvvm_options
56from ._ptx_utils import get_minimal_required_cuda_ver_from_ptx_ver , get_ptx_ver
67from ._version_check import warn_if_cuda_major_version_mismatch
7- from ._nvvm_utils import check_nvvm_options
88
99_handle_getters : dict [type , Callable [[Any ], int ]] = {}
1010
1111
1212def _add_cuda_native_handle_getter (t : type , getter : Callable [[Any ], int ]) -> None :
1313 _handle_getters [t ] = getter
1414
15+
1516def get_cuda_native_handle (obj : Any ) -> int :
1617 """Returns the address of the provided CUDA Python object as a Python int.
1718
Original file line number Diff line number Diff line change 2222def check_nvvm_options (options : Sequence [bytes ]) -> bool :
2323 """
2424 Abstracted from https://github.com/NVIDIA/numba-cuda/pull/681
25-
25+
2626 Check if the specified options are supported by the current libNVVM version.
2727
2828 The options are a list of bytes, each representing a compiler option.
@@ -31,8 +31,8 @@ def check_nvvm_options(options: Sequence[bytes]) -> bool:
3131 is returned.
3232
3333 If the test program compiles successfully, True is returned.
34-
35- cuda.bindings.nvvm returns exceptions instead of return codes.
34+
35+ cuda.bindings.nvvm returns exceptions instead of return codes.
3636
3737 Parameters
3838 ----------
Original file line number Diff line number Diff line change @@ -705,4 +705,4 @@ def test_program_options_as_bytes_nvvm_unsupported_option():
705705 """Test that unsupported options raise CUDAError for NVVM backend"""
706706 options = ProgramOptions (arch = "sm_80" , lineinfo = True )
707707 with pytest .raises (CUDAError , match = "not supported by NVVM backend" ):
708- options .as_bytes ("nvvm" )
708+ options .as_bytes ("nvvm" )
You can’t perform that action at this time.
0 commit comments