add docs for driver.get_build_version
@@ -74,6 +74,17 @@ cdef inline void check_attribute_status(int status, int* pi) except *:
###############################################################################
cpdef get_build_version():
+ """Returns the CUDA_VERSION / HIP_VERSION constant.
+
+ Note that when built with CUDA Python support, CUDA_VERSION will become a
+ constant:
+
+ https://github.com/NVIDIA/cuda-python/blob/v11.4.0/cuda/ccuda.pxd#L2268
+
+ In CuPy codebase, use CUPY_CUDA_VERSION compile-time constant instead of
+ this function to change the behavior based on the target CUDA version.
+ """
+
# The versions are mutually exclusive
if CUPY_CUDA_VERSION > 0:
return CUDA_VERSION
