Remove dependency on absl to fix tf-nightly-gpu windows GPU build
authorSmit Hinsu <hinsu@google.com>
Wed, 4 Apr 2018 22:36:52 +0000 (15:36 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 4 Apr 2018 22:39:24 +0000 (15:39 -0700)
PiperOrigin-RevId: 191659091

tensorflow/stream_executor/BUILD
tensorflow/stream_executor/cuda/cuda_dnn.cc
tensorflow/stream_executor/cuda/cudnn_version.h

index 27cdb86..1913fc2 100644 (file)
@@ -75,7 +75,6 @@ cc_library(
         ":stream_executor",
         "//tensorflow/core:lib",
         "//tensorflow/core/kernels:ops_util",
-        "@com_google_absl//absl/strings",
         "@local_config_cuda//cuda:cuda_headers",
     ] + if_cuda_is_configured([
         "//tensorflow/core:cuda",
index 1aea048..f408c06 100644 (file)
@@ -18,7 +18,6 @@ limitations under the License.
 #include <functional>
 #include <memory>
 
-#include "absl/strings/str_cat.h"
 #include "third_party/eigen3/Eigen/Core"
 #include "tensorflow/core/lib/core/errors.h"
 #include "tensorflow/core/util/env_var.h"
@@ -113,7 +112,7 @@ string ToString(libraryPropertyType type) {
     case PATCH_LEVEL:
       return "PATCH_LEVEL";
     default:
-      return absl::StrCat(
+      return port::StrCat(
           "<unknown libraryPropertyType: ", static_cast<int>(type), ">");
   }
 }
@@ -375,7 +374,7 @@ port::Status GetCudnnProperty(libraryPropertyType type, int* value) {
   cudnnStatus_t status = cudnnGetProperty(type, value);
   if (status != CUDNN_STATUS_SUCCESS) {
     const string error =
-        absl::StrCat("cudnnGetProperty failed for type: ", ToString(type),
+        port::StrCat("cudnnGetProperty failed for type: ", ToString(type),
                      " with status: ", ToString(status));
     LOG(ERROR) << error;
     return port::Status{port::error::INTERNAL, error};
@@ -419,7 +418,7 @@ port::Status CudnnSupport::Init() {
     CudnnVersion loaded_version;
     TF_RETURN_IF_ERROR(GetLoadedCudnnVersion(&loaded_version));
     if (!IsSourceCompatibleWithCudnnLibrary(source_version, loaded_version)) {
-      const tensorflow::string error = absl::StrCat(
+      const tensorflow::string error = port::StrCat(
           "Loaded runtime CuDNN library: ", loaded_version.ToString(),
           " but source was compiled with: ", source_version.ToString(),
           ".  CuDNN library major and minor version needs to match or have "
index 058cc87..2ed02e1 100644 (file)
@@ -18,7 +18,7 @@ limitations under the License.
 
 #include <string>
 
-#include "absl/strings/str_join.h"
+#include "tensorflow/core/lib/strings/strcat.h"
 
 namespace perftools {
 namespace gputools {
@@ -30,8 +30,9 @@ struct CudnnVersion {
   CudnnVersion(int major, int minor, int patch)
       : major_version(major), minor_version(minor), patch_level(patch) {}
 
-  std::string ToString() const {
-    return absl::StrJoin({major_version, minor_version, patch_level}, ".");
+  tensorflow::string ToString() const {
+    return tensorflow::strings::StrCat(major_version, ".", minor_version, ".",
+                                       patch_level);
   }
 
   int major_version;