Internal change
PiperOrigin-RevId: 514421618
This commit is contained in:
parent
96b2958f18
commit
6c68d4c358
|
@ -305,15 +305,16 @@ cc_library(
|
|||
],
|
||||
deps = [
|
||||
":calculator_base",
|
||||
":calculator_cc_proto",
|
||||
":calculator_node",
|
||||
":counter_factory",
|
||||
":delegating_executor",
|
||||
":mediapipe_profiling",
|
||||
":executor",
|
||||
":graph_output_stream",
|
||||
":graph_service",
|
||||
":graph_service_manager",
|
||||
":input_stream_manager",
|
||||
":mediapipe_profiling",
|
||||
":output_side_packet_impl",
|
||||
":output_stream",
|
||||
":output_stream_manager",
|
||||
|
@ -321,28 +322,18 @@ cc_library(
|
|||
":output_stream_shard",
|
||||
":packet",
|
||||
":packet_generator",
|
||||
":packet_generator_cc_proto",
|
||||
":packet_generator_graph",
|
||||
":packet_set",
|
||||
":packet_type",
|
||||
":port",
|
||||
":scheduler_queue",
|
||||
":status_handler",
|
||||
":status_handler_cc_proto",
|
||||
":thread_pool_executor",
|
||||
":thread_pool_executor_cc_proto",
|
||||
":timestamp",
|
||||
":validated_graph_config",
|
||||
":calculator_cc_proto",
|
||||
":packet_generator_cc_proto",
|
||||
":status_handler_cc_proto",
|
||||
":thread_pool_executor_cc_proto",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/container:fixed_array",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/status",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
"//mediapipe/framework/port:core_proto",
|
||||
"//mediapipe/framework/port:integral_types",
|
||||
"//mediapipe/framework/port:logging",
|
||||
|
@ -355,13 +346,19 @@ cc_library(
|
|||
"//mediapipe/framework/tool:tag_map",
|
||||
"//mediapipe/framework/tool:validate",
|
||||
"//mediapipe/framework/tool:validate_name",
|
||||
"//mediapipe/gpu:graph_support",
|
||||
"//mediapipe/gpu:gpu_service",
|
||||
"//mediapipe/gpu:graph_support",
|
||||
"//mediapipe/util:cpu_util",
|
||||
] + select({
|
||||
"//conditions:default": ["//mediapipe/gpu:gpu_shared_data_internal"],
|
||||
"//mediapipe/gpu:disable_gpu": [],
|
||||
}),
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/container:fixed_array",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/status",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
|
@ -1434,7 +1431,7 @@ cc_test(
|
|||
"//mediapipe/framework/stream_handler:timestamp_align_input_stream_handler",
|
||||
"//mediapipe/framework/tool:sink",
|
||||
"//mediapipe/framework/tool:status_util",
|
||||
"//mediapipe/gpu:graph_support",
|
||||
"//mediapipe/gpu:gpu_service",
|
||||
"@com_google_absl//absl/container:fixed_array",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings",
|
||||
|
|
|
@ -62,11 +62,9 @@
|
|||
#include "mediapipe/framework/tool/validate.h"
|
||||
#include "mediapipe/framework/tool/validate_name.h"
|
||||
#include "mediapipe/framework/validated_graph_config.h"
|
||||
#include "mediapipe/gpu/gpu_service.h"
|
||||
#include "mediapipe/gpu/graph_support.h"
|
||||
#include "mediapipe/util/cpu_util.h"
|
||||
#if !MEDIAPIPE_DISABLE_GPU
|
||||
#include "mediapipe/gpu/gpu_shared_data_internal.h"
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
namespace mediapipe {
|
||||
|
||||
|
|
|
@ -53,10 +53,14 @@
|
|||
#include "mediapipe/framework/port/status.h"
|
||||
#include "mediapipe/framework/scheduler.h"
|
||||
#include "mediapipe/framework/thread_pool_executor.pb.h"
|
||||
#include "mediapipe/gpu/gpu_service.h"
|
||||
|
||||
namespace mediapipe {
|
||||
|
||||
#if !MEDIAPIPE_DISABLE_GPU
|
||||
class GpuResources;
|
||||
struct GpuSharedData;
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
typedef absl::StatusOr<OutputStreamPoller> StatusOrPoller;
|
||||
|
||||
// The class representing a DAG of calculator nodes.
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
#include "mediapipe/framework/tool/sink.h"
|
||||
#include "mediapipe/framework/tool/status_util.h"
|
||||
#include "mediapipe/framework/type_map.h"
|
||||
#include "mediapipe/gpu/graph_support.h"
|
||||
#include "mediapipe/gpu/gpu_service.h"
|
||||
|
||||
namespace mediapipe {
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ cc_library(
|
|||
name = "graph_support",
|
||||
hdrs = ["graph_support.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//mediapipe/framework:graph_service"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
|
@ -827,6 +826,7 @@ objc_library(
|
|||
features = ["-layering_check"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":gpu_service",
|
||||
":gpu_shared_data_internal",
|
||||
":graph_support",
|
||||
"//mediapipe/objc:mediapipe_framework_ios",
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#import "mediapipe/gpu/gpu_buffer.h"
|
||||
#import "mediapipe/gpu/graph_support.h"
|
||||
#import "mediapipe/gpu/gpu_service.h"
|
||||
#import "mediapipe/gpu/metal_shared_resources.h"
|
||||
#import "GTMDefines.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace mediapipe {
|
|||
class GpuResources {
|
||||
GpuResources() = delete;
|
||||
};
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
#endif // MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
extern const GraphService<GpuResources> kGpuService;
|
||||
|
||||
|
|
|
@ -116,6 +116,8 @@ GpuResources::~GpuResources() {
|
|||
#endif // __APPLE__
|
||||
}
|
||||
|
||||
extern const GraphService<GpuResources> kGpuService;
|
||||
|
||||
absl::Status GpuResources::PrepareGpuNode(CalculatorNode* node) {
|
||||
CHECK(ContainsKey(node->Contract().ServiceRequests(), kGpuService.key));
|
||||
std::string node_id = node->GetCalculatorState().NodeName();
|
||||
|
@ -195,8 +197,6 @@ GlContext::StatusOrGlContext GpuResources::GetOrCreateGlContext(
|
|||
|
||||
GpuSharedData::GpuSharedData() : GpuSharedData(kPlatformGlContextNone) {}
|
||||
|
||||
extern const GraphService<GpuResources> kGpuService;
|
||||
|
||||
#if !MEDIAPIPE_GPU_BUFFER_USE_CV_PIXEL_BUFFER
|
||||
static std::shared_ptr<GlTextureBuffer> GetGlTextureBufferFromPool(
|
||||
int width, int height, GpuBufferFormat format) {
|
||||
|
|
|
@ -16,14 +16,8 @@
|
|||
#ifndef MEDIAPIPE_GPU_GRAPH_SUPPORT_H_
|
||||
#define MEDIAPIPE_GPU_GRAPH_SUPPORT_H_
|
||||
|
||||
#include "mediapipe/framework/graph_service.h"
|
||||
|
||||
namespace mediapipe {
|
||||
|
||||
// Forward declaration to avoid depending on GpuResources here.
|
||||
class GpuResources;
|
||||
extern const GraphService<GpuResources> kGpuService;
|
||||
|
||||
static constexpr char kGpuSharedTagName[] = "GPU_SHARED";
|
||||
static constexpr char kGpuSharedSidePacketName[] = "gpu_shared";
|
||||
static constexpr char kGpuExecutorName[] = "__gpu";
|
||||
|
|
Loading…
Reference in New Issue
Block a user