mirror of
https://github.com/zebrajr/tensorflow.git
synced 2026-01-15 12:15:41 +00:00
Add pybind11_abseil as a dependency to TF OSS.
PiperOrigin-RevId: 392078404 Change-Id: I59b58028e8c2521fb65f5d78f2ca8426efcf054a
This commit is contained in:
committed by
TensorFlower Gardener
parent
a7edfe5105
commit
08efa249c1
@@ -145,7 +145,6 @@ cc_library(
|
||||
],
|
||||
features = ["-use_header_modules"],
|
||||
deps = [
|
||||
":absl_casters",
|
||||
":status_casters",
|
||||
"//tensorflow/compiler/xla:literal",
|
||||
"//tensorflow/compiler/xla:shape_util",
|
||||
@@ -161,6 +160,7 @@ cc_library(
|
||||
"@com_google_absl//absl/container:inlined_vector",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
"@pybind11",
|
||||
"@pybind11_abseil//pybind11_abseil:absl_casters",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -377,7 +377,6 @@ cc_library(
|
||||
features = ["-use_header_modules"],
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
":absl_casters",
|
||||
":jax_jit",
|
||||
":py_client",
|
||||
":types",
|
||||
@@ -392,6 +391,7 @@ cc_library(
|
||||
"@com_google_absl//absl/types:span",
|
||||
"@com_google_absl//absl/types:variant",
|
||||
"@pybind11",
|
||||
"@pybind11_abseil//pybind11_abseil:absl_casters",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -451,7 +451,6 @@ cc_library(
|
||||
],
|
||||
features = ["-use_header_modules"],
|
||||
deps = [
|
||||
":absl_casters",
|
||||
"//tensorflow/core/platform:logging",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
@@ -461,6 +460,7 @@ cc_library(
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@pybind11",
|
||||
"@pybind11_abseil//pybind11_abseil:absl_casters",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ limitations under the License.
|
||||
#include "pybind11/cast.h"
|
||||
#include "pybind11/pybind11.h"
|
||||
#include "pybind11/pytypes.h"
|
||||
#include "tensorflow/compiler/xla/python/absl_casters.h"
|
||||
#include "pybind11_abseil/absl_casters.h" // from @pybind11_abseil
|
||||
#include "tensorflow/compiler/xla/python/jax_jit.h"
|
||||
#include "tensorflow/compiler/xla/python/py_buffer.h"
|
||||
#include "tensorflow/compiler/xla/python/py_executable.h"
|
||||
|
||||
@@ -32,7 +32,7 @@ limitations under the License.
|
||||
#include "pybind11/pybind11.h"
|
||||
#include "pybind11/pytypes.h"
|
||||
#include "pybind11/stl.h"
|
||||
#include "tensorflow/compiler/xla/python/absl_casters.h"
|
||||
#include "pybind11_abseil/absl_casters.h" // from @pybind11_abseil
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
|
||||
namespace xla {
|
||||
|
||||
@@ -25,7 +25,7 @@ limitations under the License.
|
||||
#include "pybind11/pybind11.h"
|
||||
#include "pybind11/pytypes.h"
|
||||
#include "pybind11/stl.h"
|
||||
#include "tensorflow/compiler/xla/python/absl_casters.h"
|
||||
#include "pybind11_abseil/absl_casters.h" // from @pybind11_abseil
|
||||
#include "tensorflow/compiler/xla/literal.h"
|
||||
#include "tensorflow/compiler/xla/python/status_casters.h"
|
||||
#include "tensorflow/compiler/xla/shape.h"
|
||||
|
||||
@@ -34,6 +34,7 @@ load("//third_party/icu:workspace.bzl", icu = "repo")
|
||||
load("//third_party/jpeg:workspace.bzl", jpeg = "repo")
|
||||
load("//third_party/llvm:workspace.bzl", llvm = "repo")
|
||||
load("//third_party/nasm:workspace.bzl", nasm = "repo")
|
||||
load("//third_party/pybind11_abseil:workspace.bzl", pybind11_abseil = "repo")
|
||||
load("//third_party/opencl_headers:workspace.bzl", opencl_headers = "repo")
|
||||
load("//third_party/kissfft:workspace.bzl", kissfft = "repo")
|
||||
load("//third_party/pasta:workspace.bzl", pasta = "repo")
|
||||
@@ -74,6 +75,7 @@ def _initialize_third_party():
|
||||
opencl_headers()
|
||||
pasta()
|
||||
psimd()
|
||||
pybind11_abseil()
|
||||
ruy()
|
||||
sobol_data()
|
||||
vulkan_headers()
|
||||
|
||||
1
third_party/pybind11_abseil/BUILD
vendored
Normal file
1
third_party/pybind11_abseil/BUILD
vendored
Normal file
@@ -0,0 +1 @@
|
||||
# Necessary for bazel to recognize this as a package.
|
||||
36
third_party/pybind11_abseil/workspace.bzl
vendored
Normal file
36
third_party/pybind11_abseil/workspace.bzl
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"""Provides the repo macro to import pybind11_abseil.
|
||||
|
||||
pybind11_abseil requires pybind11 (which is loaded in another rule) and pybind11_bazel.
|
||||
See https://github.com/pybind/pybind11_abseil#installation.
|
||||
"""
|
||||
|
||||
load("//third_party:repo.bzl", "tf_http_archive")
|
||||
|
||||
def repo():
|
||||
"""Imports pybind11_abseil."""
|
||||
PA_COMMIT = "d9614e4ea46b411d02674305245cba75cd91c1c6"
|
||||
PA_SHA256 = "a2b5509dc1c344954fc2f1ba1d277afae84167691c0daad59b6da71886d1f276"
|
||||
tf_http_archive(
|
||||
name = "pybind11_abseil",
|
||||
sha256 = PA_SHA256,
|
||||
strip_prefix = "pybind11_abseil-{commit}".format(commit = PA_COMMIT),
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11_abseil/archive/{commit}.tar.gz".format(commit = PA_COMMIT),
|
||||
"https://github.com/pybind/pybind11_abseil/archive/{commit}.tar.gz".format(commit = PA_COMMIT),
|
||||
],
|
||||
build_file = "//third_party/pybind11_abseil:BUILD",
|
||||
)
|
||||
|
||||
PB_COMMIT = "26973c0ff320cb4b39e45bc3e4297b82bc3a6c09"
|
||||
PB_SHA256 = "8f546c03bdd55d0e88cb491ddfbabe5aeb087f87de2fbf441391d70483affe39"
|
||||
|
||||
# pybind11_bazel is a dependency of pybind11_abseil.
|
||||
tf_http_archive(
|
||||
name = "pybind11_bazel",
|
||||
strip_prefix = "pybind11_bazel-{commit}".format(commit = PB_COMMIT),
|
||||
sha256 = PB_SHA256,
|
||||
urls = [
|
||||
"http://mirror.tensorflow.org/github.com/pybind/pybind11_bazel/archive/26973c0ff320cb4b39e45bc3e4297b82bc3a6c09.tar.gz",
|
||||
"https://github.com/pybind/pybind11_bazel/archive/26973c0ff320cb4b39e45bc3e4297b82bc3a6c09.tar.gz",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user