if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.5)
message(FATAL_ERROR "gcc version must >= 7.5 when build with cuda")
endif()
# cuda libs build with -mno-fix-cortex-a53-843419 -mno-fix-cortex-a53-835769, if you are not deploy on arm a53 platform and want to save link time, you may open below flags even
message(
WARNING
"cuda libs build with -mno-fix-cortex-a53-843419 -mno-fix-cortex-a53-835769, so force disable it to avoid link error"
LOGD("failed to load %s func: %s.(May caused by currently driver is too old, \nif you find cuda is not available(by import megengine as mge; mge.get_device_count(\"gpu\")\nor find some inexplicable crash of the program,\ntry upgrade driver from https://developer.nvidia.com/cuda-downloads)",g_default_api_name,func);