From 9b371c8d58937826b44ec448183edb4eb56d68d7 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Tue, 30 Oct 2018 10:33:52 -0700 Subject: [PATCH] [SE] Remove StreamExecutor alias for absl::InlinedVector. PiperOrigin-RevId: 219324068 --- .../stream_executor/cuda/cuda_diagnostics.cc | 4 +-- .../stream_executor/cuda/cuda_driver.cc | 10 +++---- tensorflow/stream_executor/kernel.h | 1 - .../stream_executor/lib/inlined_vector.h | 29 ------------------- .../stream_executor_internal.h | 1 - 5 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 tensorflow/stream_executor/lib/inlined_vector.h diff --git a/tensorflow/stream_executor/cuda/cuda_diagnostics.cc b/tensorflow/stream_executor/cuda/cuda_diagnostics.cc index 90449b5d5d7..8c0bf70f6c7 100644 --- a/tensorflow/stream_executor/cuda/cuda_diagnostics.cc +++ b/tensorflow/stream_executor/cuda/cuda_diagnostics.cc @@ -39,9 +39,9 @@ limitations under the License. #include #include +#include "absl/container/inlined_vector.h" #include "absl/strings/str_cat.h" #include "tensorflow/stream_executor/lib/error.h" -#include "tensorflow/stream_executor/lib/inlined_vector.h" #include "tensorflow/stream_executor/lib/numbers.h" #include "tensorflow/stream_executor/lib/process_state.h" #include "tensorflow/stream_executor/lib/status.h" @@ -363,7 +363,7 @@ port::StatusOr Diagnostician::FindKernelDriverVersion() { } static const int kContentsSize = 1024; - port::InlinedVector contents(kContentsSize); + absl::InlinedVector contents(kContentsSize); size_t retcode = fread(contents.begin(), 1, kContentsSize - 2, driver_version_file); if (retcode < kContentsSize - 1) { diff --git a/tensorflow/stream_executor/cuda/cuda_driver.cc b/tensorflow/stream_executor/cuda/cuda_driver.cc index a6748141904..b34d1f722ea 100644 --- a/tensorflow/stream_executor/cuda/cuda_driver.cc +++ b/tensorflow/stream_executor/cuda/cuda_driver.cc @@ -22,12 +22,12 @@ limitations under the License. #include #include "absl/base/casts.h" +#include "absl/container/inlined_vector.h" #include "absl/strings/str_cat.h" #include "tensorflow/stream_executor/cuda/cuda_diagnostics.h" #include "tensorflow/stream_executor/lib/env.h" #include "tensorflow/stream_executor/lib/error.h" #include "tensorflow/stream_executor/lib/human_readable.h" -#include "tensorflow/stream_executor/lib/inlined_vector.h" #include "tensorflow/stream_executor/lib/notification.h" #include "tensorflow/stream_executor/lib/ptr_util.h" #include "tensorflow/stream_executor/lib/stacktrace.h" @@ -336,7 +336,7 @@ static port::Status InternalInit() { /* static */ bool CUDADriver::GetDeviceName(CUdevice device, string *device_name) { static const size_t kCharLimit = 64; - port::InlinedVector chars(kCharLimit); + absl::InlinedVector chars(kCharLimit); CUresult res = cuDeviceGetName(chars.begin(), kCharLimit - 1, device); if (res != CUDA_SUCCESS) { LOG(ERROR) << "failed to get device name for " << device << ": " @@ -575,8 +575,8 @@ CUDADriver::ContextGetSharedMemConfig(CudaContext* context) { static const unsigned int kLogBufferBytesLimit = 1024; unsigned int error_log_buffer_bytes = kLogBufferBytesLimit; unsigned int info_log_buffer_bytes = kLogBufferBytesLimit; - port::InlinedVector error_log_buffer(error_log_buffer_bytes); - port::InlinedVector info_log_buffer(info_log_buffer_bytes); + absl::InlinedVector error_log_buffer(error_log_buffer_bytes); + absl::InlinedVector info_log_buffer(info_log_buffer_bytes); bool log_verbose = true; CUjit_option options[] = {CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, CU_JIT_ERROR_LOG_BUFFER, @@ -1466,7 +1466,7 @@ static port::StatusOr GetSimpleAttribute(CUdevice device, /* static */ string CUDADriver::GetPCIBusID(CUdevice device) { string pci_bus_id; static const int kBufferSize = 64; - port::InlinedVector chars(kBufferSize); + absl::InlinedVector chars(kBufferSize); chars[kBufferSize - 1] = '\0'; CUresult res = cuDeviceGetPCIBusId(chars.begin(), kBufferSize - 1, device); if (res != CUDA_SUCCESS) { diff --git a/tensorflow/stream_executor/kernel.h b/tensorflow/stream_executor/kernel.h index 2216884b873..4d2406805fb 100644 --- a/tensorflow/stream_executor/kernel.h +++ b/tensorflow/stream_executor/kernel.h @@ -78,7 +78,6 @@ limitations under the License. #include "tensorflow/stream_executor/device_memory.h" #include "tensorflow/stream_executor/kernel_cache_config.h" #include "tensorflow/stream_executor/lib/array_slice.h" -#include "tensorflow/stream_executor/lib/inlined_vector.h" #include "tensorflow/stream_executor/lib/stringpiece.h" #include "tensorflow/stream_executor/platform/port.h" diff --git a/tensorflow/stream_executor/lib/inlined_vector.h b/tensorflow/stream_executor/lib/inlined_vector.h deleted file mode 100644 index 0198947e5ba..00000000000 --- a/tensorflow/stream_executor/lib/inlined_vector.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. - -Licensed 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. -==============================================================================*/ - -#ifndef TENSORFLOW_STREAM_EXECUTOR_LIB_INLINED_VECTOR_H_ -#define TENSORFLOW_STREAM_EXECUTOR_LIB_INLINED_VECTOR_H_ - -#include "absl/container/inlined_vector.h" - -namespace stream_executor { -namespace port { - -using absl::InlinedVector; - -} // namespace port -} // namespace stream_executor - -#endif // TENSORFLOW_STREAM_EXECUTOR_LIB_INLINED_VECTOR_H_ diff --git a/tensorflow/stream_executor/stream_executor_internal.h b/tensorflow/stream_executor/stream_executor_internal.h index 59a477b5c9c..32f75fd1bc1 100644 --- a/tensorflow/stream_executor/stream_executor_internal.h +++ b/tensorflow/stream_executor/stream_executor_internal.h @@ -36,7 +36,6 @@ limitations under the License. #include "tensorflow/stream_executor/kernel_cache_config.h" #include "tensorflow/stream_executor/kernel_spec.h" #include "tensorflow/stream_executor/launch_dim.h" -#include "tensorflow/stream_executor/lib/inlined_vector.h" #include "tensorflow/stream_executor/lib/status.h" #include "tensorflow/stream_executor/lib/statusor.h" #include "tensorflow/stream_executor/module_spec.h"