Add hwloc dependency package to TF build
PiperOrigin-RevId: 225493211
This commit is contained in:
parent
16f68575b5
commit
040ee45aa8
@ -23,6 +23,7 @@ load(
|
||||
load("//third_party/aws:workspace.bzl", aws = "repo")
|
||||
load("//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
|
||||
load("//third_party/highwayhash:workspace.bzl", highwayhash = "repo")
|
||||
load("//third_party/hwloc:workspace.bzl", hwloc = "repo")
|
||||
load("//third_party/icu:workspace.bzl", icu = "repo")
|
||||
load("//third_party/jpeg:workspace.bzl", jpeg = "repo")
|
||||
load("//third_party/nasm:workspace.bzl", nasm = "repo")
|
||||
@ -34,6 +35,7 @@ def initialize_third_party():
|
||||
aws()
|
||||
flatbuffers()
|
||||
highwayhash()
|
||||
hwloc()
|
||||
icu()
|
||||
keras_applications()
|
||||
kissfft()
|
||||
|
1
third_party/hwloc/BUILD
vendored
Normal file
1
third_party/hwloc/BUILD
vendored
Normal file
@ -0,0 +1 @@
|
||||
# Dummy BUILD file to make this directory a package.
|
87
third_party/hwloc/BUILD.bazel
vendored
Normal file
87
third_party/hwloc/BUILD.bazel
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# hwloc: Portable Hardware Locality Library
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
COMMON_INCLUDE_COPTS = [
|
||||
"-I.",
|
||||
"-Ihwloc",
|
||||
"-Iinclude",
|
||||
]
|
||||
|
||||
DISABLE_WARNINGS_COPTS = [
|
||||
"-Wno-vla",
|
||||
]
|
||||
|
||||
VAR_SETTINGS_COPTS = [
|
||||
"-DHWLOC_DUMPED_HWDATA_DIR=",
|
||||
"-DRUNSTATEDIR=",
|
||||
]
|
||||
|
||||
cc_library(
|
||||
name = "hwloc",
|
||||
srcs = [
|
||||
"hwloc/base64.c",
|
||||
"hwloc/bind.c",
|
||||
"hwloc/bitmap.c",
|
||||
"hwloc/components.c",
|
||||
"hwloc/diff.c",
|
||||
"hwloc/distances.c",
|
||||
"hwloc/misc.c",
|
||||
"hwloc/pci-common.c",
|
||||
"hwloc/shmem.c",
|
||||
"hwloc/static-components.h",
|
||||
"hwloc/topology.c",
|
||||
"hwloc/topology-hardwired.c",
|
||||
"hwloc/topology-linux.c",
|
||||
"hwloc/topology-noos.c",
|
||||
"hwloc/topology-synthetic.c",
|
||||
"hwloc/topology-x86.c",
|
||||
"hwloc/topology-xml.c",
|
||||
"hwloc/topology-xml-nolibxml.c",
|
||||
"hwloc/traversal.c",
|
||||
"include/hwloc/linux.h",
|
||||
"include/hwloc/plugins.h",
|
||||
"include/hwloc/shmem.h",
|
||||
"include/private/autogen/config.h",
|
||||
"include/private/components.h",
|
||||
"include/private/cpuid-x86.h",
|
||||
"include/private/debug.h",
|
||||
"include/private/internal-components.h",
|
||||
"include/private/misc.h",
|
||||
"include/private/private.h",
|
||||
"include/private/xml.h",
|
||||
],
|
||||
hdrs = [
|
||||
"include/hwloc.h",
|
||||
"include/hwloc/autogen/config.h",
|
||||
"include/hwloc/bitmap.h",
|
||||
"include/hwloc/deprecated.h",
|
||||
"include/hwloc/diff.h",
|
||||
"include/hwloc/distances.h",
|
||||
"include/hwloc/export.h",
|
||||
"include/hwloc/helper.h",
|
||||
"include/hwloc/inlines.h",
|
||||
"include/hwloc/rename.h",
|
||||
],
|
||||
copts = COMMON_INCLUDE_COPTS + DISABLE_WARNINGS_COPTS + VAR_SETTINGS_COPTS,
|
||||
features = [
|
||||
"-parse_headers",
|
||||
"-layering_check",
|
||||
],
|
||||
deps = [],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "hwloc_print",
|
||||
srcs = ["hwloc_print.cc"],
|
||||
copts = COMMON_INCLUDE_COPTS,
|
||||
deps = [
|
||||
":hwloc",
|
||||
],
|
||||
)
|
15
third_party/hwloc/workspace.bzl
vendored
Normal file
15
third_party/hwloc/workspace.bzl
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
"""loads the hwloc library, used by TF."""
|
||||
|
||||
load("//third_party:repo.bzl", "third_party_http_archive")
|
||||
|
||||
def repo():
|
||||
third_party_http_archive(
|
||||
name = "hwloc",
|
||||
urls = [
|
||||
"http://mirror.bazel.build/download.open-mpi.org/release/hwloc/v2.0/hwloc-2.0.3.tar.gz",
|
||||
"https://download.open-mpi.org/release/hwloc/v2.0/hwloc-2.0.3.tar.gz",
|
||||
],
|
||||
sha256 = "64def246aaa5b3a6e411ce10932a22e2146c3031b735c8f94739534f06ad071c",
|
||||
strip_prefix = "hwloc-2.0.3",
|
||||
build_file = "//third_party/hwloc:BUILD.bazel",
|
||||
)
|
Loading…
Reference in New Issue
Block a user