The library 4.2 have the méthod:
// This is just a linear search through the array, since the error_id’s are not
// always ocurring consecutively
inline const char * getCudaDrvErrorString(CUresult error_id)
int index = 0;
while (sCudaDrvErrorString[index].error_id != error_id &&
sCudaDrvErrorString[index].error_id != -1)
return (const char *)sCudaDrvErrorString[index].error_string;
return (const char *)“CUDA_ERROR not found!”;
This seems to be the brief Initialize the CUDA driver AP for CUresult error_id
whitch is in Cuda.h witch is not in Cuda 5.0:
\defgroup CUDA_INITIALIZE Initialization
This section describes the initialization functions of the low-level CUDA
driver application programming interface.
\brief Initialize the CUDA driver API
Initializes the driver API and must be called before any other function from
the driver API. Currently, the \p Flags parameter must be 0. If ::cuInit()
has not been called, any function from the driver API will return
\param Flags - Initialization flag for CUDA.
CUresult CUDAAPI cuInit(unsigned int Flags);
I personally wouldn’t suggest that. If there were other API changes between 4.2 and 5.0, and you were using one of those changed APIs with CUDA 5.0 but the 4.2 cuda.h header file, you could get any sort of unpredictable behvior.
The modern replacement(s) for the function you mention are covered here.
I don’t know if those were available in CUDA 5.0. CUDA 5.0 is very old, and if anyone were updating CUDA 4.2 code, I would not suggest they update from 4.2 to 5.0, but instead from 4.2 to something like 9.0 or newer.
I have now error with Cuda 10.1
error : identifier “CUdevice_attribute” is undefined
error : identifier “cuDriverGetVersion” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_INTEGRATED” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_ECC_ENABLED” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_TCC_DRIVER” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_PCI_BUS_ID” is undefined
error : identifier “CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID” is undefined
If I had in the “*.h” #include cuda.h, the cuda.h version 5.0 is loaded !
Why basic features are removed ?
We waste a lot of time to configure each subsequent version of CUDA !
I get anxious about every CUDA version change !
compute_13 has not been supported since I think CUDA 7. That is an item specified in a compile command somewhere. You would not want to be targetting that architecture unless you want to support very old GPUs.
Witch version of compute and sm I must put in Visual Studio 2019
and witch macro I can use ?
I want to passe tu Cuda 10.1 and nothing work’s.
I want to know th good configuration and not what don’t work !