From f0ee21fe0ad3ac5ae9b07a863697346651c7e230 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Sat, 20 Aug 2022 06:16:54 +0000 Subject: [PATCH] Update cpuinfo to the latest commit (#83620) This hasn't been updated for a while, so pulling the latest commit from https://github.com/pytorch/cpuinfo. I wonder if it breaks anything Fixes #83594 Pull Request resolved: https://github.com/pytorch/pytorch/pull/83620 Approved by: https://github.com/malfet --- WORKSPACE | 5 ++-- third_party/cpuinfo | 2 +- third_party/cpuinfo.BUILD | 55 --------------------------------------- 3 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 third_party/cpuinfo.BUILD diff --git a/WORKSPACE b/WORKSPACE index d26dfca5a3336..61abbdac2b239 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -88,6 +88,7 @@ new_local_repository( name = "fbgemm", build_file = "//third_party:fbgemm/BUILD.bazel", path = "third_party/fbgemm", + repo_mapping = {"@cpuinfo" : "@org_pytorch_cpuinfo"} ) new_local_repository( @@ -103,8 +104,8 @@ new_local_repository( ) new_local_repository( - name = "cpuinfo", - build_file = "//third_party:cpuinfo.BUILD", + name = "org_pytorch_cpuinfo", + build_file = "//third_party:cpuinfo/BUILD.bazel", path = "third_party/cpuinfo", ) diff --git a/third_party/cpuinfo b/third_party/cpuinfo index 5916273f79a21..8ec7bd91ad047 160000 --- a/third_party/cpuinfo +++ b/third_party/cpuinfo @@ -1 +1 @@ -Subproject commit 5916273f79a21551890fd3d56fc5375a78d1598d +Subproject commit 8ec7bd91ad0470e61cf38f618cc1f270dede599c diff --git a/third_party/cpuinfo.BUILD b/third_party/cpuinfo.BUILD deleted file mode 100644 index 2e9e2aeff3cda..0000000000000 --- a/third_party/cpuinfo.BUILD +++ /dev/null @@ -1,55 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "clog", - srcs = [ - "deps/clog/src/clog.c", - ], - hdrs = glob([ - "deps/clog/include/*.h", - ]), - includes = [ - "deps/clog/include/", - ], - linkstatic = True, - visibility = ["//visibility:public"], -) - -cc_library( - name = "cpuinfo", - srcs = glob( - [ - "src/*.c", - "src/linux/*.c", - "src/x86/*.c", - "src/x86/cache/*.c", - "src/x86/linux/*.c", - ], - exclude = [ - "src/x86/mockcpuid.c", - "src/linux/mockfile.c", - ], - ), - hdrs = glob([ - "include/*.h", - "src/*.h", - "src/cpuinfo/*.h", - "src/include/*.h", - "src/x86/*.h", - "src/x86/linux/*.h", - "src/linux/*.h", - ]), - copts = [ - "-DCPUINFO_LOG_LEVEL=2", - "-D_GNU_SOURCE=1", - ], - includes = [ - "include", - "src", - ], - linkstatic = True, - visibility = ["//visibility:public"], - deps = [ - ":clog", - ], -)