Add "allocator", "bfc_allocator", and "gpu_bfc_allocator" BUILD targets.
Also cleans up some unneeded headers. PiperOrigin-RevId: 247650191
This commit is contained in:
parent
d1d9ba9dbe
commit
7624faff5b
@ -995,6 +995,26 @@ tf_cuda_library(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This is redundant with the "framework" target above. It's useful for
|
||||||
|
# applications that want to depend on a minimal subset of TensorFlow (e.g. XLA).
|
||||||
|
cc_library(
|
||||||
|
name = "allocator",
|
||||||
|
srcs = [
|
||||||
|
"framework/allocator.cc",
|
||||||
|
"framework/allocator_registry.cc",
|
||||||
|
"framework/allocator_registry.h",
|
||||||
|
"framework/tracking_allocator.cc",
|
||||||
|
"framework/tracking_allocator.h",
|
||||||
|
],
|
||||||
|
hdrs = ["framework/allocator.h"],
|
||||||
|
features = ["parse_headers"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
":lib",
|
||||||
|
"@com_google_absl//absl/types:optional",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "stats_calculator_portable",
|
name = "stats_calculator_portable",
|
||||||
srcs = [
|
srcs = [
|
||||||
@ -3275,6 +3295,36 @@ tf_cuda_library(
|
|||||||
alwayslink = 1,
|
alwayslink = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This is redundant with the "core_cpu_*" targets above. It's useful for
|
||||||
|
# applications that want to depend on a minimal subset of TensorFlow (e.g. XLA).
|
||||||
|
cc_library(
|
||||||
|
name = "bfc_allocator",
|
||||||
|
srcs = [
|
||||||
|
"common_runtime/allocator_retry.cc",
|
||||||
|
"common_runtime/allocator_retry.h",
|
||||||
|
"common_runtime/bfc_allocator.cc",
|
||||||
|
],
|
||||||
|
hdrs = ["common_runtime/bfc_allocator.h"],
|
||||||
|
features = ["parse_headers"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
":allocator",
|
||||||
|
":lib",
|
||||||
|
":lib_internal",
|
||||||
|
":shared_counter",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "shared_counter",
|
||||||
|
hdrs = ["common_runtime/shared_counter.h"],
|
||||||
|
features = ["parse_headers"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
":lib",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "regexp_internal",
|
name = "regexp_internal",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
@ -3455,6 +3505,25 @@ tf_cuda_library(
|
|||||||
] + if_static([":gpu_runtime_impl"]),
|
] + if_static([":gpu_runtime_impl"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This is redundant with the "gpu_runtime_*" targets above. It's useful for
|
||||||
|
# applications that want to depend on a minimal subset of TensorFlow (e.g. XLA).
|
||||||
|
tf_cuda_library(
|
||||||
|
name = "gpu_bfc_allocator",
|
||||||
|
srcs = [
|
||||||
|
"common_runtime/gpu/gpu_bfc_allocator.cc",
|
||||||
|
"common_runtime/gpu/gpu_id.h",
|
||||||
|
],
|
||||||
|
hdrs = ["common_runtime/gpu/gpu_bfc_allocator.h"],
|
||||||
|
features = ["parse_headers"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
":bfc_allocator",
|
||||||
|
":lib",
|
||||||
|
":lib_internal",
|
||||||
|
":stream_executor",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
tf_cuda_library(
|
tf_cuda_library(
|
||||||
name = "gpu_init",
|
name = "gpu_init",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/allocator_retry.h"
|
#include "tensorflow/core/common_runtime/allocator_retry.h"
|
||||||
#include "tensorflow/core/framework/device_base.h"
|
|
||||||
#include "tensorflow/core/lib/core/bits.h"
|
#include "tensorflow/core/lib/core/bits.h"
|
||||||
#include "tensorflow/core/lib/gtl/stl_util.h"
|
#include "tensorflow/core/lib/gtl/stl_util.h"
|
||||||
#include "tensorflow/core/lib/strings/numbers.h"
|
#include "tensorflow/core/lib/strings/numbers.h"
|
||||||
|
@ -32,7 +32,6 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/platform/mutex.h"
|
#include "tensorflow/core/platform/mutex.h"
|
||||||
#include "tensorflow/core/platform/thread_annotations.h"
|
#include "tensorflow/core/platform/thread_annotations.h"
|
||||||
#include "tensorflow/core/platform/types.h"
|
#include "tensorflow/core/platform/types.h"
|
||||||
#include "tensorflow/core/protobuf/config.pb.h"
|
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
|
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/gpu/gpu_id.h"
|
#include "tensorflow/core/common_runtime/gpu/gpu_id.h"
|
||||||
#include "tensorflow/core/common_runtime/gpu/gpu_id_utils.h"
|
|
||||||
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
|
|
||||||
#include "tensorflow/core/lib/strings/strcat.h"
|
#include "tensorflow/core/lib/strings/strcat.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -15,6 +15,10 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_SHARED_COUNTER_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_SHARED_COUNTER_H_
|
||||||
#define TENSORFLOW_CORE_COMMON_RUNTIME_SHARED_COUNTER_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_SHARED_COUNTER_H_
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
|
#include "tensorflow/core/platform/types.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
// A lightweight thread-safe monotone counter for establishing
|
// A lightweight thread-safe monotone counter for establishing
|
||||||
// temporal ordering.
|
// temporal ordering.
|
||||||
|
@ -15,9 +15,11 @@ limitations under the License.
|
|||||||
|
|
||||||
#include "tensorflow/core/framework/allocator.h"
|
#include "tensorflow/core/framework/allocator.h"
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
#include "tensorflow/core/framework/allocator_registry.h"
|
#include "tensorflow/core/framework/allocator_registry.h"
|
||||||
#include "tensorflow/core/framework/log_memory.h"
|
|
||||||
#include "tensorflow/core/framework/tracking_allocator.h"
|
#include "tensorflow/core/framework/tracking_allocator.h"
|
||||||
|
#include "tensorflow/core/lib/strings/strcat.h"
|
||||||
#include "tensorflow/core/lib/strings/stringprintf.h"
|
#include "tensorflow/core/lib/strings/stringprintf.h"
|
||||||
#include "tensorflow/core/platform/mem.h"
|
#include "tensorflow/core/platform/mem.h"
|
||||||
#include "tensorflow/core/platform/mutex.h"
|
#include "tensorflow/core/platform/mutex.h"
|
||||||
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "tensorflow/core/framework/allocator.h"
|
#include "tensorflow/core/framework/allocator.h"
|
||||||
#include "tensorflow/core/lib/core/refcount.h"
|
|
||||||
#include "tensorflow/core/lib/gtl/inlined_vector.h"
|
#include "tensorflow/core/lib/gtl/inlined_vector.h"
|
||||||
#include "tensorflow/core/platform/mutex.h"
|
#include "tensorflow/core/platform/mutex.h"
|
||||||
#include "tensorflow/core/platform/thread_annotations.h"
|
#include "tensorflow/core/platform/thread_annotations.h"
|
||||||
|
@ -20,6 +20,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#include "tensorflow/core/framework/allocator.h"
|
#include "tensorflow/core/framework/allocator.h"
|
||||||
#include "tensorflow/core/framework/resource_handle.h"
|
#include "tensorflow/core/framework/resource_handle.h"
|
||||||
|
#include "tensorflow/core/framework/type_traits.h"
|
||||||
#include "tensorflow/core/platform/types.h"
|
#include "tensorflow/core/platform/types.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user