DickJC123 commented on a change in pull request #15449: cuda/cuDNN lib version 
checking.  Force cuDNN v7 usage.
URL: https://github.com/apache/incubator-mxnet/pull/15449#discussion_r300163871
 
 

 ##########
 File path: src/common/cuda_utils.cc
 ##########
 @@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * Copyright (c) 2019 by Contributors
+ * \file cuda_utils.cc
+ * \brief CUDA debugging utilities.
+ */
+
+#include <mxnet/base.h>
+#include "cuda_utils.h"
+
+#if MXNET_USE_CUDA == 1
+
+namespace mxnet {
+namespace common {
+namespace cuda {
+
+// The oldest version of cuda used in upstream MXNet CI testing, both for unix 
and windows.
+// Users that have rebuilt MXNet against older versions will we advised with a 
warning to upgrade
+// their systems to match the CI level.  Minimally, users should rerun the CI 
locally.
+#if defined(_MSC_VER)
+#define MXNET_CI_OLDEST_CUDA_VERSION  9020
+#else
+#define MXNET_CI_OLDEST_CUDA_VERSION 10000
+#endif
+
+
+// Start-up check that the version of cuda compiled-against matches the 
linked-against version.
+bool CudaVersionChecks() {
+  if (dmlc::GetEnv("MXNET_CUDA_VERSION_CHECKING", true)) {
+    int linkedAgainstCudaVersion = 0;
+    CUDA_CALL(cudaRuntimeGetVersion(&linkedAgainstCudaVersion));
 
 Review comment:
   My latest push has hopefully resolved this build problem.  If there are no 
visible GPUs on the system (perhaps the user has set CUDA_VISIBLE_DEVICES=""), 
then the version checks are omitted.  Without a visible GPU, there won't be any 
GPU contexts successfully created and any GPU library mismatch is irrelevant.  
So no warning messages should be emitted in this case. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to