Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tsl/platform/abi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ limitations under the License.

#include "tsl/platform/abi.h"

#include "xla/tsl/platform/types.h"

#if defined(_MSC_VER)
#include <windows.h>
#include <cstring>
Expand Down Expand Up @@ -45,7 +43,7 @@ std::string MaybeAbiDemangle(const char* name) {
std::free,
static_cast<unsigned short>(0))};

return string(demangled.get() != nullptr ? demangled.get() : name);
return std::string(demangled.get() != nullptr ? demangled.get() : name);
#else
int status = 0;
std::unique_ptr<char, void (*)(void*)> res{
Expand Down
15 changes: 8 additions & 7 deletions tsl/platform/cpu_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ limitations under the License.

#include "tsl/platform/cpu_info.h"

#include <cstdint>

// Required for cross compile with clang
#ifdef PLATFORM_WINDOWS
#include <intrin.h>
Expand All @@ -24,7 +26,6 @@ limitations under the License.

#include "absl/base/call_once.h"
#include "xla/tsl/platform/logging.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/platform.h"
#if defined(PLATFORM_IS_X86)
#include <mutex> // NOLINT
Expand Down Expand Up @@ -70,7 +71,7 @@ namespace {
class CPUIDInfo;
void InitCPUIDInfo();

CPUIDInfo *cpuid = nullptr;
CPUIDInfo* cpuid = nullptr;

#ifdef PLATFORM_WINDOWS
// Visual Studio defines a builtin function, so use that if possible.
Expand Down Expand Up @@ -144,9 +145,9 @@ class CPUIDInfo {

// Get vendor string (issue CPUID with eax = 0)
GETCPUID(eax, ebx, ecx, edx, 0, 0);
cpuid->vendor_str_.append(reinterpret_cast<char *>(&ebx), 4);
cpuid->vendor_str_.append(reinterpret_cast<char *>(&edx), 4);
cpuid->vendor_str_.append(reinterpret_cast<char *>(&ecx), 4);
cpuid->vendor_str_.append(reinterpret_cast<char*>(&ebx), 4);
cpuid->vendor_str_.append(reinterpret_cast<char*>(&edx), 4);
cpuid->vendor_str_.append(reinterpret_cast<char*>(&ecx), 4);

// To get general information and extended features we send eax = 1 and
// ecx = 0 to cpuid. The response is returned in eax, ebx, ecx and edx.
Expand Down Expand Up @@ -385,7 +386,7 @@ class CPUIDInfo;
void InitCPUIDInfo();
void InitCPUIDFeatureInfo();

CPUIDInfo *cpuid = nullptr;
CPUIDInfo* cpuid = nullptr;

// Structure for basic CPUID info.
class CPUIDInfo {
Expand Down Expand Up @@ -444,7 +445,7 @@ class CPUIDInfo {
if (midr_el1_file.is_open()) {
std::string line;
if (static_cast<bool>(getline(midr_el1_file, line))) {
uint32 midr_el1 = std::stoul(line, nullptr, 16);
uint32_t midr_el1 = std::stoul(line, nullptr, 16);

// Unpack variant and CPU ID.
// Reference:
Expand Down
2 changes: 1 addition & 1 deletion tsl/platform/demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_TSL_PLATFORM_DEMANGLE_H_
#define TENSORFLOW_TSL_PLATFORM_DEMANGLE_H_

#include "xla/tsl/platform/types.h"
#include <string>

namespace tsl {
namespace port {
Expand Down
1 change: 0 additions & 1 deletion tsl/platform/human_readable_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ limitations under the License.

#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/protobuf.h"

namespace tsl {
Expand Down
1 change: 0 additions & 1 deletion tsl/platform/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ limitations under the License.
// TODO(cwhipkey): remove this when callers use annotations directly.
#include "absl/base/macros.h"
#include "xla/tsl/platform/dynamic_annotations.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/platform.h"

namespace tsl {
Expand Down
4 changes: 3 additions & 1 deletion tsl/platform/snappy.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ limitations under the License.
#ifndef TENSORFLOW_TSL_PLATFORM_SNAPPY_H_
#define TENSORFLOW_TSL_PLATFORM_SNAPPY_H_

#include "xla/tsl/platform/types.h"
#include <string>

#include "tsl/platform/platform.h"

#if !defined(PLATFORM_WINDOWS)
#include <sys/uio.h>
Expand Down
1 change: 0 additions & 1 deletion tsl/platform/tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ limitations under the License.
#include <array>

#include "xla/tsl/platform/macros.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/platform.h"
#include "tsl/platform/stringpiece.h"

Expand Down
Loading