From 9348a29872bef1d6f376ba05971968c5ff78c81c Mon Sep 17 00:00:00 2001 From: Brian Zhao Date: Wed, 7 Aug 2019 23:04:19 -0700 Subject: [PATCH] Inline windows/cpu_info.h into platform/cpu_info.h. Since the endianness macros are now provided by byte_order.h, we can remove all other inclusion sites. PiperOrigin-RevId: 262288248 --- tensorflow/core/BUILD | 1 - tensorflow/core/framework/bfloat16.h | 4 ---- tensorflow/core/kernels/sparse_matmul_op.h | 1 - tensorflow/core/platform/cpu_info.h | 3 ++- tensorflow/core/platform/windows/cpu_info.h | 22 --------------------- 5 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 tensorflow/core/platform/windows/cpu_info.h diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 48388401b55..356308474ee 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -673,7 +673,6 @@ cc_library( "//tensorflow/core/platform:stringpiece.h", "//tensorflow/core/platform:tstring.h", "//tensorflow/core/platform:types.h", - "//tensorflow/core/platform:windows/cpu_info.h", ], copts = tf_copts(), deps = tf_lib_proto_parsing_deps() + [ diff --git a/tensorflow/core/framework/bfloat16.h b/tensorflow/core/framework/bfloat16.h index e9e94024f5b..ba5637d9707 100644 --- a/tensorflow/core/framework/bfloat16.h +++ b/tensorflow/core/framework/bfloat16.h @@ -20,10 +20,6 @@ limitations under the License. #include "tensorflow/core/platform/byte_order.h" #include "tensorflow/core/platform/types.h" -#if defined(PLATFORM_WINDOWS) -#include "tensorflow/core/platform/windows/cpu_info.h" -#endif - // Compact 16-bit encoding of floating point numbers. This representation uses // 1 bit for the sign, 8 bits for the exponent and 7 bits for the mantissa. It // is assumed that floats are in IEEE 754 format so the representation is just diff --git a/tensorflow/core/kernels/sparse_matmul_op.h b/tensorflow/core/kernels/sparse_matmul_op.h index 6b9db8f471a..6e84e22c2b4 100644 --- a/tensorflow/core/kernels/sparse_matmul_op.h +++ b/tensorflow/core/kernels/sparse_matmul_op.h @@ -21,7 +21,6 @@ limitations under the License. #include "tensorflow/core/platform/types.h" #if defined(PLATFORM_WINDOWS) -#include "tensorflow/core/platform/windows/cpu_info.h" #include "tensorflow/core/platform/windows/intrinsics_port.h" #endif diff --git a/tensorflow/core/platform/cpu_info.h b/tensorflow/core/platform/cpu_info.h index b2d0f21fe7a..60574bf67d0 100644 --- a/tensorflow/core/platform/cpu_info.h +++ b/tensorflow/core/platform/cpu_info.h @@ -23,7 +23,8 @@ limitations under the License. #include "tensorflow/core/platform/byte_order.h" #if defined(_MSC_VER) -#include "tensorflow/core/platform/windows/cpu_info.h" +// included so __cpuidex function is available for GETCPUID on Windows +#include #endif namespace tensorflow { diff --git a/tensorflow/core/platform/windows/cpu_info.h b/tensorflow/core/platform/windows/cpu_info.h deleted file mode 100644 index 8b42cbec7a1..00000000000 --- a/tensorflow/core/platform/windows/cpu_info.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2016 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_CORE_PLATFORM_WINDOWS_CPU_INFO_H_ -#define TENSORFLOW_CORE_PLATFORM_WINDOWS_CPU_INFO_H_ - -// included so __cpuidex function is available for GETCPUID on Windows -#include - -#endif // TENSORFLOW_CORE_PLATFORM_WINDOWS_CPU_INFO_H_