You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[configure] [nvml] added option to specify nvml header directory path
Description: when compiling with "--enable-nvml" flag we checked for nvml.h only in default locations.
added "--with-nvml-include-dir=DIR" flag to allow users specifying non-defualt locations where nvml.h might have been installed.
AC_CHECK_LIB([nvidia-ml], [nvmlInit_v2], [], [AC_MSG_ERROR([libnvidia-ml not found, please check you nvidia driver installation.])])
399
+
400
+
if test "$enable_nvml" = "yes"; then
401
+
AC_ARG_WITH([nvml-include-dir], AS_HELP_STRING([--with-nvml-include-dir=DIR], [use nvml from the specified DIR]),
402
+
[
403
+
nvml_dir="$withval"
404
+
AC_MSG_NOTICE([Using nvml from $nvml_dir])
405
+
CXXFLAGS="$CXXFLAGS -I$nvml_dir"
406
+
CFLAGS="$CFLAGS -I$nvml_dir"
407
+
],
408
+
[
409
+
AC_MSG_NOTICE([Looking for nvml headers])
410
+
PKG_CHECK_MODULES([nvml], [nvidia-ml], [],
411
+
[
412
+
AC_MSG_NOTICE([Looking for nvml headers and libraries in default include paths])
413
+
AC_CHECK_HEADERS([nvml.h], [], [AC_MSG_ERROR([cannot find nvml.h in default include paths, please check you nvidia driver installation or use --with-nvml-include-dir=DIR to specify the correct directory path of nvml.h.])])
414
+
AC_CHECK_LIB([nvidia-ml], [nvmlInit_v2], [], [AC_MSG_ERROR([libnvidia-ml not found in default library paths, please check you nvidia driver installation])])
0 commit comments